970319330@qq.com 1 месяц назад
Родитель
Сommit
4d4c8db3fd

+ 9 - 0
src/Form/EnterpriseArchives/add.vue

@@ -37,6 +37,14 @@
                 @businessData="businessSelect"
               ></businessInquiry>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`企业简称`)" prop="abbreviation">
+                <el-input
+                  v-model="form.abbreviation"
+                  :placeholder="$t(`输入企业简称`)"
+                ></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="12">
               <el-form-item :label="$t('联系人')" prop="contact">
                 <el-input
@@ -213,6 +221,7 @@ export default {
         phonenumber: "",
         sys_enterpriseid: 0,
         enterprisename: "",
+        abbreviation: "",
         province: "",
         contact: "",
         taxno: "",

+ 6 - 0
src/Form/EnterpriseArchives/edit.vue

@@ -14,6 +14,11 @@
               <businessInquiry ref="businessRef" :keyword="form.enterprisename"
                                @businessData="businessSelect"></businessInquiry>
             </el-col>
+            <el-col :span="24">
+              <el-form-item :label="$t(`企业简称`)" prop="abbreviation">
+                <el-input v-model="form.abbreviation" :placeholder="$t(`输入企业简称`)"></el-input>
+              </el-form-item>
+            </el-col>
             <el-col :span="12">
               <el-form-item :label="$t('联系人')" prop="contact">
                 <el-input v-model="form.contact" :placeholder="$t(`输入企业联系人`)"></el-input>
@@ -136,6 +141,7 @@ export default {
         "phonenumber": "",
         "sys_enterpriseid": 0,
         "enterprisename": "",
+        "abbreviation": "",
         "province": "",
         "contact": "",
         "taxno": "",

+ 12 - 2
src/Form/marketing2/agent/add.vue

@@ -13,6 +13,11 @@
               <enterprise ref="ent" @rowClick="chooseEnterprise" type="3"></enterprise>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t(`企业简称`)+':'">
+              <el-input v-model="form.abbreviation"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item :label="$t('省市县')+':'">
 <!--              <p class="enterpriseText">{{enterprise.province?enterprise.province:''}}</p>-->
@@ -237,6 +242,7 @@ export default {
       visible:false,
       form:{
         "enterprisename": "",
+        "abbreviation": "",
         "sa_agentsid": '',
         "parentid": "",
         "agentnum": "",
@@ -266,7 +272,9 @@ export default {
       agent_level:[],
       arealist:[],
       agent_type:[],
-      enterprise:{},
+      enterprise:{
+        abbreviation:""
+      },
       timer:0
     }
   },
@@ -417,6 +425,7 @@ export default {
       }
       this.visible = false
       this.form.enterprisename = item.enterprisename
+      this.form.abbreviation = item.abbreviation
       this.form.sys_enterpriseid = item.sys_enterpriseid
       item.province = `${item.province}-${item.city}-${item.county}`
       this.enterprise = item
@@ -434,6 +443,7 @@ export default {
       this.$refs['ent'].form = {}
       this.form = {
         "enterprisename": "",
+        "abbreviation": "",
         "sa_agentsid": '',
         "parentid": "",
         "agentnum": "",
@@ -455,7 +465,7 @@ export default {
         "saleclassauth": 1, //是否需要经营授权,默认1
         "standardsauth":0
       }
-      this.enterprise = {}
+      this.enterprise = {abbreviation: ""}
       this.$refs.agent.enterprisename = ''
       this.$refs.ent.params.content.where.condition = ''
       this.$refs.ent.params.content.pageNumber = 1

+ 6 - 0
src/Form/marketing2/agent/edit.vue

@@ -14,6 +14,11 @@
               <el-input v-model="enterprise.enterprisename" disabled></el-input>
             </el-form-item>
           </el-col>
+          <el-col :span="12">
+            <el-form-item :label="$t(`企业简称`)+':'">
+              <el-input v-model="form.abbreviation" :placeholder="$t(`输入企业简称`)"></el-input>
+            </el-form-item>
+          </el-col>
           <el-col :span="12">
             <el-form-item :label="$t('省市县')+':'">
 <!--              <p class="enterpriseText">{{enterprise.province?enterprise.province:''}}</p>-->
@@ -234,6 +239,7 @@ export default {
       visible:false,
       form:{
         "enterprisename": "",
+        "abbreviation": "",
         "sa_agentsid": '',
         "parentid": "",
         "agentnum": "",

+ 4 - 0
src/HManagement/EnterpriseArchives/modules/details.vue

@@ -69,6 +69,10 @@ export default {
           label:this.$t('企业名称'),
           value: this.mainData.enterprisename
         },
+        {
+          label:this.$t('企业简称'),
+          value: this.mainData.abbreviation
+        },
         {
           label:this.$t('企业编号'),
           value: this.mainData.sys_enterpriseid

+ 18 - 3
src/HManagement/marketing2/agent/details/index.vue

@@ -1,4 +1,5 @@
 <template>
+  <div>
   <basicDetails
     style="min-width:80vw"
     ref="details"
@@ -10,7 +11,7 @@
     idname="sa_agentsid"
     ownertable="sa_agents"
     :tags="[]"
-    :tabs="[$t('合作伙伴团队'),$t('授权营销类别'),$t('授权领域'),$t('授权标准'),$t('账户余额查询'),$t('地址管理'),$t('财务信息'),$t('银行卡信息'),$t('关联合同'),$t('联系人管理'),$t('业绩目标'),$t('代理区域')]"
+    :tabs="[$t('合作伙伴团队'),$t('授权营销类别'),$t('授权领域'),$t('授权标准'),$t('账户余额查询'),$t('地址管理'),$t('财务信息'),$t('银行卡信息'),$t('关联合同'),$t('联系人管理'),$t('业绩目标'),$t('代理区域'),$t('服务区域')]"
     @pageChange="pageChange"
     @onEditSuccess="queryMainData($route.query.id)">
     <div slot="tags">
@@ -55,6 +56,7 @@
           delType="合作伙伴"
           v-if="mainData.status == '禁用' && tool.checkAuth($route.name,'delete')"
         />
+        <el-button v-if="tool.checkAuth($route.name,'constructionLog')" size="small" type="primary" @click="$refs.constLog.openDrawer()" class="inline-16">{{ $t('施工日志模板') }}</el-button>
     </div>
     <div slot="slot0">
       <el-button v-if="tool.checkAuth($route.name,'agentTeamTable')" size="small" type="primary" @click="createAgentAccount" class="normal-margin">{{ $t('创建团队账号') }}</el-button>
@@ -116,11 +118,17 @@
     <div slot="slot11">
       <salescope :data="mainData"></salescope>
     </div>
+    <div slot="slot12">
+      <servicearea :data="mainData"></servicearea>
+    </div>
   </basicDetails>
+  <constructionLog ref="constLog" :data="mainData"></constructionLog>
+  </div>
 </template>
 
 <script>
 import salescope from './modules/salescope/list'
+import servicearea from './modules/servicearea/list'
 import SaleClass from './modules/saleclass/index'
 import accountMoney from './modules/accountMoney/index'
 import agentAddress from './modules/address/list'
@@ -133,6 +141,7 @@ import bankInfo from './modules/bankInfo/index'
 import addBank from './modules/bankInfo/add'
 import editBank from './modules/bankInfo/edit'
 import areaBase from './modules/areaBase/index'
+import constructionLog from './modules/constructionLog/index'
 export default {
   data () {
     return {
@@ -159,7 +168,9 @@ export default {
     bankInfo,
     addBank,
     editBank,
-    areaBase
+    areaBase,
+    servicearea,
+    constructionLog
   },
   methods:{
     async queryMainData (id) {
@@ -201,6 +212,10 @@ export default {
           label:this.$t('erp编号'),
           value: this.mainData.erpagentnum
         },
+        {
+          label:this.$t('企业简称'),
+          value: this.mainData.abbreviation
+        },
         // {
         //   label:this.$t('合作伙伴编号')'是否服务经销商',
         //   value: this.mainData.isservice?this.$t('是'):this.$t('否')
@@ -352,7 +367,7 @@ export default {
           message: this.$t('取消创建')
         });
       });
-    }
+    },
   },
   mounted () {
     this.queryMainData(this.$route.query.id)

+ 168 - 0
src/HManagement/marketing2/agent/details/modules/constructionLog/index.vue

@@ -0,0 +1,168 @@
+<template>
+  <el-drawer
+    :title="$t('施工日志模板设置')"
+    :visible.sync="drawerVisible"
+    size="600px"
+    append-to-body
+    :before-close="handleClose">
+    <div style="padding: 20px">
+      <!-- 企业 Logo -->
+      <div class="construction-card" shadow="never">
+        <div slot="header" class="card-header">
+          <span>{{ $t('企业 Logo') }}</span>
+        </div>
+        <div class="logo-section">
+          <template v-if="logoList.length > 0">
+            <div class="logo-preview">
+              <el-button
+                type="danger"
+                size="mini"
+                circle
+                icon="el-icon-delete"
+                class="delete-btn"
+                @click="deleteLogo"
+              ></el-button>
+              <img :src="logoList[0].url" style="max-width: 300px; max-height: 200px; border-radius: 4px;" />
+            </div>
+          </template>
+          <template v-else>
+            <uploadFile
+              :folderid="folderid"
+              accept=".JPG,.PNG,.jpg,.png"
+              btntype="image"
+              :bindData="{ownertable:'sys_enterprise', ownerid:enterpriseId, usetype:'constructionlogo'}"
+              @onSuccess="logoUploadSuccess"
+            ></uploadFile>
+          </template>
+          <p class="hint">{{ $t('建议上传图片大小 1024x1024px,大小不超过 2M,格式为 JPG/PNG') }}</p>
+        </div>
+      </div>
+
+      <!-- 结束语模版 -->
+      <div class="construction-card" shadow="never">
+        <div slot="header" class="card-header">
+          <span>{{ $t('结束语模版') }}</span>
+        </div>
+        <Editor ref="editor" :id="editorId" :content="closingStatement" height="300px"></Editor>
+      </div>
+
+      <!-- 保存 -->
+      <div style="text-align: center; margin-top: 20px">
+        <el-button type="primary" @click="save" :loading="saving">{{ $t('保存') }}</el-button>
+      </div>
+    </div>
+  </el-drawer>
+</template>
+
+<script>
+import uploadFile from '@/components/upload/hw_obs_upload.vue'
+import Editor from '@/components/my-editor/Editor.vue'
+
+export default {
+  components: { uploadFile, Editor },
+  props: ['data'],
+  data() {
+    return {
+      drawerVisible: false,
+      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      enterpriseId: '',
+      logoList: [],
+      closingStatement: '',
+      editorId: 'construction-log-editor-' + Date.now(),
+      saving: false
+    }
+  },
+  methods: {
+    openDrawer() {
+      this.drawerVisible = true
+      this.enterpriseId = this.data.sys_enterpriseid
+      this.closingStatement = this.data.construction_log_template || ''
+      this.queryLogoAttachment()
+    },
+    handleClose(done) {
+      this.drawerVisible = false
+    },
+    async queryLogoAttachment() {
+      this.enterpriseId = this.data.sys_enterpriseid
+      if (!this.enterpriseId) return
+      const res = await this.$api.requested({
+        classname: 'system.attachment.Attachment',
+        method: 'queryFileLink',
+        content: {
+          ownertable: 'sys_enterprise',
+          ownerid: this.enterpriseId,
+          usetype: 'constructionlogo'
+        }
+      })
+      if (res.data && res.data.length > 0) {
+        this.logoList = res.data
+      }
+    },
+    async logoUploadSuccess() {
+      await this.queryLogoAttachment()
+    },
+    async deleteLogo() {
+      if (this.logoList.length === 0) return
+      const res = await this.$api.requested({
+        classname: 'system.attachment.Attachment',
+        method: 'deleteFileLink',
+        content: {
+          linksids: [this.logoList[0].linksid]
+        }
+      })
+      if (res.code === 1) {
+        this.logoList = []
+        this.$message.success(this.$t('删除成功'))
+      }
+    },
+    async save() {
+      this.saving = true
+      let editorContent = ''
+      if (this.$refs.editor) {
+        editorContent = this.$refs.editor.html || ''
+      }
+      const res = await this.$api.requested({
+        id: 2026051116180002,
+        content: {
+          sa_agentsid: this.$route.query.id,
+          construction_log_template: editorContent
+        }
+      })
+      this.saving = false
+      this.tool.showMessage(res, () => {
+        this.$message.success(this.$t('保存成功'))
+        this.drawerVisible = false
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.construction-card {
+  margin-bottom: 0;
+}
+.card-header {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+}
+.logo-section {
+  padding: 10px 0;
+}
+.logo-preview {
+  position: relative;
+  display: inline-block;
+}
+.delete-btn {
+  position: absolute;
+  top: -10px;
+  right: -10px;
+  z-index: 1;
+}
+.hint {
+  color: #999;
+  font-size: 12px;
+  margin-top: 10px;
+}
+</style>

+ 65 - 0
src/HManagement/marketing2/agent/details/modules/servicearea/list.vue

@@ -0,0 +1,65 @@
+<template>
+  <div>
+    <add class="normal-margin" @onSuccess="onSuccess"></add>
+    <el-table
+      :data="list"
+      style="width: 100%"
+      size="small"
+      border>
+      <el-table-column
+        prop="province"
+        :label="$t('省')">
+      </el-table-column>
+      <el-table-column
+        prop="city"
+        :label="$t('市')">
+      </el-table-column>
+      <el-table-column
+        prop="county"
+        :label="$t('区/县')">
+      </el-table-column>
+      <el-table-column
+        :label="$t('操作')"
+        width="100">
+        <template slot-scope="scope">
+          <ondel :data="scope.row" @onSuccess="onSuccess"></ondel>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import add from './modules/add.vue'
+import ondel from './modules/del.vue'
+
+export default {
+  props:['data','detail'],
+  data () {
+    return {
+      list:[]
+    }
+  },
+  components:{
+    add,
+    ondel
+  },
+  methods:{
+    async query_servicearea () {
+      const res = await this.$api.requested({
+        "id": 2026051115162902,
+        "content": {
+          "sa_agentsid": this.$route.query.id
+        }
+      })
+      this.list = res.data
+    },
+    onSuccess () {
+      this.query_servicearea()
+    }
+  },
+  mounted () {
+    this.query_servicearea()
+  }
+}
+</script>

+ 73 - 0
src/HManagement/marketing2/agent/details/modules/servicearea/modules/add.vue

@@ -0,0 +1,73 @@
+<template>
+  <div>
+    <el-button size="small" type="primary" @click="query_arealist(dialogVisible = true)">{{$t('新 建')}}</el-button>
+    <el-dialog :title="$t('新建服务区域')" append-to-body :visible.sync="dialogVisible" width="400px">
+      <el-cascader :placeholder="$t('请选择')"
+        style="width:100%"
+        class="width-240"
+        v-model="value"
+        :options="arealist"
+        size="small"
+        :props="{ checkStrictly: true }"
+        @change="cascaderChange">
+      </el-cascader>
+      <div slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="primary" @click="submit()">{{$t('确 定')}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['data'],
+  data () {
+    return {
+      dialogVisible:false,
+      value:[],
+      arealist:[]
+    }
+  },
+  methods:{
+    async query_arealist() {
+      this.value = []
+      const res = await this.$api.requested({
+        "classname": "system.tools",
+        "method": "query_arealist",
+        "content": {
+        }
+      })
+      this.arealist = this.tool.createMenu(res.data)
+    },
+    cascaderChange (val) {
+      console.log(val)
+    },
+    async submit () {
+      if(this.value.length === 0) return this.$message({
+        message:this.$t('请选择省份'),
+        type:'warning'
+      })
+      const res = await this.$api.requested({
+        "id": 2026051115141802,
+        "content": {
+            "sa_agentsid": this.$route.query.id,
+            "province": this.value[0],
+            "city": this.value[1]?this.value[1]:'',
+            "county": this.value[2]?this.value[2]:''
+        }
+      })
+
+      this.tool.showMessage(res,()=>{
+        this.dialogVisible = false
+        this.$emit('onSuccess')
+      })
+    }
+  }
+}
+</script>
+<style scoped>
+/deep/.el-dialog__body {
+  padding-bottom: 0;
+}
+</style>

+ 29 - 0
src/HManagement/marketing2/agent/details/modules/servicearea/modules/del.vue

@@ -0,0 +1,29 @@
+<template>
+  <div class="inline-16">
+    <el-popconfirm :confirm-button-text="$t('确定')" :cancel-button-text="$t('取消')"
+      :title="$t('确定删除吗')+'?'"
+      @confirm="deleteRow">
+      <el-button size="small" type="text" slot="reference">{{$t('删 除')}}</el-button>
+    </el-popconfirm>
+  </div>
+</template>
+
+<script>
+export default {
+  props:['data'],
+  methods:{
+    deleteRow () {
+      this.$api.requested({
+        "id": 2026051115161102,
+        "content": {
+          "sa_agents_serviceareaid": this.data.sa_agents_serviceareaid
+        }
+      }).then(res=>{
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+        })
+      })
+    },
+  }
+}
+</script>

+ 24 - 21
src/HManagement/serviceDataScreen/components/PieCharts.vue

@@ -32,28 +32,29 @@ export default {
     }
   },
   methods:{
-    async typeInit(init,title){
-      if (this.title == '项目跟进情况' || title == '项目跟进情况'){
+    async typeInit(init, title) {
+      if (this.title == '项目跟进情况' || title == '项目跟进情况') {
         this.param.id = 20231019085304
-      }else if (this.title == '项目类型分析' || title == '项目类型分析'){
+      } else if (this.title == '项目类型分析' || title == '项目类型分析') {
         this.param.id = 20231018140404
-      }else if (this.title == '客户跟进情况' || title == '客户跟进情况'){
+      } else if (this.title == '客户跟进情况' || title == '客户跟进情况') {
         this.param.id = 20231017151304
       }
       let res = await this.$api.requested(this.param)
       this.mapData = res.data
-      console.log('项目类型数据',this.mapData)
       if (init) {
+        // 异步返回后组件可能已被销毁,ref 不可用时跳过
+        if (!this.$refs.typeEl) return
         this.typeMap = new Pie(this.$refs.typeEl, {
           appendPadding: 10,
-          data:this.mapData,
+          data: this.mapData,
           angleField: 'ratio',
           colorField: 'key',
           radius: 1,
           innerRadius: 0.79,
-          label:{
-            style:{
-              fill:'#CFDCE5'
+          label: {
+            style: {
+              fill: '#CFDCE5'
             },
             /*type: 'inner',
             offset: '-50%',
@@ -63,7 +64,7 @@ export default {
             autoRotate: false,*/
             formatter: (datum) => `${datum.ratio}%`
           },
-          tooltip:{
+          tooltip: {
             formatter: (datum) => {
               return { name: datum.key, value: datum.ratio + '%' };
             },
@@ -72,10 +73,10 @@ export default {
             title: {
               offsetY: -4,
               style: {
-                fontSize:'0.833vw',
-                color:'#E6F4FF'
+                fontSize: '0.833vw',
+                color: '#E6F4FF'
               },
-              content:this.title == '客户跟进情况' || title == '客户跟进情况'?'客户总数':'项目总数'
+              content: this.title == '客户跟进情况' || title == '客户跟进情况' ? '客户总数' : '项目总数'
             },
             content: {
               offsetY: 4,
@@ -83,8 +84,8 @@ export default {
                 whiteSpace: 'pre-wrap',
                 overflow: 'hidden',
                 textOverflow: 'ellipsis',
-                fontSize:'0.833vw',
-                color:'#FFFFFF'
+                fontSize: '0.833vw',
+                color: '#FFFFFF'
               },
               customHtml: (container, view, datum, data) => {
                 const text = data[0].totalqty
@@ -93,13 +94,13 @@ export default {
             },
           },
           legend: {
-            position:'top',
-            itemName:{
-              style:{
-                fill:'#CFDCE5'
+            position: 'top',
+            itemName: {
+              style: {
+                fill: '#CFDCE5'
               }
             },
-            pageNavigator:{
+            pageNavigator: {
               marker: {
                 style: {
                   // 非激活,不可点击态时的填充色设置
@@ -125,10 +126,12 @@ export default {
             }
           },
           // 添加 中心统计文本 交互
-          interactions: [{ type: 'element-single-selected' },{ type: 'element-active' }],
+          interactions: [{ type: 'element-single-selected' }, { type: 'element-active' }],
         });
         this.typeMap.render();
       } else {
+        // 图表未初始化时跳过更新
+        if (!this.typeMap) return
         this.typeMap.changeData(this.mapData)
       }
     }

+ 1 - 0
src/HManagement/siteManage/advertisement_mag/modules/setting.vue

@@ -198,6 +198,7 @@ export default {
       })
     },
     async selectApp () {
+      if (!this.param) return
       this.param.content.parameter.condition = `%%`
       const res = await this.$api.requested(this.param)
       this.applist = res.data

Разница между файлами не показана из-за своего большого размера
+ 181 - 0
src/HManagement/siteManage/securityConfig/index.vue


+ 70 - 0
src/HManagement/siteManage/securityConfig/modules/bgjWarrantyPeriod.vue

@@ -0,0 +1,70 @@
+<template>
+  <div>
+    <el-button size="small" style="width:120px" type="primary" @click="openDialog">{{ $t('设 置') }}</el-button>
+    <el-dialog :title="$t(`班管家质保卡年限设置`)" append-to-body :visible.sync="dialogVisible" width="520px">
+      <el-row :gutter="16" style="text-align: center">
+        <el-col :span="24" style="margin-top: 20px">
+          <span class="required-field">{{ $t('质保卡年限') }}</span>
+          <el-input-number
+            v-model="bgj_warranty_period"
+            :min="1"
+            :max="99"
+            :step="1"
+            :step-strictly="true"
+            controls-position="right"
+            style="width: 200px; margin-left: 12px"
+          ></el-input-number>
+          <span style="margin-left: 8px; color: #8C8C8C">{{ $t('年') }}</span>
+        </el-col>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false" class="normal-btn-width">{{$t('取 消')}}</el-button>
+        <el-button size="small" type="warning" class="normal-btn-width btn-warning" @click="onSubmit">{{$t('确 定')}}</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "bgjWarrantyPeriod",
+  props:["data"],
+  data(){
+    return {
+      dialogVisible:false,
+      bgj_warranty_period:10
+    }
+  },
+  methods:{
+    openDialog(){
+      this.dialogVisible = true
+      this.bgj_warranty_period = this.data.bgj_warranty_period || 10
+    },
+    async onSubmit(){
+      if (!this.bgj_warranty_period && this.bgj_warranty_period !== 0) {
+        this.tool.showMessage({status:false,msg:this.$t('请填写质保卡年限')})
+        return
+      }
+      const res = await this.$api.requested({
+        "classname": "webmanage.site.site",
+        "method":"updateSite_Parameter",
+        "content": {
+          "bgj_warranty_period":this.bgj_warranty_period
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.$emit('queryRule')
+        this.dialogVisible = false
+      })
+    }
+  }
+}
+</script>
+
+<style scoped>
+.required-field::before {
+  content: '*';
+  color: #FF0000;
+  margin-right: 4px;
+}
+</style>

Некоторые файлы не были показаны из-за большого количества измененных файлов