Browse Source

项目商机、营销组织、消息中心优化

qymljy 2 năm trước cách đây
mục cha
commit
299d339289

+ 18 - 8
src/Form/marketing2/saler/add.vue

@@ -4,7 +4,7 @@
     <el-drawer
         title="创建业务员"
         :visible.sync="dialogVisible"
-        size="30%"
+        size="600px"
         direction="rtl"
         append-to-body
         :show-close="false"
@@ -44,7 +44,8 @@
             </el-col>
             <el-col :span="12">
               <el-form-item  label="区域:" prop="areaname">
-                <el-input  v-model="form.areaname" placeholder="区域" disabled></el-input>
+<!--                <el-input  v-model="form.areaname" placeholder="区域" ></el-input>-->
+                <areaList :areaname="form.areaname" @selectArea="selectArea"></areaList>
               </el-form-item>
             </el-col>
             <el-col :span="15">
@@ -82,10 +83,12 @@
 
 <script>
 import selectMenber from '@/components/selectMenber/index.vue'
+import areaList from "@/HManagement/marketing2/saler/area/modules/areaList";
 import {mapGetters} from 'vuex'
 export default {
   components:{
-    selectMenber
+    selectMenber,
+    areaList
   },
   data () {
     return {
@@ -93,7 +96,8 @@ export default {
       form:{
         "sa_saleareaid":'',
         "hrid":'',
-        "discountrate":''
+        "discountrate":'',
+        "areaname":''
       },
       rules:{
         hrid:[
@@ -114,10 +118,11 @@ export default {
   methods:{
     onShow () {
       this.form.areaname = this.dataToForm.label
+      this.form.sa_saleareaid = this.dataToForm.sa_saleareaid
     },
     onSubmit () {
       console.log(this.dataToForm)
-      
+
       console.log(this.form)
       this.$refs['form'].validate((valid) => {
         if (!valid) return false
@@ -126,7 +131,7 @@ export default {
           cancelButtonText: '取消',
           type: 'warning'
         }).then(async () => {
-          this.form.sa_saleareaid = this.dataToForm.sa_saleareaid
+          /*this.form.sa_saleareaid = this.dataToForm.sa_saleareaid*/
         this.form.discountrate = (this.form.discountrate /100).toFixed(4)
           const res = await this.$api.requested({
             "id":20221011144703,
@@ -148,7 +153,7 @@ export default {
           this.$message({
             type: 'info',
             message: '已取消'
-          });          
+          });
         });
       });
     },
@@ -172,6 +177,11 @@ export default {
       }else {
         this.form.discountrate = Math.round(val * 100)/100
       }
+    },
+    selectArea(val){
+      console.log(val,'选择的')
+      this.form.areaname = val.label
+      this.form.sa_saleareaid = val.sa_saleareaid
     }
   },
   created () {
@@ -181,4 +191,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 14 - 6
src/Form/marketing2/saler/edit.vue

@@ -4,17 +4,17 @@
     <el-drawer
         title="编辑业务员"
         :visible.sync="dialogVisible"
-        size="30%"
+        size="600px"
         direction="rtl"
         append-to-body
         :show-close="false"
         @close="dialogVisible = false">
       <div class="drawer__panel">
         <el-row>
-          <el-form :model="form"  :rules="rules" ref="form" label-position="right" label-width="75px" size="small" disabled>
+          <el-form :model="form"  :rules="rules" ref="form" label-position="right" label-width="75px" size="small" >
             <el-col :span="12" >
               <el-form-item label="业务员:" prop="hrid" >
-                <selectMenber ref="salerName"  @selectMenber="selectMenbers" ></selectMenber>
+                <selectMenber ref="salerName"  @selectMenber="selectMenbers" :disabled="true"></selectMenber>
               </el-form-item>
             </el-col>
             <el-col :span="12">
@@ -45,6 +45,7 @@
             <el-col :span="12">
               <el-form-item  label="区域:" prop="areaname">
                 <el-input  v-model="form.areaname" placeholder="区域" disabled></el-input>
+<!--                <areaList :areaname="form.areaname" @selectArea="selectArea" disabled=""></areaList>-->
               </el-form-item>
             </el-col>
           </el-form>
@@ -72,11 +73,13 @@
 
 <script>
 import selectMenber from '@/components/selectMenber/index.vue'
+import areaList from "@/HManagement/marketing2/saler/area/modules/areaList";
 export default {
   name: "edit",
   props:["data"],
   components:{
-    selectMenber
+    selectMenber,
+    areaList
   },
   data(){
     return {
@@ -100,7 +103,7 @@ export default {
         console.log(this.$refs)
         this.$refs.salerName.value.name = this.data.name
       });
-      
+
     },
     selectMenbers (data) {
       console.log(data)
@@ -129,10 +132,15 @@ export default {
       }else {
         this.form.discountrate = Math.round(val * 100)/100
       }
+    },
+    selectArea(val){
+      console.log(val,'选择的')
+      this.form.areaname = val.label
+      this.form.sa_saleareaid = val.sa_saleareaid
     }
   }
 }
 
 </script>
 <style>
-</style>
+</style>

+ 4 - 4
src/Form/marketing2/salerScope/edit.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="inline-16">
-    <el-button size="small" type="text" @click="query_arealist(dialogVisible = true)">编 辑</el-button>
-    <el-dialog title="编辑管辖区域" :visible.sync="dialogVisible" width="400px">
+    <el-button size="small" type="text" @click="query_arealist(dialogVisible = true)" :disabled="disabled">编 辑</el-button>
+    <el-dialog title="编辑管辖区域" :visible.sync="dialogVisible" width="400px" append-to-body>
       <el-cascader
         style="width:100%"
         class="width-240"
@@ -21,7 +21,7 @@
 
 <script>
 export default {
-  props:['data'],
+  props:['data','disabled'],
   data () {
     return {
       dialogVisible:false,
@@ -69,4 +69,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 23 - 7
src/Form/projectChange/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-button size="small" type="primary" @click="addBtn(dialogFormVisible = true)">新 建</el-button>
     <el-drawer
         title="新建项目商机"
         :visible.sync="dialogFormVisible"
@@ -22,7 +22,7 @@
               <el-form-item label="项目类型:" prop="projecttype">
                 <el-select v-model="form.projecttype" placeholder="请选择项目类型" size="mini">
                   <el-option
-                      v-for="(item,index) in projectType()"
+                      v-for="(item,index) in projectType"
                       :key="index"
                       :label="item.value"
                       :value="item.value">
@@ -36,7 +36,7 @@
               <el-form-item label="项目等级:" prop="grade">
                 <el-select v-model="form.grade" placeholder="请选择项目等级" size="mini">
                   <el-option
-                      v-for="item in projectLead()"
+                      v-for="item in projectLead"
                       :key="item.value"
                       :label="item.value"
                       :value="item.value">
@@ -216,7 +216,7 @@ import duplicateCheck from "@/components/duplicatesCheck/projectCheck";
 import {mapGetters} from "vuex";
 export default {
   name: "add",
-  inject:['enterpriseList','projectType','projectLead','projectPanl'],
+  inject:['enterpriseList','projectPanl'],
   components:{duplicateCheck},
   data(){
     var begdateTime = (rule,value,callback) =>{
@@ -267,6 +267,8 @@ export default {
       projectAddress:[],
       dialogTableVisible:false,
       tablecols:[],
+      projectType:[],
+      projectLead:[],
       total:0,
       param:{
         "id": 20230727134902,
@@ -360,6 +362,12 @@ export default {
     })
   },
   methods:{
+    addBtn(){
+      this.queryBrand()
+      this.queryTradefield()
+      this.queryUnitname()
+      this.getSysetms()
+    },
     /*省市县*/
     cascaderChange (val) {
       this.form.province = val[0]
@@ -633,11 +641,19 @@ export default {
       this.param.content.pageNumber = val
       this.nameChange()
     },
+    async getSysetms () {
+      /* 获取项目类型 */
+      let res = await this.$store.dispatch('optiontypeselect','projecttype')
+      this.projectType = res.data
+      /* 获取项目等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','projectgrade')
+      this.projectLead = res2.data
+
+
+    },
   },
   mounted() {
-    this.queryBrand()
-    this.queryTradefield()
-    this.queryUnitname()
+
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).duplicatesProjectTable.tablecols

+ 656 - 0
src/Form/projectChange/addCopy.vue

@@ -0,0 +1,656 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-drawer
+        title="新建项目商机"
+        :visible.sync="dialogFormVisible"
+        size="700px"
+        direction="rtl"
+        append-to-body
+        :show-close="false"
+        @close="onClose">
+      <div class="drawer__panel">
+        <el-row :gutter="10">
+          <el-form :model="form" :rules="rules" ref="form" label-width="125px" label-position="right" size="mini">
+            <el-col :span="24">
+              <el-form-item label="项目名称:" prop="projectname">
+                <el-input v-model="form.projectname" placeholder="请输入项目名称" @blur="nameChange(param.content.pageNumber = 1)"></el-input>
+                <span style="color: red;font-size: 12px;margin-bottom: -10px" v-if="repeats.length > 0">疑似重复</span>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目类型:" prop="projecttype">
+                <el-select v-model="form.projecttype" placeholder="请选择项目类型" size="mini">
+                  <el-option
+                      v-for="(item,index) in projectType()"
+                      :key="index"
+                      :label="item.value"
+                      :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目等级:" prop="grade">
+                <el-select v-model="form.grade" placeholder="请选择项目等级" size="mini">
+                  <el-option
+                      v-for="item in projectLead()"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="省市县:" prop="value">
+                <el-cascader
+                    style="width:100%"
+                    v-model="form.value"
+                    :options="basicData.data().areaData"
+                    @change="cascaderChange" clearable>
+                </el-cascader>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item label="详细地址:" prop="address">
+                <el-input v-model="form.address" placeholder="请输入详细地址"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="20">
+              <el-form-item label="项目规模:" prop="scale" >
+                <el-input v-model="form.scale" placeholder="请填写数值"  class="inline-16"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+                <el-select v-model="form.unitname" placeholder="请选择单位" size="mini" >
+                  <el-option
+                      v-for="item in unitnameList"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value">
+                    <!--                    <span style="float: left">{{ item.value }}</span>-->
+                    <!--                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>-->
+                  </el-option>
+                </el-select>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="项目预算(万元):" prop="budgetary" >
+                <el-input  v-model="form.budgetary" placeholder="项目预算"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="总投资额(万元):" prop="totalinvestment" >
+                <el-input  v-model="form.totalinvestment" placeholder="总投资额"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="造价(万元):" prop="costofconstruction" >
+                <el-input  v-model="form.costofconstruction" placeholder="造价"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="预计开工时间:" prop="begdate_due">
+                <el-date-picker
+                    style="width: 100%"
+                    v-model="form.begdate_due"
+                    type="month"
+                    placeholder="选择月"
+                    :picker-options="pickerOptions"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="预计完工时间:" prop="enddate_due">
+                <el-date-picker
+                    style="width: 100%"
+                    v-model="form.enddate_due"
+                    type="month"
+                    placeholder="选择月"
+                    :picker-options="pickerOptions"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="预计签约时间:" prop="signdate_due">
+                <el-date-picker
+                    style="width: 100%"
+                    v-model="form.signdate_due"
+                    type="month"
+                    placeholder="选择月"
+                    :picker-options="pickerOptions"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="预计签约金额(元):" prop="signamount_due">
+                <el-input v-model="form.signamount_due" placeholder="请输入预计签约金额" disabled></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item label="领域:" prop="tradefield">
+                <el-select v-model="form.tradefield" placeholder="请选择领域">
+                  <el-option
+                      v-for="item in tradefieldSelect"
+                      :key="item.value"
+                      :label="item.label"
+                      :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="品牌:" prop="sa_brandid">
+                <el-select v-model="form.sa_brandid" placeholder="请选择品牌">
+                  <el-option
+                      v-for="item in brandSelect"
+                      :key="item.sa_brandid"
+                      :label="item.brandname"
+                      :value="item.sa_brandid">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button  size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
+        <duplicateCheck ref="check" :data="form"  @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
+        <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+    <el-dialog title="重复项目" :visible.sync="dialogTableVisible" append-to-body width="1000px">
+      <div slot="title" class="dialog-title">
+        <span class="title-text">重复项目</span>
+        <p style="font-size: 14px;color: red">当前项目疑似重复,以下为疑似重复项目</p>
+      </div>
+      <tableLayout :layout="tablecols"   :data="repeats" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true">
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname === 'tag'">
+            <div v-for="item in scope.column.data.tag_sys" :key="item.index"  style="float: left;margin-left: 5px;margin-bottom: 5px">
+              <el-tag  color="#3874F6" size="mini" type="primary" effect="dark">
+                <span>{{item}}</span>
+              </el-tag>
+            </div>
+            <div v-for="item in scope.column.data.tag" :key="item.index"  style="float: left;margin-left: 5px;margin-bottom: 5px">
+              <el-tag color="#FA8C16" size="mini" type="warning" effect="dark">
+                <span>{{item}}</span>
+              </el-tag>
+            </div>
+          </div>
+          <div v-else-if="scope.column.columnname === 'leader'">
+            <span>{{scope.column.data.leader?scope.column.data.leader.length !== 0 ? scope.column.data.leader[0].name:'--':'--'}}</span>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]?scope.column.data[scope.column.columnname]:'--'}}</p>
+        </template>
+      </tableLayout>
+      <div  class="container normal-panel" style="text-align:right">
+        <el-pagination
+            background
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="param.content.pageNumber"
+            :page-sizes="[20, 50, 100, 200]"
+            :page-size="20"
+            layout="total,sizes, prev, pager, next, jumper"
+            :total="total">
+        </el-pagination>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import duplicateCheck from "@/components/duplicatesCheck/projectCheck";
+import {mapGetters} from "vuex";
+export default {
+  name: "add",
+  inject:['enterpriseList','projectType','projectLead','projectPanl'],
+  components:{duplicateCheck},
+  data(){
+    var begdateTime = (rule,value,callback) =>{
+      this.$refs.form.validateField('enddate_due')
+      if (this.form.enddate_due !== ''){
+        if (value > this.form.enddate_due){
+          callback(new Error('预计开工时间不能晚于预计完工时间'))
+        }else {
+          callback();
+        }
+      } else {
+        callback();
+      }
+    }
+    var enddateTime = (rule,value,callback) =>{
+      if (value && this.form.begdate_due !== '' ){
+        if (value < this.form.begdate_due){
+          callback(new Error('预计完工时间不能早于预计开工时间'))
+        }else {
+          callback();
+        }
+      }else if (value && this.form.begdate_due === '') {
+        callback(new Error('预计完工时间不能早于预计开工时间'))
+      }else {
+        callback();
+      }
+    }
+    var projectname = (rule,value,callback) => {
+      if (value){
+        if (this.repeats.length > 0){
+          callback(new Error('疑似重复'))
+        }else {
+          callback()
+        }
+      }else {
+        callback(new Error('项目名称不能为空'))
+      }
+    }
+    return {
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() < Date.now();
+        }
+      },
+      repeats:[],
+      dialogFormVisible:false,
+      checkResults:'',
+      projectAddress:[],
+      dialogTableVisible:false,
+      tablecols:[],
+      total:0,
+      param:{
+        "id": 20230727134902,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "sa_projectid":'',
+          "where": {
+            "condition": ""
+          }
+        },
+      },
+      form:{
+        sa_projectid:0,
+        projectname:"",
+        projectnum:"",
+        address:"",//可选
+        grade:"",//可选
+        budgetary:"",//可选
+        remarks:"",//可选
+        projecttype:"",//可选
+        sa_projstagetempid:"",//可选
+        signdate_due:"",//可选
+        scale:"",//可选
+        signamount_due:"",//可选
+        province:"",
+        city:"",
+        county:"",
+        totalinvestment:'', //总投资额
+        costofconstruction:'', //造价
+        begdate_due:'', //预计开工时间
+        enddate_due:'',  //预计完工时间
+        sa_brandid:"",
+        tradefield:"",
+        value:[],
+        unitname:''
+      },
+      brandSelect:[],
+      tradefieldSelect:[],
+      unitnameList:[],
+      value:[],
+      rules:{
+        projectname:[
+          { required: true, message: '请输入项目名称', trigger: 'blur'},
+        ],
+        /*projectnum:[
+          { required: true, message: '输入项目编号', trigger: 'blur'}
+        ],*/
+        projecttype:[
+          { required: true, message: '请选择项目类型', trigger: 'change'}
+        ],
+        sys_enterpriseid:[
+          { required: true, message: '请选择企业', trigger: 'blur'},
+        ],
+        /*sa_projstagetempid:[
+          { required: true, message: '请选择当前项目模板', trigger: 'blur'}
+        ],*/
+        value:[
+          { required: true, message: '请选择省市县', trigger: 'change'}
+        ],
+        tradefield:[
+          { required: true, message: '请选择领域', trigger: 'change'}
+        ],
+        sa_brandid:[
+          { required: false, message: '请选择品牌', trigger: 'change'}
+        ],
+        begdate_due:[
+          { required: false, validator: begdateTime, trigger: 'change' }
+        ],
+        enddate_due:[
+          { required: false, validator: enddateTime, trigger: 'change' }
+        ],
+        budgetary:[
+          {required: false,pattern:/^\d+(.\d{1,2})?$/, message: '请输入数字值', trigger: 'blur'}
+        ],
+        scale:[
+          {required: false,pattern:/^\d+(.\d{1,2})?$/, message: '请输入数字值', trigger: 'blur'}
+        ],
+        totalinvestment:[
+          {required: false,pattern:/^\d+(.\d{1,2})?$/, message: '请输入数字值', trigger: 'blur'}
+        ],
+        costofconstruction:[
+          {required: false,pattern:/^\d+(.\d{1,2})?$/, message: '请输入数字值', trigger: 'blur'}
+        ]
+      }
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  methods:{
+    /*省市县*/
+    cascaderChange (val) {
+      this.form.province = val[0]
+      /*console.log(val)
+      this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
+      console.log(this.form)*/
+      if (val.length === 1)
+        return this.form = Object.assign({},this.form,{province:val[0],city:'',county:''})
+
+      this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
+
+
+    },
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208184202,
+          "content": {
+            "projectname":this.form.projectname,
+            "address":this.form.address,
+            "sa_projectid":0
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      /*if (this.checkResults === ''){
+        this.duplicateCheck()
+      }else {
+        if (this.checkResults !== 0){
+          this.$confirm('该项目疑似重复,是否确认创建项目?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            this.onSubmit()
+          }).catch(() => {
+            this.$message({
+              type: 'info',
+              message: '已取消创建'
+            });
+          });
+        }else {
+          this.onSubmit()
+        }
+      }*/
+      this.$refs.form.validate((valid) => {
+        if (!valid) {
+          this.$notify({
+            title: '警告',
+            message: '请按照要求输入信息',
+            type: 'warning'
+          });
+          return false
+        }
+        this.$store.commit('setLoading',true)
+        this.$refs.check.creatShow = true
+        this.$refs.check.queryRule(()=>{
+          this.$store.commit('setLoading',false)
+        })
+      })
+    },
+    onSubmit(){
+      console.log(this.form)
+      if (this.form.signdate_due !== ''){
+        const data = new Date(this.form.signdate_due)
+        console.log(data.getFullYear())
+        console.log(data.getMonth()+1)
+        if (data.getMonth() +1 < 10){
+          this.form.signdate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
+        }else {
+          this.form.signdate_due = data.getFullYear() + '-' + (data.getMonth() + 1)
+        }
+      }else {
+        this.form.signdate_due = ''
+      }
+      if (this.form.begdate_due !== ''){
+        const data = new Date(this.form.begdate_due)
+        console.log(data.getFullYear())
+        console.log(data.getMonth()+1)
+        if (data.getMonth() +1 < 10){
+          this.form.begdate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
+        }else {
+          this.form.begdate_due = data.getFullYear() + '-' + (data.getMonth() + 1)
+        }
+      }else {
+        this.form.begdate_due = ''
+      }
+      if (this.form.enddate_due !== ''){
+        const data = new Date(this.form.enddate_due)
+        console.log(data.getFullYear())
+        console.log(data.getMonth()+1)
+        if (data.getMonth() +1 < 10){
+          this.form.enddate_due = data.getFullYear() + '-0' + (data.getMonth() + 1)
+        }else {
+          this.form.enddate_due = data.getFullYear() + '-' + (data.getMonth() + 1)
+        }
+      }else {
+        this.form.enddate_due = ''
+      }
+      console.log(this.form)
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": "20221020144202",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.repeats = []
+            this.value = ''
+            this.form={
+              sa_projectid:0,
+              projectname:"",
+              projectnum:"",
+              address:"",//可选
+              grade:"",//可选
+              budgetary:"",//可选
+              remarks:"",//可选
+              projecttype:"",//可选
+              sa_projstagetempid:"",//可选
+              signdate_due:"",//可选
+              scale:"",//可选
+              signamount_due:"",//可选
+              province:"",
+              city:"",
+              county:"",
+              sa_brandid:"",
+              tradefields:[]
+            }
+            this.dialogFormVisible = false
+            this.checkResults = ''
+          }else {
+            this.setTag(res.data.sa_projectid)
+          }
+
+        })
+      })
+    },
+    async setTag(id){
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_project",
+          "ownerid":id,
+          "datatag":[
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.repeats = []
+      this.form={
+        sa_projectid:0,
+        projectname:"",
+        projectnum:"",
+        address:"",//可选
+        grade:"",//可选
+        budgetary:"",//可选
+        remarks:"",//可选
+        projecttype:"",//可选
+        sa_projstagetempid:"",//可选
+        signdate_due:"",//可选
+        scale:"",//可选
+        signamount_due:"",//可选
+        province:"",
+        city:"",
+        county:"",
+        sa_brandid:"",
+        tradefields:[]
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
+    },
+    timeChange(e) {
+      if(!e) {
+        this.form.signdate_due = ''
+      }
+      let result = this.changeTimeFormat(e.getTime())
+
+      this.form.signdate_due = result
+    },
+    changeTimeFormat(time) {
+      var date = new Date(time);
+      var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
+      var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
+      return date.getFullYear() + "-" + month + "-" + currentDate
+    },
+    onClose(){
+      this.$refs['form'].resetFields()
+      this.dialogFormVisible = false
+      this.$emit('onSuccess')
+      this.repeats = []
+    },
+    /*获取品牌*/
+    async queryBrand(){
+      const res = await this.$api.requested({
+        content: {
+        isExport: 0,
+        pageNumber: 1,
+        pageSize: 20,
+        where: {
+            condition: "",
+            tablefilter: {}
+          }
+        },
+        id: 20220922085103
+      })
+      this.brandSelect = res.data
+    },
+    /*获取领域*/
+    queryTradefield(){
+      this.$store.dispatch('optiontypeselect','tradefield').then(res=>{
+        this.tradefieldSelect = res.data
+      })
+    },
+    /*获取单位*/
+    queryUnitname(){
+      this.$store.dispatch('optiontypeselect','scaleunitname').then(res=>{
+        this.form.unitname = res.data[0].value
+        this.unitnameList = res.data
+      })
+    },
+    checkSuccess(val){
+      this.checkResults = val
+    },
+    /*查询项目名称是否重复*/
+    async nameChange(){
+      if (this.form.projectname !== ''){
+        this.param.content.sa_projectid = 0
+        this.param.content.where.condition = this.form.projectname
+        const res = await this.$api.requested(this.param)
+        console.log(res.data,'是否重复')
+        this.repeats = res.data
+        this.total = res.total
+        this.$refs.form.validateField('projectname')
+        if (this.repeats.length > 0){
+          this.dialogTableVisible = true
+        }else {
+          this.dialogTableVisible = false
+        }
+      }
+
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.nameChange()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.nameChange()
+    },
+  },
+  mounted() {
+    this.queryBrand()
+    this.queryTradefield()
+    this.queryUnitname()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).duplicatesProjectTable.tablecols
+  }
+}
+</script>
+
+<style scoped>
+/deep/.el-select {
+  height: 28px !important;
+  width: 100%;
+}
+/deep/.el-input__inner {
+  height: 28px !important;
+}
+</style>

+ 20 - 5
src/Form/projectChange/edit.vue

@@ -22,7 +22,7 @@
               <el-form-item label="项目类型:" prop="projecttype">
                 <el-select v-model="form.projecttype" placeholder="请选择项目类型" size="mini">
                   <el-option
-                      v-for="(item,index) in projectType()"
+                      v-for="(item,index) in projectType"
                       :key="index"
                       :label="item.value"
                       :value="item.value">
@@ -36,7 +36,7 @@
               <el-form-item label="项目等级:" prop="grade">
                 <el-select v-model="form.grade" placeholder="请选择项目等级" size="mini">
                   <el-option
-                      v-for="item in projectLead()"
+                      v-for="item in projectLead"
                       :key="item.value"
                       :label="item.value"
                       :value="item.value">
@@ -221,7 +221,7 @@ import duplicateCheck from "@/components/duplicatesCheck/projectCheck";
 import {mapGetters} from "vuex";
 export default {
   name: "edit",
-  inject:['projectType','projectLead','projectPanl'],
+  inject:['projectPanl'],
   components:{duplicateCheck},
   props:['data','btnType'],
   data(){
@@ -274,6 +274,8 @@ export default {
       flagTag:0,
       dialogFormVisible:false,
       projectAddress:[],
+      projectType:[],
+      projectLead:[],
       disabled:false,
       userInfo:JSON.parse(window.sessionStorage.getItem('userInfo')),
       addChange:false,
@@ -396,6 +398,9 @@ export default {
       }
       this.tagData()
       this.queryUnitname()
+      this.getSysetms()
+      this.queryBrand()
+      this.queryTradefield()
       /*this.form.tradefields = JSON.parse(this.form.tradefields)*/
 
       /*this.form.budgetary = this.form.budgetary !== 0 ? this.tool.formatAmount(this.form.budgetary,2):'' || ''
@@ -629,10 +634,20 @@ export default {
       this.param.content.pageNumber = val
       this.nameChange()
     },
+    async getSysetms () {
+      /* 获取项目类型 */
+      let res = await this.$store.dispatch('optiontypeselect','projecttype')
+      this.projectType = res.data
+      /* 获取项目等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','projectgrade')
+      this.projectLead = res2.data
+
+
+    },
   },
   mounted() {
-    this.queryBrand()
-    this.queryTradefield()
+
+
   },
   created() {
     this.tablecols = this.tool.tabelCol(this.$route.name).duplicatesProjectTable.tablecols

+ 39 - 8
src/Form/publicCustomer/add.vue

@@ -1,7 +1,7 @@
 <template>
 <!--上级企业 负责人-->
   <div>
-    <el-button  size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-button  size="small" type="primary" @click="addBtn(dialogFormVisible = true)">新 建</el-button>
     <el-drawer
         direction="rtl"
         append-to-body
@@ -79,7 +79,7 @@
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
                   <el-option
-                    v-for="item in customerType()"
+                    v-for="item in customerType"
                     :key="item.value"
                     :label="item.value"
                     :value="item.value">
@@ -238,7 +238,7 @@
               <el-form-item label="公海池:" prop="sa_customerpoolid">
                 <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
                   <el-option
-                    v-for="item in publicList()"
+                    v-for="item in publicList"
                     :key="item.sa_customerpoolid"
                     :label="item.poolname"
                     :value="item.sa_customerpoolid">
@@ -263,7 +263,7 @@ import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
 import {mapGetters} from "vuex";
 export default {
   name: "add",
-  inject:['customerLead','customerType','arealist','publicList'],
+  inject:['arealist'],
   components:{duplicateCheck},
   data(){
     return {
@@ -273,6 +273,9 @@ export default {
       customerShow:false,
       checkResults:'',
       businessData:[],
+      customerLead:[],
+      customerType:[],
+      publicList:[],
       businessParam:{
         "id": 20221208103601,
         "content": {
@@ -362,6 +365,13 @@ export default {
     })
   },
   methods:{
+    addBtn(){
+      this.industryList()
+      this.gradeList()
+      this.queryCustomerGrade()
+      this.getSysOption()
+      this.getPublicList()
+    },
     /*工商查询*/
     async businessSearch(){
       this.businessParam.content.keyword = this.form.enterprisename
@@ -643,12 +653,33 @@ export default {
     },
     checkSuccess(val){
       this.checkResults = val
-    }
+    },
+    /* 获取系统选项数据 */
+    async getSysOption() {
+      /* 获取客户类型 */
+      let res = await this.$store.dispatch('optiontypeselect','customertypemx')
+      this.customerType = res.data
+      /* 获取客户等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','customergrade')
+      this.customerLead = res2.data
+
+    },
+    /* 获取公海数据 */
+    async getPublicList() {
+      const res = await this.$api.requested({
+        "id": 20221009100702,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 999999,
+          "where": {
+          }
+        },
+      })
+      this.publicList = res.data
+    },
   },
   mounted() {
-    this.industryList()
-    this.gradeList()
-    this.queryCustomerGrade()
+
   }
 }
 </script>

+ 664 - 0
src/Form/publicCustomer/addCopy.vue

@@ -0,0 +1,664 @@
+<template>
+<!--上级企业 负责人-->
+  <div>
+    <el-button  size="small" type="primary" @click="dialogFormVisible = true">新 建</el-button>
+    <el-drawer
+        direction="rtl"
+        append-to-body
+        title="新建公海客户"
+        :show-close="false"
+        :visible.sync="dialogFormVisible"
+        @close="onClose"
+        size="600px">
+      <div class="drawer__panel">
+        <el-row :gutter="20">
+          <el-form :model="form" :rules="rules" ref="form" label-width="90px" label-position="right" size="mini">
+            <el-col :span="20">
+              <el-form-item label="客户名称:" prop="enterprisename">
+                <el-input v-model="form.enterprisename" placeholder="客户名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="4">
+              <el-popover
+                  placement="right"
+                  width="900"
+                  v-model="businessShow"
+                  trigger="manual">
+                <el-input
+                    style="width:300px;margin-bottom: 10px"
+                    placeholder="请输入内容"
+                    v-model="form.enterprisename"
+                    clearable
+                    @clear="businessSearch"
+                    size="mini"
+                    @keyup.enter.native="businessSearch">
+                  <i slot="prefix" class="el-icon-search" @click="businessSearch"></i>
+                </el-input>
+                <el-table :data="businessData" @row-click="businessSelect" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                  <el-table-column width="260" label="客户名称">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.companyName?scope.row.companyName:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column  label="客户地址">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                  <el-table-column width="200"  label="客户税号">
+                    <template slot-scope="scope">
+                      <span style="margin-left: 10px">{{ scope.row.taxNum?scope.row.taxNum:'--' }}</span>
+                    </template>
+                  </el-table-column>
+                </el-table>
+                <!--                <div class="container normal-panel" style="text-align:right">
+                                  <el-pagination
+                                      background
+                                      @size-change="handleSizeChange"
+                                      @current-change="handleCurrentChange"
+                                      :current-page="currentPage"
+                                      :page-sizes="[5]"
+                                      layout="total,sizes, prev, pager, next, jumper"
+                                      :total="total">
+                                  </el-pagination>
+                                </div>-->
+                <el-button size="mini" type="primary" style="width: 100%" @click="businessSearch" slot="reference" :disabled="form.enterprisename === ''">工商查询</el-button>
+              </el-popover>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="企业简称:" prop="abbreviation">
+                <el-input v-model="form.abbreviation" placeholder="企业简称"></el-input>
+              </el-form-item>
+            </el-col>
+<!--            <el-col :span="24">
+              <el-form-item label="erp编号:" prop="erpagentnum">
+                <el-input v-model="form.erpagentnum" placeholder="请输入erp编号" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>-->
+            <el-col :span="24">
+              <el-form-item label="客户类型:" prop="type">
+                <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
+                  <el-option
+                    v-for="item in customerType()"
+                    :key="item.value"
+                    :label="item.value"
+                    :value="item.value">
+<!--                    <span style="float: left">{{ item.value }}</span>
+                    <span v-if="item.remarks !== ''" style="float: right; color: #8492a6; font-size: 10px">{{ item.remarks }}</span>-->
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="24">
+              <el-form-item label="客户等级:" >
+                <el-select v-model="form.grade" placeholder="请选择客户等级" style="width: 100%">
+                  <el-option
+                      v-for="item in options.customerGrade"
+                      :key="item.rowindex"
+                      :label="item.value "
+                      :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户分类:" >
+                <el-select v-model="form.customergrade" placeholder="请选择客户分类" style="width: 100%">
+                  <el-option
+                      v-for="item in options.customerClassification"
+                      :key="item.rowindex"
+                      :label="item.value "
+                      :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item  label="客户行业:" >
+                <el-select
+                    ref="sle"
+                    style="width:100%;"
+                    v-model="form.industry"
+                    multiple
+                    placeholder="请选择所属行业"
+                    size="mini"
+                >
+                  <el-option
+                      v-for="item in options.industryData"
+                      :key="item.value"
+                      :label="item.value"
+                      :value="item.value"
+                  >
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 12px">{{ item.remarks?item.remarks:'暂无描述' }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="税号:" prop="taxno">
+                <el-input v-model="form.taxno" placeholder="税号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="法人:" prop="contact">
+                <el-input v-model="form.contact" placeholder="请输入法人信息" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="联系电话:" prop="telephone">
+                <el-input v-model="form.telephone" placeholder="请输入联系电话" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="省市县:" prop="province">
+                <el-cascader
+                    style="width: 100%"
+                    v-model="value"
+                    :options="basicData.data().areaData"
+                    @change="cascaderChange" clearable>
+                </el-cascader>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="详细地址:" prop="address">
+                <el-input v-model="form.address" placeholder="详细地址"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="上级企业:" >
+                <el-popover
+                    placement="bottom"
+                    width="700"
+                    trigger="click"
+                    v-model="customerShow"
+                    @show="customerList">
+                  <el-input
+                      style="width:300px;margin-bottom: 10px"
+                      placeholder="请输入内容"
+                      v-model="customerParam.content.where.condition"
+                      clearable
+                      @clear="customerList(customerParam.content.pageNumber = 1)"
+                      size="mini"
+                      @keyup.enter.native="customerList(customerParam.content.pageNumber = 1)">
+                    <i slot="prefix" class="el-icon-search" @click="customerList(customerParam.content.pageNumber = 1)"></i>
+                  </el-input>
+                  <el-table :data="customer.customerData" @row-click="customerData" height="396px" :header-cell-style="{background:'#EEEEEE',color:'#333'}" size="mini">
+                    <el-table-column
+                        label="客户编号"
+                        width="180">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.sa_customersid?scope.row.sa_customersid:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="客户名称"
+                        width="200">
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.enterprisename?scope.row.enterprisename:'--'}}</span>
+                      </template>
+                    </el-table-column>
+                    <el-table-column
+                        label="地址"
+                    >
+                      <template slot-scope="scope">
+                        <span style="margin-left: 10px">{{ scope.row.address?scope.row.address:'--' }}</span>
+                      </template>
+                    </el-table-column>
+                  </el-table>
+                  <div class="container normal-panel" style="text-align:right">
+                    <el-pagination
+                        background
+                        small
+                        @size-change="handleSizeChangeCustomer"
+                        @current-change="handleCurrentChangeCustomer"
+                        :page-sizes="[10,20,50,100,]"
+                        layout="total,sizes, prev, pager, next, jumper"
+                        :current-page="customer.currentPage"
+                        :total="customer.total">
+                    </el-pagination>
+                  </div>
+                  <el-input slot="reference" :readonly="true" v-model="form.superiorenterprisename" autocomplete="off" placeholder="请选择客户"  @input="selectCustomer"></el-input>
+                </el-popover>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="客户来源:" prop="source">
+                <el-input v-model="form.source" placeholder="客户来源"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="公海池:" prop="sa_customerpoolid">
+                <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
+                  <el-option
+                    v-for="item in publicList()"
+                    :key="item.sa_customerpoolid"
+                    :label="item.poolname"
+                    :value="item.sa_customerpoolid">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="fixed__btn__panel">
+        <el-button size="small" @click="onClose" class="normal-btn-width inline-16">取 消</el-button>
+        <duplicateCheck ref="check" :data="form" @onSuccess="onClose" @onCheck="onCheck"></duplicateCheck>
+        <el-button size="small" type="primary" :loading="loading" @click="onSave" class="normal-btn-width">确 定</el-button>
+      </div>
+    </el-drawer>
+  </div>
+</template>
+
+<script>
+import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
+import {mapGetters} from "vuex";
+export default {
+  name: "add",
+  inject:['customerLead','customerType','arealist','publicList'],
+  components:{duplicateCheck},
+  data(){
+    return {
+      dialogFormVisible:false,
+      isordercheck:true,
+      isusedcheck:false,
+      customerShow:false,
+      checkResults:'',
+      businessData:[],
+      businessParam:{
+        "id": 20221208103601,
+        "content": {
+          "pageNumber":1,
+          "pageSize":5,
+          "keyword":''
+        },
+      },
+      businessShow:false,
+      total:0,
+      currentPage:0,
+      options:{
+        industryData:[],
+        customerGrade:[],
+        customerClassification:[],
+      },
+      form:{
+        sa_customersid: 0,//新增是传0
+        parentid: 0, //上级客户ID,默认或没有上级的时候传0
+        sys_enterpriseid: 0, //合作企业档案ID,新增是传0,更新
+        enterprisename:"",//客户名称(企业名称)
+        type: "", //客户类型
+        customergrade:'',//客户等级
+        sa_customerpoolid: '', //客户池(公海池)ID,默认或没有的时候传0
+        source: "", //客户来源
+        province:"",//非必填,可选
+        city:"",//非必填,可选
+        county:"",//非必填,可选
+        address:"",//非必填,可选
+        abbreviation:"",//非必填,可选
+        taxno:"",//税号,非必填,可选
+        grade:'',// 客户等级(商户等级)
+        industry:[],//非必填,可选,所属行业
+        contact:"",//非必填,可选
+        phonenumber:"",//非必填,可选
+        ispublic:1,
+        telephone: "",
+        sa_agentsid: "",
+        erpagentnum:""
+      },
+      value:'',
+      rules:{
+        enterprisename:[
+          { required: true, message: '输入客户名称', trigger: 'blur'},
+        ],
+        type: [
+          { required: true, message: '还未选择客户类型', trigger: 'change' },
+        ],
+        source:[
+          { required: false, message: '请填写客户来源', trigger: 'blur'}
+        ],
+        sa_customerpoolid:[
+          { required: true, message: '请选择公海池', trigger: 'blur'}
+        ],
+        contact: [
+          { required: true, message: '请输入法人', trigger: 'blur' },
+        ],
+        telephone: [
+          { required: true, message: '请输入联系电话', trigger: 'blur' },
+        ],
+        province: [
+          { required: true, message: '请选择省市县', trigger: 'change' },
+        ],
+      },
+      customerParam:{
+        "id": 20220920083901,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 10,
+          "where": {
+            "condition": "",
+            "type":2,
+            "sa_projectid":""
+          }
+        }
+      },
+      customer:{
+        customerData:[],
+        total:0,
+        currentPage:0,
+      },
+    }
+  },
+  computed:{
+    ...mapGetters({
+      loading:'loading'
+    })
+  },
+  methods:{
+    /*工商查询*/
+    async businessSearch(){
+      this.businessParam.content.keyword = this.form.enterprisename
+      const res = await this.$api.requested(this.businessParam)
+      console.log(res,"工商查询结果")
+      this.businessData = res.data
+      this.total = res.total
+      this.currentPage = res.pageNumber
+      this.businessShow = true
+    },
+    /*选择工商信息*/
+    businessSelect(val){
+      console.log("选择的工商信息",val)
+      this.$confirm('是否以查询的工商信息更新客户信息?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.businessShow = false
+        this.form.enterprisename = val.companyName
+        this.form.address = val.address === "-" ? '' : val.address
+        this.form.taxno = val.taxNum
+        this.value = [val.regProvince,val.regCity,val.regArea]
+        this.form.province = val.regProvince
+        this.form.city = val.regCity
+        this.form.county = val.regArea
+        this.form.contact = val.legalPerson
+      }).catch(() => {
+        this.businessShow = false
+        this.$message({
+          type: 'info',
+          message: '已取消更新'
+        });
+      })
+    },
+    /*handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.businessSearch()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.businessSearch()
+    },*/
+    /*查重检查*/
+    onCheck(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$refs.check.queryRule()
+      })
+    },
+    /*自动查重判断*/
+    duplicateCheck(){
+      this.$refs.form.validate(async (valid) => {
+        if (!valid) return false
+        const res = await this.$api.requested({
+          "id": 20221208172002,
+          "content": {
+            "sa_customersid":0,
+            "enterprisename":this.form.enterprisename,
+            "taxno":this.form.taxno,
+            "address":this.form.address
+          },
+        })
+        console.log(res,"查重结果")
+        if (res.data.length !== 0){
+          console.log("重复")
+        }
+        this.checkResults = res.data.length
+        this.onSave()
+      })
+    },
+    onSave(){
+      this.$refs.form.validate((valid) => {
+        if (!valid) return false
+        this.$store.commit('setLoading',true)
+        this.$refs.check.creatShow = true
+        this.$refs.check.queryRule(()=>{
+          this.$store.commit('setLoading',false)
+        })
+      })
+    },
+    onSubmit(){
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false
+        /*if (this.form.province) {
+          this.form.city = this.form.province[1]
+          this.form.county = this.form.province[2]
+          this.form.province = this.form.province[0]
+        }*/
+        const res = await this.$api.requested({
+          "id": "20221010164302",
+          "version":1,
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          if (this.checkResults === 0){
+            this.$emit('onSuccess')
+            this.$refs['form'].resetFields();
+            this.form = {
+              "sa_customersid": 0,//新增是传0
+              "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+              "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+              "enterprisename":"",//客户名称(企业名称)
+              "type": "", //客户类型
+              "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
+              "source": "", //客户来源
+              "province":"",//非必填,可选
+              "city":"",//非必填,可选
+              "county":"",//非必填,可选
+              "address":"",//非必填,可选
+              "abbreviation":"",//非必填,可选
+              "taxno":"",//税号,非必填,可选
+              "grade":'',// 客户等级(商户等级)
+              "industry":"",//非必填,可选,所属行业
+              "contact":"",//非必填,可选
+              "phonenumber":""//非必填,可选
+            }
+            this.dialogFormVisible = false
+            this.checkResults = ''
+            this.value = ''
+          }else {
+            this.setTag(res.data.sa_customersid)
+          }
+
+          /*this.$router.push({path:'/PublicCustomerDetail',query:{id:res.data.sa_customersid,rowindex:0}})
+          this.$store.dispatch('changeDetailDrawer',true)*/
+        })
+      })
+    },
+    async setTag(id){
+      const res = await this.$api.requested({
+        "id": 20220929090901,
+        "content": {
+          "ownertable":"sa_customers",
+          "ownerid":id,
+          "datatag":[
+            "疑似重复",
+          ]
+        }
+      })
+      this.$emit('onSuccess')
+      this.$refs['form'].resetFields();
+      this.form = {
+        "sa_customersid": 0,//新增是传0
+        "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+        "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+        "enterprisename":"",//客户名称(企业名称)
+        "type": "", //客户类型
+        "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
+        "source": "", //客户来源
+        "province":"",//非必填,可选
+        "city":"",//非必填,可选
+        "county":"",//非必填,可选
+        "address":"",//非必填,可选
+        "abbreviation":"",//非必填,可选
+        "taxno":"",//税号,非必填,可选
+        "grade":'',// 客户等级(商户等级)
+        "industry":"",//非必填,可选,所属行业
+        "contact":"",//非必填,可选
+        "phonenumber":""//非必填,可选
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
+      this.value = ''
+    },
+    onClose(){
+      this.$refs['form'].resetFields();
+      this.form = {
+        "sa_customersid": 0,//新增是传0
+        "parentid": 0, //上级客户ID,默认或没有上级的时候传0
+        "sys_enterpriseid": 0, //合作企业档案ID,新增是传0,更新
+        "enterprisename":"",//客户名称(企业名称)
+        "type": "", //客户类型
+        "sa_customerpoolid": '', //客户池(公海池)ID,默认或没有的时候传0
+        "source": "", //客户来源
+        "province":"",//非必填,可选
+        "city":"",//非必填,可选
+        "county":"",//非必填,可选
+        "address":"",//非必填,可选
+        "abbreviation":"",//非必填,可选
+        "taxno":"",//税号,非必填,可选
+        "grade":'',// 客户等级(商户等级)
+        "industry":"",//非必填,可选,所属行业
+        "contact":"",//非必填,可选
+        "phonenumber":""//非必填,可选
+      }
+      this.dialogFormVisible = false
+      this.checkResults = ''
+      this.value = ''
+      this.businessShow = false
+      this.$emit('onSuccess')
+    },
+    cascaderChange (val) {
+      this.form.province = val[0]
+      if (val.length === 1)
+        return this.form = Object.assign({},this.form,{province:val[0],city:'',county:''})
+
+      this.form = Object.assign({},this.form,{province:val[0],city:val[1],county:val[2]})
+      this.$refs.form.validateField('province')
+    },
+    async customerList(){
+      const res = await this.$api.requested(this.customerParam)
+      this.customer.customerData = res.data
+      this.customer.total = res.total
+      this.customer.currentPage = res.pageNumber
+    },
+    selectCustomer(){
+      this.customerParam.content.where.condition = this.form.enterprisename
+      this.customerList()
+    },
+    /*客户选择信息*/
+    customerData(val){
+      this.form.parentid = val.sa_customersid
+      this.form.superiorenterprisename = val.enterprisename
+      this.customerShow = false
+    },
+    /*客户分页*/
+    handleSizeChangeCustomer(val) {
+      // console.log(`每页 ${val} 条`);
+      this.customerParam.content.pageSize = val
+      this.customerList()
+    },
+    handleCurrentChangeCustomer(val) {
+      // console.log(`当前页: ${val}`);
+      this.customerParam.content.pageNumber = val
+      this.customerList()
+    },
+    /*行业列表*/
+    async industryList(){
+      const siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
+      console.log("行业列表")
+      const res = await this.$api.requested({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "industry",
+          "parameter": {
+            "siteid": siteid
+          }
+        }
+      })
+      this.options.industryData = res.data
+    },
+    /*客户分类*/
+    async gradeList(){
+      const siteid = JSON.parse(sessionStorage.getItem('active_account')).siteid
+      const res = await this.$api.requested({
+        "classname": "sysmanage.develop.optiontype.optiontype",
+        "method": "optiontypeselect",
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 20,
+          "typename": "customergrade",
+          "parameter": {
+            "siteid": siteid
+          }
+        }
+      })
+      console.log("客户等级",res.data)
+      /*for (var i=0;i<res.data.length; i++){
+        if (res.data[i].remarks !== ''){
+          this.options.gradeData[i] = res.data[i].value + "——" + res.data[i].remarks
+        }else{
+          this.options.gradeData[i] = res.data[i].value
+        }
+      }*/
+      this.options.customerClassification = res.data
+      console.log("处理后客户等级",this.options.customerClassification)
+    },
+    /*客户等级*/
+    queryCustomerGrade(){
+      this.$store.dispatch('optiontypeselect','agentgrade').then(res=>{
+        this.options.customerGrade = res.data
+      })
+    },
+    checkSuccess(val){
+      this.checkResults = val
+    }
+  },
+  mounted() {
+    this.industryList()
+    this.gradeList()
+    this.queryCustomerGrade()
+  }
+}
+</script>
+
+<style scoped>
+  /deep/.el-select,.el-cascader  {
+    width: 100%;
+  }
+  /deep/.el-input__prefix {
+    display: flex;
+    align-items: center;
+  }
+</style>

+ 35 - 6
src/Form/publicCustomer/edit.vue

@@ -79,7 +79,7 @@
               <el-form-item label="客户类型:" prop="type">
                 <el-select v-model="form.type" placeholder="请选择客户类型" size="small">
                   <el-option
-                      v-for="item in customerType()"
+                      v-for="item in customerType"
                       :key="item.value"
                       :label="item.value"
                       :value="item.value">
@@ -236,7 +236,7 @@
               <el-form-item label="公海池:" prop="sa_customerpoolid">
                 <el-select v-model="form.sa_customerpoolid" placeholder="请选择公海池" size="small">
                   <el-option
-                    v-for="item in publicList()"
+                    v-for="item in publicList"
                     :key="item.sa_customerpoolid"
                     :label="item.poolname"
                     :value="item.sa_customerpoolid">
@@ -261,7 +261,7 @@ import duplicateCheck from "@/components/duplicatesCheck/publicCustomerCheck";
 import {mapGetters} from "vuex";
 export default {
   name: "add",
-  inject:['customerLead','customerType','arealist','publicList'],
+  inject:['arealist'],
   components:{duplicateCheck},
   data(){
     return {
@@ -271,6 +271,9 @@ export default {
       checkResults:'',
       customerShow:false,
       businessData:[],
+      customerLead:[],
+      customerType:[],
+      publicList:[],
       businessParam:{
         "id": 20221208103601,
         "content": {
@@ -364,6 +367,11 @@ export default {
       this.$emit('onSuccess')
     },
     editBtn () {
+      this.industryList()
+      this.gradeList()
+      this.queryCustomerGrade()
+      this.getSysOption()
+      this.getPublicList()
       this.dialogFormVisible = true
      /* let arr = ['province','city','county']
       arr.forEach(e=>{
@@ -589,11 +597,32 @@ export default {
         this.options.customerGrade = res.data
       })
     },
+    /* 获取系统选项数据 */
+    async getSysOption() {
+      /* 获取客户类型 */
+      let res = await this.$store.dispatch('optiontypeselect','customertypemx')
+      this.customerType = res.data
+      /* 获取客户等级 */
+      let res2 = await this.$store.dispatch('optiontypeselect','customergrade')
+      this.customerLead = res2.data
+
+    },
+    /* 获取公海数据 */
+    async getPublicList() {
+      const res = await this.$api.requested({
+        "id": 20221009100702,
+        "content": {
+          "pageNumber": 1,
+          "pageSize": 999999,
+          "where": {
+          }
+        },
+      })
+      this.publicList = res.data
+    },
   },
   mounted() {
-    this.industryList()
-    this.gradeList()
-    this.queryCustomerGrade()
+
   }
 }
 </script>

+ 27 - 1
src/HDrpManagement/ProductMag/modules/productGroup.vue

@@ -15,10 +15,19 @@
             prop="groupname"
             label="商品组名称">
         </el-table-column>
+        <el-table-column
+            prop="isonsale"
+            label="是否上架">
+          <template slot-scope="scope">
+            <span v-if="scope.row.isonsale === 0" style="color: #ff0000">下架</span>
+            <span v-else style="color: #52C41A">上架</span>
+          </template>
+        </el-table-column>
         <el-table-column
             label="操作"
             width="100px">
           <template slot-scope="scope">
+            <el-button type="text" size="mini" class="inline-16" @click="goDetail(scope.row)">详 情</el-button>
             <el-popconfirm
                 title="确定删除该商品组吗?"
                 @confirm="deleteGroup(scope.row)"
@@ -76,6 +85,23 @@ export default {
       this.tool.showMessage(res,()=>{
         this.listData()
       })
+    },
+    goDetail(val){
+      console.log(val)
+      this.$store.dispatch('changeDetailDrawer',false)
+      this.$nextTick(()=>{
+        let route = this.$route
+        if (route.path !== 'productGroupDetail') {
+          this.oldRoute = {path:route.path,query:route.query}
+          this.$store.dispatch('setHistoryRouter',this.oldRoute)
+        }
+
+        this.$router.push({
+          path:'/productGroupDetail',
+          query:{id:val.sa_itemgroupid}
+        })
+        this.$store.dispatch('changeDetailDrawer',true)
+      })
     }
   },
   mounted() {
@@ -89,4 +115,4 @@ export default {
 
 <style scoped>
 
-</style>
+</style>

+ 1 - 1
src/HDrpManagement/projectChange/index.vue

@@ -283,7 +283,7 @@ export default {
       /* 获取项目等级 */
       let res2 = await this.$store.dispatch('optiontypeselect','projectgrade')
       this.projectLead = res2.data
-      console.log(this.projectLead);
+
 
     },
     /** 获取公司数据 */

+ 6 - 2
src/HDrpManagement/projectChange/modules/modules/stageTask/modules/edit.vue

@@ -9,7 +9,7 @@
         direction="rtl"
         append-to-body
         :show-close="false"
-        @close="onClose">
+        >
       <div class="drawer__panel">
         <layoutTable :layout="tablecols" :data="list"  :custom="true" :checkbox="true" @checkboxCallBack="checkboxCallBack">
           <template v-slot:customcol="scope">
@@ -152,7 +152,9 @@ export default {
   },
   methods:{
     onClose(){
-
+      this.drawerEdit = false
+      this.actionnotes = ''
+      this.radioSelect = []
     },
     onSubmit(){
       this.drawer = false
@@ -172,6 +174,8 @@ export default {
       })
       this.tool.showMessage(res,()=>{
         this.drawerEdit = false
+        this.actionnotes = ''
+        this.radioSelect = []
         this.$emit("editSuccess")
       })
     },

+ 93 - 0
src/HManagement/marketing2/saler/area/modules/areaList.vue

@@ -0,0 +1,93 @@
+<template>
+  <div>
+    <el-popover
+        placement="bottom"
+        width="400"
+        trigger="click"
+        v-model="visible">
+      <el-tree
+          :data="areaList"
+          node-key="id"
+          default-expand-all
+          highlight-current
+          :expand-on-click-node="false"
+          @node-click="nodeClick"
+      >
+                  <span class="custom-tree-node" slot-scope="{ node, data }">
+                    <span>{{ node.label }}</span>
+                    <span>
+                      <el-button size="small" type="text" @click="selectArea(data,visible=false)" v-if="data.areaname === pointValue" style="color: #FFFFFF">选 择</el-button>
+                      <el-button size="small" type="text" @click="selectArea(data,visible=false)" v-else >选 择</el-button>
+                    </span>
+                  </span>
+      </el-tree>
+            <el-input slot="reference" v-model="areaname" readonly placeholder="请选择" autocomplete="off" @focus="onClick"></el-input>
+    </el-popover>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "areaList",
+  props:["areaname"],
+  data(){
+    return {
+      areaList:[],
+      visible:false,
+      pointValue:'',
+      param:{
+        classname: "webmanage.sale.salearea.salearea",
+        content: {},
+        method: "query_area"
+      }
+    }
+  },
+  methods:{
+    onClick(){
+      console.log('点击')
+      this.listData()
+    },
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      console.log(res.data,'区域列表')
+      this.areaList = this.createMenu(res.data)
+    },
+    createMenu (array) {
+      var that = this
+      let arr = []
+      function convertToElementTree(node) {
+        // 新节点
+        var elNode = {
+          label: node["areaname"],
+          sa_saleareaid:node['sa_saleareaid'],
+          children: []
+        }
+
+        if (node.subarea && node.subarea.length > 0) {
+          // 如果存在子节点
+          for (var index = 0; index < node.subarea.length; index++) {
+            // 遍历子节点, 把每个子节点看做一颗独立的树, 传入递归构造子树, 并把结果放回到新node的children中
+            elNode.children.push(convertToElementTree(node.subarea[index]));
+          }
+        }
+        return elNode;
+      }
+      array.forEach((element) => {
+        arr.push(convertToElementTree(element))
+      });
+      return arr
+    },
+    nodeClick(val){
+      this.pointValue = val.areaname
+    },
+    selectArea(data){
+      console.log(data,'选择区域')
+      this.$emit('selectArea',data)
+    }
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 28 - 6
src/HManagement/marketing2/salerScope/index.vue

@@ -30,11 +30,11 @@
       </template>
     </areaTree>
     <div class="hm-info-panel">
-      <basicLayout 
-        ref="basicLayout" 
+      <basicLayout
+        ref="basicLayout"
         formPath="marketing2/salerScope"
-        tableName="saleScopeTable" 
-        idName="sa_salearea_salescopeid" 
+        tableName="saleScopeTable"
+        idName="sa_salearea_salescopeid"
         :apiId="{query:20221011144503,del:20221011144403}"
         :autoQuery="false"
         :options="options">
@@ -51,6 +51,13 @@
           </div>
         </template>
         <template v-slot:tbOpreation="scope">
+          <edit :data="scope.data.data" @onSuccess="$refs.basicLayout.listData()" :disabled="scope.data.data.isused === 1"></edit>
+          <el-popconfirm
+              title="确定删除选中的管辖区域吗?"
+              @confirm="onDel(scope.data.data)"
+          >
+            <el-button slot="reference" type="text" size="mini" :disabled="scope.data.data.isused === 1">删 除</el-button>
+          </el-popconfirm>
         </template>
       </basicLayout>
     </div>
@@ -64,6 +71,7 @@ import addAreaParent from './area/modules/add_area_parent'
 import editArea from './area/modules/edit_area'
 import startArea from './area/modules/start_area'
 import delArea from './area/modules/del_area'
+import edit from '@/Form/marketing2/salerScope/edit'
 
 export default {
   components:{
@@ -72,7 +80,8 @@ export default {
     editArea,
     delArea,
     startArea,
-    addAreaParent
+    addAreaParent,
+    edit
   },
   data () {
     return {
@@ -102,6 +111,19 @@ export default {
     },
     onStartArea (status) {
       status === 1?this.areaInfo.isused = 0:this.areaInfo.isused = 1
+    },
+    async onDel(val){
+      console.log(val,'删除的管辖区域')
+      const res = await this.$api.requested({
+        "classname": "webmanage.sale.saleareascope.saleareascope",
+        "method": "delete_areascope",
+        "content": {
+          "sa_salearea_salescopeids":[val.sa_salearea_salescopeid]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$refs.basicLayout.listData()
+      })
     }
   }
 }
@@ -119,4 +141,4 @@ export default {
   height:calc(100vh - 100px);
   overflow-y:scroll
 }
-</style>
+</style>

+ 1 - 0
src/SDrpManagement/salerOrder/modules/productlist.vue

@@ -385,6 +385,7 @@ export default {
     canUseInput () {
       if (this.data.saler && this.data.saler.length === 0) return false
       let salerIsEditPrice = this.data.saler?this.data.saler[0].iseditprice:0
+      console.log(salerIsEditPrice)
       if (this.data.type === '标准订单' && salerIsEditPrice && this.data.status === '新建') {
         return true
       } else {

+ 3 - 3
src/components/selectMenber/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-input v-model="value.name" readonly placeholder="选择对象人员" suffix-icon="el-icon-arrow-down" autocomplete="off" @focus="dialogTableVisible = true"></el-input>
+    <el-input v-model="value.name" readonly placeholder="选择对象人员" suffix-icon="el-icon-arrow-down" autocomplete="off" @focus="dialogTableVisible = true" :disabled="disabled"></el-input>
     <el-dialog title="选择人员" append-to-body :visible.sync="dialogTableVisible" width="80%">
       <div class="flex">
         <dep-list ref="list" style="width:200px" @onClick="onClick">
@@ -23,7 +23,7 @@
 import depList from './modules/dep_list.vue'
 import staffList from './staff/list/list.vue'
 export default {
-  props:['reporthrname'],
+  props:['reporthrname',"disabled"],
   components:{
     depList,
     staffList,
@@ -72,4 +72,4 @@ export default {
 .flex{
   display: flex;
 }
-</style>
+</style>

+ 4 - 2
src/views/mediaStatistics/index.vue

@@ -2,11 +2,13 @@
   <div class="container normal-panel">
     <el-row :gutter="20">
       <el-col :span="12">
-        <storageCapacity></storageCapacity>
+        <storageCapacity ></storageCapacity>
       </el-col>
       <el-col :span="12" style="margin-bottom:42px">
         <downloadTraffic></downloadTraffic>
       </el-col>
+    </el-row>
+    <el-row>
       <el-col :span="12">
         <fileTypeProportion></fileTypeProportion>
       </el-col>
@@ -37,4 +39,4 @@ export default {
 
 </script>
 <style>
-</style>
+</style>

+ 5 - 5
src/views/mediaStatistics/modules/storageCapacity.vue

@@ -1,6 +1,6 @@
 // 存储容量
 <template>
-  <div>
+  <div >
     <div class="flex-align-center flex-between">
       <p class="title">存储量(MB)</p>
       <el-radio-group v-model="radio" size="small" @change="getLineChartOfStorage">
@@ -9,7 +9,7 @@
         <!-- <el-radio-button :label="3">日</el-radio-button> -->
       </el-radio-group>
     </div>
-    <div id="container">
+    <div id="container_storage" >
 
     </div>
   </div>
@@ -27,7 +27,7 @@ export default {
   },
   methods:{
     renderLine () {
-      this.chartLine = new Line('container', {
+      this.chartLine = new Line('container_storage', {
         data:[],
         xField: 'time',
         yField: 'bytes',
@@ -60,7 +60,7 @@ export default {
             lineWidth: 2,
           },
         },
-        tooltip: { 
+        tooltip: {
           showMarkers: false,
           formatter: (datum) => {
             let fre = ''
@@ -121,4 +121,4 @@ export default {
   border-left: .3rem solid #3874F6;
 }
 
-</style>
+</style>

+ 7 - 1
src/views/message/components/list.vue

@@ -4,7 +4,13 @@
       <div class="item">
         <div class="left">
           <p class="title">{{item.title}}</p>
-          <p class="message">{{item.message}}</p>
+<!--          <p class="message">{{item.message}}</p>-->
+          <p class="message">
+            <span v-for="(e,index) in item.message">
+              <span v-if="index === item.message.length -1">{{e}}</span>
+              <span v-else>{{e + ';'}}<br></span>
+            </span>
+          </p>
           <div class="info">
             <div class="tag">{{`${item.type}消息`}}</div>
             <p class="time">{{item.createdate}}</p>

+ 30 - 17
src/views/message/index.vue

@@ -27,7 +27,13 @@
             <span>发布于:{{message.createdate}} | {{message.name || message.type}}</span>
           </p>
           <div class="content-txt">
-            <p class="txt">{{message.message}}</p>
+<!--            <p class="txt">{{message.message}}</p>-->
+            <p class="txt">
+              <span v-for="(item,index) in message.message">
+              <span v-if="index === message.message.length -1">{{item}}</span>
+              <span v-else>{{item + ';'}}<br></span>
+            </span>
+            </p>
             <p class="link" @click="goDetail" v-if="currentItem == 1 && message.link">请前往 {{message.title}}>></p>
           </div>
         </div>
@@ -82,8 +88,9 @@ export default {
       })
       this.list = res.data
 
-      console.log(this.list);
-
+      this.list.forEach(item=>{
+        item.message = item.message.split(";")
+      })
       if(this.list[0]) this.messageItemClick(this.list[0])
       this.total = res.total
     },
@@ -99,28 +106,28 @@ export default {
     },
     async messageItemClick(data) {
       let res = await this.$api.requested({
-        "classname": "system.message.Message",
-        "method": "readMessage",
-        "content": {
-            "nocache":true,
-            "messageid":data.messageid
-        }
-      })
+      "classname":"system.message.Message",
+      "method":"readMessage",
+      "content":{
+              "nocache":true,
+              "messageid":data.messageid
+            }
+        })
       data.isread = 1
       res.data.name = data.name
       res.data.link = data.link
       res.data.modules = data.modules
       this.message = res.data
-      console.log(this.message);
+      this.message.message = this.message.message.split(";")
     },
     async allRead() {
       if(!this.isAllClick) return
       let res = await this.$api.requested({
-        "classname": "system.message.Message",
-        "method": "readAllMessage",
-        "content": {
-            "nocache":true,
-        }
+      "classname":"system.message.Message",
+      "method":"readAllMessage",
+      "content":{
+              "nocache":true,
+      }
       })
       this.tool.showMessage(res,() => {
         this.list.forEach(item => {
@@ -135,10 +142,16 @@ export default {
     //跳转到消息具体页面
     goDetail() {
       sessionStorage.setItem('active_modules',JSON.stringify(this.message.modules))
-      this.$router.push(this.message.link.listPath)
+      console.log(this.message.link)
+     /* this.$router.push(this.message.link.listPath)*/
       if (this.message.link.detail) {
         setTimeout(() => {
           this.$store.dispatch('changeDetailDrawer',true)
+          let route = this.$route
+          if (route.path !== this.message.link.detail.slice(0)) {
+            this.oldRoute = {path:route.path,query:route.query}
+            this.$store.dispatch('setHistoryRouter',this.oldRoute)
+          }
           this.$router.push({
             path:this.message.link.detail,
             query:{