qymljy 2 years ago
parent
commit
b292daabe9

+ 2 - 0
src/HManagement/clueManage/clue_public/modules/detail.vue

@@ -273,6 +273,8 @@ export default {
           {label:'最近编辑人',value:this.mainData.editBy},
           {label:'最近编辑时间',value:this.mainData.editDate},
           {label:'转化次数',value:this.mainData.isproject === 0 && this.mainData.iscustomer === 0?'0':this.mainData.isproject + this.mainData.iscustomer },
+          {label:'无效原因',value:this.mainData.invalidreason},
+          {label:'作废原因',value:this.mainData.deletereason},
         ]
       }
     },

+ 5 - 3
src/HManagement/siteManage/securityConfig/index.vue

@@ -1,8 +1,9 @@
 <template>
-  <div>
-    <div class="container normal-panel" style="padding-bottom:0">
+  <normalLayout >
+  <div slot="content">
+<!--    <div class="container normal-panel" style="padding-bottom:0">
       <el-descriptions title="企业设置"></el-descriptions>
-    </div>
+    </div>-->
     <basicInfo @onSuccess="infoData"></basicInfo>
     <!--消息提示设置-->
     <messageTips/>
@@ -53,6 +54,7 @@
       <advertisementMag />
     </div>
   </div>
+  </normalLayout>
 </template>
 
 <script>

+ 36 - 3
src/HManagement/siteManage/securityConfig/modules/basicinfo.vue

@@ -2,8 +2,9 @@
   <div class="container normal-panel normal-margin panel" style="display:flex">
     <div>
       <el-descriptions>
-          <el-descriptions-item label="企业名称">{{siteinfo.enterprisename?siteinfo.enterprisename:'--'}}</el-descriptions-item>
-          <el-descriptions-item label="企业简称">{{siteinfo.sitename}}</el-descriptions-item>
+          <el-descriptions-item label="企业名称">{{enterprise.enterprisename?enterprise.enterprisename:'--'}}</el-descriptions-item>
+          <el-descriptions-item label="企业简称">{{enterprise.abbreviation}}</el-descriptions-item>
+        <el-descriptions-item label="法人">{{enterprise.contact}}</el-descriptions-item>
           <!-- <el-descriptions-item label="企业互联ID">苏州市</el-descriptions-item> -->
       </el-descriptions>
       <el-descriptions direction="vertical">
@@ -25,7 +26,22 @@
         </el-descriptions-item> -->
       </el-descriptions>
     </div>
-    <edit v-if="tool.checkAuth($route.name,'update')" :basicInfo="siteinfo" v-on="$listeners"></edit>
+<!--    <edit v-if="tool.checkAuth($route.name,'update')" :basicInfo="siteinfo" v-on="$listeners"></edit>-->
+    <el-button  :disabled="!tool.checkAuth($route.name,'update')" icon="el-icon-edit" size="small" type="primary" style="width:120px;height: 30px"
+                @click="$store.dispatch('changeDetailDrawer',true),$router.push({path:'/enterpriseDetail',query:{basicInfo:siteinfo}})">编 辑</el-button>
+    <!--抽屉面板-->
+    <el-drawer
+        title="我是标题"
+        :visible.sync="drawer"
+        :with-header="false"
+        direction="rtl"
+        size="90%"
+        append-to-body
+        @close="closeDrawer">
+      <div class="detail__panel">
+        <router-view/>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -36,6 +52,8 @@ import edit from './edit.vue'
 export default {
   data () {
     return {
+      enterprise:{},
+      drawer:false
     }
   },
   components:{edit},
@@ -45,9 +63,24 @@ export default {
     })
   },
   methods:{
+    async enterpriseData(){
+      const res = await this.$api.requested({
+        "id": 20221022165203,
+        "content": {
 
+        }
+      })
+      console.log(res,"企业信息")
+      this.enterprise = res.data
+    },
+    closeDrawer () {
+     /* this.$router.push('/security_config')
+      this.$store.dispatch('DrawerShowChange',false)*/
+      this.drawer = false
+    },
   },
   mounted () {
+    this.enterpriseData()
   }
 }
 

+ 55 - 36
src/HManagement/siteManage/securityConfig/modules/edit.vue

@@ -1,39 +1,28 @@
 <template>
-  <div>
-    <el-button icon="el-icon-edit" size="small" type="primary" style="width:120px" @click="onShow">编 辑</el-button>
-    <el-dialog append-to-body title="编辑" :visible.sync="dialogEditVisible">
-      <el-row :gutter="16">
-        <el-form  :model="form" :rules="rules" ref="form" size="small" inline class="demo-ruleForm">
-          <el-col :span="12">
-            <el-form-item label="企业名称" prop="enterprisename">
-              <el-input class="normal_input-width" v-model="form.enterprisename" placeholder="请输入企业名称"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="企业简称" prop="sitename">
-              <el-input class="normal_input-width" v-model="form.sitename" placeholder="请输入企业简称"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-form>
-      </el-row>
-      <el-row style="margin:32px 0 0 0" :gutter="16">
-        <el-col :span="24">
-          <div style="display:flex;align-items: center;">
-            <p class="inline-16">企业操作页LOGO:</p>
-            <uploadFile v-if="show" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sys_site',ownerid:siteinfo.siteuid,usetype:'actionlogo'}" @onSuccess="uploadSuccess"></uploadFile>
-            <div v-else class="image-panel">
-              <i class="el-icon-error close-btn" @click="deleteFileLink"></i>
-              <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
-            </div>
-          </div>
-          <small style="display:block;margin-top:20px" class="info">注:建议上传图片大小1024x1024,大小不超过2M,格式为JPG/PNG</small>
-        </el-col>
-      </el-row>
-      <div class="dialog-footer">
-        <el-button size="small" @click="dialogEditVisible = false" class="normal-btn-width">取 消</el-button>
-        <el-button size="small" type="warning" @click="submit" class="normal-btn-width btn-warning">确 定</el-button>
+  <div >
+    <basicDetails
+        ref="details"
+        titleText="企业设置"
+        :oldFormPath="null"
+        :editData="mainData"
+        :mainAreaData="mainAreaData"
+        turnPageId=""
+        idname=""
+        ownertable=""
+        tags=""
+        :tabs="['联系人','地址管理','财务信息']"
+        @onEditSuccess="queryMainData($route.query.id)"
+        :pageChange="true"
+       >
+
+      <div slot="customOperation" >
+        <el-button type="warning" size="small">保存</el-button>
+      </div>
+      <div slot="slot0" >
+      </div>
+      <div slot="slot1" >
       </div>
-    </el-dialog>
+    </basicDetails>
   </div>
 </template>
 
@@ -42,7 +31,6 @@ import {mapGetters} from 'vuex'
 
 import uploadFile from '../../../../components/upload/hw_obs_upload.vue'
 export default {
-  props:['basicInfo'],
   components:{
     uploadFile
   },
@@ -72,7 +60,9 @@ export default {
           { required: true, message: '请输入企业简称', trigger: 'blur' }
         ]
       },
-      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      mainData:{},
+      mainAreaData:{}
     }
   },
   methods:{
@@ -94,6 +84,31 @@ export default {
         })
       });
     },
+    async queryMainData(id) {
+      const res = await this.$api.requested({
+        "id": 20221022165203,
+        "content": {
+        }
+      })
+      this.mainData = res.data
+      this.changeDataStructure()
+    },
+    changeDataStructure() {
+      this.mainAreaData = [
+        {
+          label:'企业名称',
+          value:this.mainData.enterprisename
+        },
+        {
+          label:'企业简称',
+          value:this.mainData.abbreviation
+        },
+        {
+          label:'法人',
+          value:this.mainData.contact
+        },
+      ]
+    },
     async deleteFileLink (item) {
       const res = await this.$api.requested({
         "classname": "system.attachment.Attachment",
@@ -110,6 +125,10 @@ export default {
         this.form = Object.assign({},this.form,this.siteinfo)
       }, 100);
     }
+  },
+  mounted() {
+    this.form = Object.assign({},this.form,this.siteinfo)
+    this.queryMainData()
   }
 }
 

+ 123 - 0
src/HManagement/siteManage/securityConfig/modules/editCopy.vue

@@ -0,0 +1,123 @@
+<template>
+  <div>
+    <el-button icon="el-icon-edit" size="small" type="primary" style="width:120px" @click="onShow">编 辑</el-button>
+    <el-dialog append-to-body title="编辑" :visible.sync="dialogEditVisible">
+      <el-row :gutter="16">
+        <el-form  :model="form" :rules="rules" ref="form" size="small" inline class="demo-ruleForm">
+          <el-col :span="12">
+            <el-form-item label="企业名称" prop="enterprisename">
+              <el-input class="normal_input-width" v-model="form.enterprisename" placeholder="请输入企业名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="企业简称" prop="sitename">
+              <el-input class="normal_input-width" v-model="form.sitename" placeholder="请输入企业简称"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+      <el-row style="margin:32px 0 0 0" :gutter="16">
+        <el-col :span="24">
+          <div style="display:flex;align-items: center;">
+            <p class="inline-16">企业操作页LOGO:</p>
+            <uploadFile v-if="show" style="margin-top:10px" :folderid="folderid" accept=".JPG,.PNG,.jpg,.png" btntype="image" :bindData="{ownertable:'sys_site',ownerid:siteinfo.siteuid,usetype:'actionlogo'}" @onSuccess="uploadSuccess"></uploadFile>
+            <div v-else class="image-panel">
+              <i class="el-icon-error close-btn" @click="deleteFileLink"></i>
+              <img v-show="img.usetype === 'actionlogo'" v-for="img in siteinfo.attinfos" :key="img.index" style="width:100%" :src="img.url" alt="">
+            </div>
+          </div>
+          <small style="display:block;margin-top:20px" class="info">注:建议上传图片大小1024x1024,大小不超过2M,格式为JPG/PNG</small>
+        </el-col>
+      </el-row>
+      <div class="dialog-footer">
+        <el-button size="small" @click="dialogEditVisible = false" class="normal-btn-width">取 消</el-button>
+        <el-button size="small" type="warning" @click="submit" class="normal-btn-width btn-warning">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {mapGetters} from 'vuex'
+
+import uploadFile from '../../../../components/upload/hw_obs_upload.vue'
+export default {
+  props:['basicInfo'],
+  components:{
+    uploadFile
+  },
+  computed:{
+    ...mapGetters({
+      siteinfo:'siteinfo'
+    }),
+    show () {
+      console.log(this.siteinfo);
+      
+      if (this.siteinfo.attinfos.some(item=>item.usetype === 'actionlogo')) {
+        return false
+      } else {
+        return true
+      }
+    }
+  },
+  data () {
+    return {
+      dialogEditVisible:false,
+      form:{},
+      rules:{
+        enterprisename:[
+          { required: true, message: '请输入企业名称', trigger: 'blur' },
+        ],
+        sitename:[
+          { required: true, message: '请输入企业简称', trigger: 'blur' }
+        ]
+      },
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid
+    }
+  },
+  methods:{
+    onShow () {
+      this.dialogEditVisible = true
+      this.form = Object.assign({},this.form,this.siteinfo)
+    },
+    submit () {
+      this.$refs['form'].validate(async (valid) => {
+        if (!valid) return false;
+        const res = await this.$api.requested({
+          "classname": "webmanage.site.site",
+          "method": "updateSite",
+          "content": this.form
+        })
+        this.tool.showMessage(res,()=>{
+          this.dialogEditVisible = false
+          this.$emit('onSuccess')
+        })
+      });
+    },
+    async deleteFileLink (item) {
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "deleteFileLink",
+        "content": {
+          "linksids":[this.form.attinfos[0].linksid]
+        }
+      })
+      res.code === 1?this.$emit('onSuccess'):''
+    },
+    uploadSuccess () {
+      this.$emit('onSuccess')
+      setTimeout(() => {
+        this.form = Object.assign({},this.form,this.siteinfo)
+      }, 100);
+    }
+  }
+}
+
+</script>
+<style scoped>
+.dialog-footer{
+  margin-top: 50px;
+  text-align: center;
+}
+
+</style>

+ 14 - 10
src/SDrpManagement/QuotedPrice/components/edit/importQuotedPrice.vue

@@ -40,10 +40,10 @@
         <slot name="errorFile"></slot>
         <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a :href="modelurl">《Excel标准模板》</a></p>
         <p class="tips">• 文件中数据不能超过5000行</p>
-        <p v-if="error">错误数据</p>
-        <p v-if="error">{{errorFile}}</p>
+        <p v-if="error" style="color: #0048ff">文件中存在错误数据</p>
+        <a :href="errorFile" v-if="error" style="color: red">{{errorFile}}</a>
         <div class="dialog-footer">
-          <el-button size="small" @click="dialogUploadVisible = false" class="normal-btn-width">取 消</el-button>
+          <el-button size="small" @click="clearFiles();error = false;errorFile = ''" class="normal-btn-width">取 消</el-button>
           <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">确 定</el-button>
         </div>
       </div>
@@ -158,13 +158,17 @@ export default {
           "attachmentid": id
         }
       })
-      console.log(res,"导入结果")
-     /* this.error = true
-      this.errorFile = res.data*/
-      this.tool.showMessage(res,()=>{
-        this.$emit('onSuccess')
-        this.clearFiles()
-      })
+      if (res.data === '成功'){
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.clearFiles()
+        })
+      }else {
+        this.error = true
+        this.errorFile = res.data
+      }
+
+
     },
     clearFiles () {
       this.$refs['my-upload'].clearFiles()

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/edit/productTable.vue

@@ -208,7 +208,7 @@ export default {
       })
     },
     batchSelect(){
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     onSelect(val){
       console.log(val,"选择的商品")
@@ -229,7 +229,7 @@ export default {
       // this.$nextTick(()=>{
       //   this.onSubmit()
       // })
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     debounce (fn, wait) {
       let that = this

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/productTable.vue

@@ -228,10 +228,10 @@ export default {
       /*this.$nextTick(()=>{
         this.onSubmit()
       })*/
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     batchSelect(){
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     debounce (fn, wait) {
       let that = this

+ 2 - 2
src/SDrpManagement/QuotedPrice/components/productTableProject.vue

@@ -209,7 +209,7 @@ export default {
       })
     },
     batchSelect(){
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     onSelect(val){
       console.log(val,"选择的商品")
@@ -230,7 +230,7 @@ export default {
       /*this.$nextTick(()=>{
         this.onSubmit()
       })*/
-      this.debounce(this.onSubmit,500)()
+      this.debounce(this.onSubmit,300)()
     },
     debounce (fn, wait) {
       let that = this

+ 15 - 9
src/SDrpManagement/QuotedPrice/modules/importQuotedPrice.vue

@@ -40,8 +40,10 @@
         <slot name="errorFile"></slot>
         <p class="tips">• 为保证数据导入顺利,推荐您下载并使用<a :href="modelurl">《Excel标准模板》</a></p>
         <p class="tips">• 文件中数据不能超过5000行</p>
+        <p v-if="error" style="color: #0048ff">文件中存在错误数据</p>
+        <a :href="errorFile" v-if="error" style="color: red">{{errorFile}}</a>
         <div class="dialog-footer">
-          <el-button size="small" @click="dialogUploadVisible = false" class="normal-btn-width">取 消</el-button>
+          <el-button size="small" @click="clearFiles();error = false;errorFile = ''" class="normal-btn-width">取 消</el-button>
           <el-button size="small" type="warning" @click="dialogUploadVisible = false" class="normal-btn-width btn-warning">确 定</el-button>
         </div>
       </div>
@@ -78,8 +80,9 @@ export default {
       activeName:'first',
       modelurl:'',
       campaignid:'',
-      sa_quotedpriceid:''
-
+      sa_quotedpriceid:'',
+      error:false,
+      errorFile:''
     }
   },
   mounted () {
@@ -155,12 +158,15 @@ export default {
           "attachmentid": id
         }
       })
-      console.log(res,"导入结果输出")
-      this.tool.showMessage(res,()=>{
-        console.log(res,"导入结果")
-        this.$emit('onSuccess')
-        this.clearFiles()
-      })
+      if (res.data === '成功'){
+        this.tool.showMessage(res,()=>{
+          this.$emit('onSuccess')
+          this.clearFiles()
+        })
+      }else {
+        this.error = true
+        this.errorFile = res.data
+      }
     },
     clearFiles () {
       this.$refs['my-upload'].clearFiles()

+ 2 - 0
src/SManagement/orderclue_detail/index.vue

@@ -280,6 +280,8 @@ export default {
           {label:'最近编辑时间',value:this.mainData.editDate},
           {label:'转化次数',value:this.mainData.isproject === 0 && this.mainData.iscustomer === 0?'0':this.mainData.isproject + this.mainData.iscustomer },
           {label:'转手次数', value:this.mainData.leader[0].leadernum === 0?'0':this.mainData.leader[0].leadernum},
+          {label:'无效原因',value:this.mainData.invalidreason},
+          {label:'作废原因',value:this.mainData.deletereason},
         ]
       }
     },

+ 22 - 1
src/router/HManagement.js

@@ -357,8 +357,29 @@ const HManagement = [
       title: '站点参数设置',
       ast_nav: true
     },
-    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/securityConfig/index.vue')
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/securityConfig/index.vue'),
+    children:[
+      {
+        path: '/enterpriseDetail',
+        name: 'companyInformation',
+        meta: {
+          title: '站点企业编辑',
+          ast_nav:true,
+          keeproute: true
+        },
+        component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/securityConfig/modules/edit')
+      }
+    ]
   }, {
+    path: '/enterpriseDetail',
+    name: 'companyInformation',
+    meta: {
+      title: '站点企业编辑',
+      ast_nav:true,
+      keeproute: true
+    },
+    component: () => import(/* webpackChunkName: "about" */ '@/HManagement/siteManage/securityConfig/modules/edit')
+  },{
     path: '/advertisement_mag',
     name: 'advertisement_mag',
     meta: {