qymljy 2 years ago
parent
commit
66f3b70f48

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

@@ -14,6 +14,7 @@
       <!-- :tabs="['经销商团队','代理区域','营销类别','账户余额']" -->
     </div>
     <div slot="customOperation">
+      <el-button v-if="tool.checkAuth($route.name,'delete') && mainData.sa_customersid === 0 && mainData.sa_agentsid === 0" size="mini" class="inline-16" type="primary" @click="onDel">删 除</el-button>
       <!-- 此区域提供了自定义操作按钮 -->
     </div>
     <div slot="custom">
@@ -119,6 +120,28 @@ export default {
           value: this.mainData.createdate
         },
       ]
+    },
+    onDel() {
+        this.$confirm('此操作将永久删除该企业, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async () => {
+        const res = await this.$api.requested({
+          "id": 20220920084201,
+          "content": {
+            "sys_enterpriseids": [this.mainData.sys_enterpriseid]
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.$store.dispatch('changeDetailDrawer',false)
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
     }
   },
   mounted () {

+ 63 - 4
src/HManagement/marketing2/agent/index.vue

@@ -25,8 +25,8 @@
             v-if="tool.checkAuth($route.name,'export')"
           ></importFile>
         </div>
-        <div slot="custom">
-          <div class="label_center">
+        <template #custom>
+          <div class="mt-10">
             <span class="search_label">状态: </span>
               <el-select
               class="inline-16"
@@ -43,7 +43,47 @@
               ></el-option>
             </el-select>
           </div>
-        </div>
+          <div class="mt-10">
+            <span class="search_label">合作伙伴类型: </span>
+            <el-select
+                class="inline-16"
+                ref="sle"
+                v-model="type"
+                placeholder="请选择合作伙伴类别"
+                size="small"
+                @change="handleSelectChange"
+            >
+              <el-option
+                  v-for="item in agent_type"
+                  :key="item.value"
+                  :label="item.value"
+                  :value="item.value"
+              >
+                <!--                  <span style="float: left">{{ item.tag }}</span>-->
+                <!--                  <span style="float: right; color: #8492a6; font-size: 12px">{{ item.helptips?item.helptips:'暂无描述' }}</span>-->
+              </el-option>
+            </el-select>
+          </div>
+          <div class="mt-10">
+            <span class="search_label">合作状态: </span>
+            <el-select
+                class="inline-16"
+                ref="sle"
+                v-model="cooperations"
+                placeholder="请选择合作状态"
+                size="small"
+                @change="handleSelectChange"
+            >
+              <el-option
+                  v-for="item in cooperationstatus"
+                  :key="item.label"
+                  :label="item.label"
+                  :value="item.label"
+              >
+              </el-option>
+            </el-select>
+          </div>
+        </template>
         <template v-slot:tbList="scope">
           <div>
             <p v-if="scope.data.column.columnname === 'province'">
@@ -102,8 +142,19 @@ export default {
       options:[],
       areaInfo:{},
       status:'',
+      type:'',
+      cooperations:'',
       statusList:[],
-      errorUrl:null
+      errorUrl:null,
+      agent_type:[],
+      cooperationstatus:[
+        {
+          label:'正式'
+        },
+        {
+          label:'意向'
+        },
+      ],
     }
   },
   provide () {
@@ -113,6 +164,7 @@ export default {
   },
   created () {
     this.userstatus()
+    this.queryType()
   },
   methods:{
     async userstatus() {
@@ -145,6 +197,8 @@ export default {
     },
     handleSelectChange() {
       this.$refs['basicLayout'].param.content.where.status = this.status
+      this.$refs['basicLayout'].param.content.where.type = this.type
+      this.$refs['basicLayout'].param.content.where.cooperationstatus = this.cooperations
        this.$refs['basicLayout'].param.content.pageNumber = 1
       this.$refs['basicLayout'].listData()
     },
@@ -185,6 +239,11 @@ export default {
     },
     list(param) {
       param.content.isAll = 0
+    },
+    /*合作伙伴类型*/
+    async queryType(){
+      const res = await this.$store.dispatch('optiontypeselect','agenttypemx')
+      this.agent_type = res.data
     }
   }
 }

+ 28 - 2
src/SManagement/setenterpriseInfo/index.vue

@@ -42,6 +42,9 @@
           <el-tab-pane label="财务信息" name="second">
             <financial :mainData="enterpriseInfo"></financial>
           </el-tab-pane>
+          <el-tab-pane label="附件" name="third">
+            <attachment :mainData="enterpriseInfo"></attachment>
+          </el-tab-pane>
         </el-tabs>
       </div>
     </normalLayout>
@@ -51,19 +54,27 @@
 import financial from '@/components/financialInfo/index.vue'
 import setAddress from './modules/address/list.vue'
 import editInfo from '@/Form/EnterpriseArchives/edit.vue'
+import attachmentList from '@/components/attachment_list/index.vue'
+import upload from '@/components/upload/hw_obs_upload.vue'
+import attachment from './modules/attachment/index'
 export default {
   data () {
     return {
       activeName:'first',
       enterpriseInfo:{},
       show:false,
-      userInfo:''
+      userInfo:'',
+      attinfo_attachment:[],
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
     }
   },
   components:{
     financial,
     setAddress,
-    editInfo
+    editInfo,
+    attachment,
+    attachmentList,
+    upload
   },
   methods:{
     async enterpriseData () {
@@ -89,6 +100,21 @@ export default {
       console.log(this.userInfo);
       
     },
+    async queryAttments () {
+      console.log("执行111")
+      console.log(this.idname,'---')
+      console.log(this.userInfo,'userInfo')
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sys_enterprise',
+          "ownerid":365,
+          "usetype":"default"
+        }
+      })
+      this.attinfo_attachment = res.data
+    },
   },
   created () {
     this.getUserInfo()

+ 140 - 0
src/SManagement/setenterpriseInfo/modules/attachment/index.vue

@@ -0,0 +1,140 @@
+<template>
+  <div>
+    <upload  :folderid="folderid"
+            :bindData="{ ownertable: 'sys_enterprise', ownerid: mainData.sys_enterpriseid, usetype: 'default' }"
+            @onSuccess="queryAttments"></upload>
+    <el-table
+        :header-cell-style="{background:'#EEEEEE',color:'#333'}"
+        size="mini"
+        border
+        :data="attinfo_attachment"
+        style="width: 100%;margin-top: 15px">
+      <el-table-column
+          prop="document"
+          label="文件名称">
+        <template slot-scope="scope">
+          <el-input v-if="actid === scope.row.attachmentid" size="mini" v-model="scope.row.document"></el-input>
+          <span v-else>{{scope.row.document}}</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+          prop="createdate"
+          label="上传时间">
+      </el-table-column>
+      <el-table-column
+          prop="contentlength"
+          label="文件大小"
+          width="90">
+        <template slot-scope="scope">
+          {{scope.row.contentlength > 1073741824?(scope.row.contentlength / Math.pow(1024,3)).toFixed(2)+'GB':scope.row.contentlength > 1048576?(scope.row.contentlength / Math.pow(1024,2)).toFixed(2)+'MB':scope.row.contentlength > 1024?(scope.row.contentlength / Math.pow(1024,1)).toFixed(2)+'KB':scope.row.contentlength+'B'}}
+        </template>
+      </el-table-column>
+      <el-table-column
+          label="操作"
+          width="140">
+        <template slot-scope="scope">
+          <div v-if="actid === scope.row.attachmentid">
+            <el-button type="text" size="small" @click="saveEdit(scope.row)">保 存</el-button>
+            <el-button type="text" size="small" @click="refresh(actid = 0)">取 消</el-button>
+          </div>
+          <div v-else>
+            <el-button type="text" size="small" @click="download(scope.row)">下 载</el-button>
+            <el-button  class="inline-16" type="text" size="small" @click="editAttachment(scope.row)">编 辑</el-button>
+            <el-popconfirm
+                title="确定删除当前附件吗?"
+                @confirm="deleteAttachment(scope.row)">
+              <el-button  slot="reference" size="small" type="text">删 除</el-button>
+            </el-popconfirm>
+          </div>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+import upload from '@/components/upload/hw_obs_upload.vue'
+export default {
+  name: "index",
+  props:['mainData'],
+  components:{
+    upload
+  },
+  data () {
+    return {
+      folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
+      attinfo_attachment:[],
+      actid:null,
+    }
+  },
+  methods:{
+    onUpload(){
+      console.log(this.mainData,'数据')
+    },
+    /*查询附件列表*/
+    async queryAttments () {
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "queryFileLink",
+        "content": {
+          "ownertable": 'sys_enterprise',
+          "ownerid": this.mainData.sys_enterpriseid,
+          "usetype":"default"
+        }
+      })
+      console.log(res,'附件')
+      this.attinfo_attachment = res.data
+    },
+    /*编辑*/
+    editAttachment (row) {
+      this.actid = row.attachmentid
+    },
+    /*保存*/
+    async saveEdit (row) {
+      let param = {
+        "classname": "system.attachment.MediaCenter",
+        "method": "changeAttachment",
+        "content": {
+          "files": [
+            {
+              "attachmentid": row.attachmentid,
+              "document": row.document,
+              "parentid":row.parentid
+            }
+          ]
+        }
+      }
+      const res = await this.$api.requested(param)
+      res.code === 1?this.queryAttments():''
+      res.code === 1?this.actid = '':''
+    },
+    /*取消*/
+    refresh () {
+      this.$emit('cancelEdit')
+    },
+    /*下载*/
+    download (row) {
+      window.open(row.url)
+    },
+    /*删除*/
+    async deleteAttachment (row) {
+      const res = await this.$api.requested({
+        "classname": "system.attachment.Attachment",
+        "method": "deleteFileLink",
+        "content": {
+          "linksids":[row.linksid]
+        }
+      })
+      res.code === 1?this.tool.showMessage(res):''
+      res.code === 1?this.queryAttments():''
+    }
+  },
+  mounted() {
+    this.queryAttments()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
vue.config.js

@@ -15,8 +15,8 @@ module.exports = {
       proxy: {
         '/apis': {
           // target: 'http://61.164.207.46:8000',  // target host*/
-          target: 'http://192.168.3.9:8080',  // target host*!
-          // target: 'https://oms.idcgroup.com.cn:8079/',  // target host
+          // target: 'http://192.168.3.9:8090',  // target host*!
+          target: 'https://oms.idcgroup.com.cn:8079/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets 
           changeOrigin: true,  // needed for virtual hosted sites