Преглед на файлове

Merge branch 'greenUrgent' into allTestUrgent

qymljy преди 5 месеца
родител
ревизия
bb2fb31ca7

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

@@ -14,7 +14,6 @@
         tags=""
         :tabs="tool.checkAuth($route.name,'contactPerson')?['跟进记录','联系人','详细信息','线索来源']:['跟进记录','详细信息','线索来源']"
         @pageChange="pageChange"
-        delApiId="20221101100502"
         @onEditSuccess="queryMainData($route.query.id)">
       <div slot="tags">
       </div>
@@ -22,6 +21,7 @@
         <distobutionOne v-if="tool.checkAuth($route.name,'oneDistribution')" :status="mainData.status" @onSuccess="$store.dispatch('changeDetailDrawer',false),$router.back()" class="inline-16" />
         <changeSite v-if="tool.checkAuth($route.name,'changeSite')"  class="inline-16"></changeSite>
         <restore v-if="tool.checkAuth($route.name,'restore')" class="inline-16" @restSuccess="queryMainData" :status="mainData.status"></restore>
+        <voidTemplate v-if="tool.checkAuth($route.name,'delete')" class="inline-16"  ></voidTemplate>
         <!-- <recall v-if="tool.checkAuth($route.name,'recall')" :data="mainData" @onSuccess="queryMainData"></recall> -->
       </div>
       <div slot="slot0" class="normal-panel" style="padding: 10px">
@@ -49,6 +49,7 @@ import sourceClues from '@/HManagement/clueManage/clue_public/modules/sourceClue
 import changeSite from '@/HManagement/clueManage/clue_private/modules/changeToSite.vue'
 import restore from "@/HManagement/clueManage/clue_private/modules/restore";
 import contactPerson from './contactPerson'
+import voidTemplate from '@/components/voidTemplate/index'
 export default {
   name: "detail",
   data() {
@@ -98,7 +99,8 @@ export default {
     changeSite,
     restore,
     followDetail,
-    contactPerson
+    contactPerson,
+    voidTemplate
   },
   methods:{
     handleSizeChange(val) {

+ 4 - 0
src/HManagement/ecycle/agentManage/index.vue

@@ -148,6 +148,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       dateSelect:'',

+ 72 - 0
src/HManagement/ecycle/application/index.vue

@@ -0,0 +1,72 @@
+<template>
+  <div>
+    <p class="search__label">{{ $t('应用') }}:</p>
+    <el-select
+        class="inline-24"
+        size="small"
+        v-model="application"
+        :placeholder="$t('请选择范围')"
+        @change="applicationChange"
+    >
+      <el-option
+          v-for="item in applicationList"
+          :key="item.index"
+          :label="$t(item.label)"
+          :value="item.value"
+      ></el-option>
+    </el-select>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "index",
+  props:{
+    application:String
+  },
+  data(){
+    return {
+      applicationList:[
+        {
+          label: '销售线索',
+          value: "1",
+        },
+        {
+          label: '客户',
+          value: "2",
+        },
+        {
+          label: '合同',
+          value: "3",
+        },
+        {
+          label: '项目商机',
+          value: "4",
+        },
+        {
+          label: '报价单',
+          value: "5",
+        },
+        {
+          label: '合作伙伴',
+          value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
+        }
+      ],
+    }
+  },
+  methods:{
+    applicationChange(val){
+      this.application = val
+      this.$emit("changeApplication",val)
+    },
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 0
src/HManagement/ecycle/contract/index.vue

@@ -155,6 +155,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       dateSelect:'',

+ 4 - 0
src/HManagement/ecycle/customer/index.vue

@@ -163,6 +163,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       option:{

+ 20 - 2
src/HManagement/ecycle/index.vue

@@ -6,6 +6,7 @@
     <contract v-if="contractShow" @changeApplication="onChange"></contract>
     <customer v-if="customerShow" @changeApplication="onChange"></customer>
     <agenter v-if="agenerShow" @changeApplication="onChange"></agenter>
+    <publicClue v-if="pubClueShow" @changeApplication="onChange"></publicClue>
   </div>
 </template>
 
@@ -16,9 +17,10 @@ import quotedPrice from './quotedPrice/index'
 import contract from './contract/index'
 import customer from './customer/index'
 import agenter from './agentManage/index'
+import publicClue from './publicClue/index'
 export default {
   name: "index",
-  components:{saleClue,projectChange,quotedPrice,contract,customer,agenter},
+  components:{saleClue,projectChange,quotedPrice,contract,customer,agenter,publicClue},
   data(){
     return {
       salClueShow:true,
@@ -26,11 +28,13 @@ export default {
       quotedPriceShow:false,
       contractShow:false,
       customerShow:false,
-      agenerShow:false
+      agenerShow:false,
+      pubClueShow:false
     }
   },
   methods:{
     onChange(val){
+      console.log(val,'val切换')
       console.log(this.projectChangeShow,this.salClueShow)
       if (val === '1'){
         this.salClueShow = true
@@ -39,6 +43,7 @@ export default {
         this.contractShow = false
         this.customerShow = false
         this.agenerShow = false
+        this.pubClueShow = false
       }else if (val === '2') {
         this.customerShow = true
         this.salClueShow = false
@@ -46,6 +51,7 @@ export default {
         this.quotedPriceShow = false
         this.contractShow = false
         this.agenerShow = false
+        this.pubClueShow = false
       }else if (val === '3'){
         this.contractShow = true
         this.quotedPriceShow = false
@@ -53,6 +59,7 @@ export default {
         this.projectChangeShow = false
         this.customerShow = false
         this.agenerShow = false
+        this.pubClueShow = false
       }else if (val === '4'){
         this.projectChangeShow = true
         this.quotedPriceShow = false
@@ -60,6 +67,7 @@ export default {
         this.contractShow = false
         this.customerShow = false
         this.agenerShow = false
+        this.pubClueShow = false
       }else if (val === '5'){
         this.quotedPriceShow = true
         this.customerShow = false
@@ -67,6 +75,7 @@ export default {
         this.salClueShow = false
         this.projectChangeShow = false
         this.agenerShow = false
+        this.pubClueShow = false
       }else if (val === '6'){
         this.agenerShow = true
         this.customerShow = false
@@ -74,6 +83,15 @@ export default {
         this.salClueShow = false
         this.projectChangeShow = false
         this.quotedPriceShow = false
+        this.pubClueShow = false
+      }else if (val === '7'){
+        this.pubClueShow = true
+        this.customerShow = false
+        this.contractShow = false
+        this.salClueShow = false
+        this.projectChangeShow = false
+        this.quotedPriceShow = false
+        this.agenerShow = false
       }
       console.log(this.projectChangeShow,this.salClueShow)
     }

+ 4 - 0
src/HManagement/ecycle/projectChange/index.vue

@@ -163,6 +163,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       projectType:'',

+ 180 - 0
src/HManagement/ecycle/publicClue/index.vue

@@ -0,0 +1,180 @@
+<template>
+  <basicLayout
+      ref="basicLayout"
+      tableName="cluePublicTable"
+      idName="sat_orderclueid"
+      :apiId="{query:20221101094402,del:''}"
+      :autoQuery="false"
+      @checkboxCallBack="checkboxCallBack"
+  >
+    <template #titleLight>
+      <batchDeletion v-if="tool.checkAuth($route.name,'batchDeletion')"  ref="batchDeletion" :ownerids="selectData" sys_object="1" @delSuccess="queryData"></batchDeletion>
+      <batchRecovery v-if="tool.checkAuth($route.name,'batchRecovery')" ref="batchRecovery" :ownerids="selectData" sys_object="1" @recoverySuccess="queryData"></batchRecovery>
+    </template>
+    <template #custom>
+      <div class="mt-10">
+        <application @changeApplication="changeApplication" :application="application"></application>
+      </div>
+      <div class="mt-10">
+        <p class="search__label">{{$t('领域')}}:</p>
+        <el-select v-model="selectParam.tradefield" clearable class="inline-24"  size="small" :placeholder="$t('请选择领域')" @change="queryData" @focus="queryType('tradefield')">
+          <el-option v-for="item in options.tradefield" :label="$t(item.value)" :key="item.rowindex" :value="item.value">
+          </el-option>
+        </el-select>
+      </div>
+      <div class="mt-10">
+        <p class="search__label">{{$t('跟进状态')}}:</p>
+        <el-select v-model="selectParam.status" clearable class="inline-24"  size="small" :placeholder="$t(`请选择状态`)" @change="queryData" @focus="queryType('datafollowuptype')">
+          <el-option v-for="item in options.datafollowuptype" :label="$t(item.value)" :key="item.rowindex" :value="item.value">
+          </el-option>
+        </el-select>
+      </div>
+      <div class="mt-10">
+        <p class="search__label">{{$t('标签')}}:</p>
+        <el-select v-model="selectParam.tag" clearable class="inline-24" size="small" :placeholder="$t('请选择标签')" @change="queryData" multiple @focus="tagList">
+          <el-option v-for="item in options.tagData" :label="$t(item.tag)" :key="item.tag" :value="item.tag">
+          </el-option>
+        </el-select>
+      </div>
+      <div class="mt-10">
+        <p class="search__label">{{ $t("来源") }}:</p>
+        <el-select
+            v-model="selectParam.cluesource"
+            @focus="queryType('cluesourcesift')"
+            clearable
+            class="inline-24"
+            size="small"
+            :placeholder="$t('请选择来源')"
+            @change="queryData"
+        >
+          <el-option
+              v-for="item in options.cluesourcesift"
+              :label="$t(item.value)"
+              :key="item.rowindex"
+              :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </div>
+    </template>
+    <template v-slot:tbList="scope">
+      <div v-if="scope.data.column.columnname == 'status'">
+        <span :style="tool.getStatusColor(scope.data.column.data[[scope.data.column.columnname]])">{{$t(scope.data.column.data[[scope.data.column.columnname]])}}</span>
+      </div>
+      <div v-else-if="scope.data.column.columnname === 'alltag'">
+        <div v-if="scope.data.column.data.alltag && scope.data.column.data.alltag.length > 0">
+          <div v-for="item in scope.data.column.data.alltag" :key="item.index"  style="float: left;margin-left: 5px;margin-bottom: 5px">
+            <el-tag  color="#3874F6" size="mini" type="primary" effect="dark">
+              <span>{{$t(item)}}</span>
+            </el-tag>
+          </div>
+        </div>
+        <div v-else>--</div>
+      </div>
+      <div v-else-if="scope.data.column.columnname == 'scale'">
+        <span>{{scope.data.column.data[[scope.data.column.columnname]] !== '' &&  scope.data.column.data[[scope.data.column.columnname]] !== 0?scope.data.column.data[[scope.data.column.columnname]]+$t(scope.data.column.data.unitname):'--'}}</span>
+      </div>
+      <div v-else-if="scope.data.column.columnname == 'pcc' && scope.data.column.data.province">
+        {{scope.data.column.data.province}}-{{scope.data.column.data.city}}-{{scope.data.column.data.county}}
+      </div>
+      <div v-else-if="scope.data.column.columnname == 'totalinvestment'">
+        <span>{{scope.data.column.data[[scope.data.column.columnname]] !== 0?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+      </div>
+      <div v-else-if="scope.data.column.columnname == 'costofconstruction'">
+        <span>{{scope.data.column.data[[scope.data.column.columnname]] !== 0?tool.formatAmount(scope.data.column.data[[scope.data.column.columnname]],2):'--'}}</span>
+      </div>
+      <div v-else>
+        {{$t(scope.data.column.data[[scope.data.column.columnname]]) || '--'}}
+      </div>
+      <!--        <span v-if="!scope.data.column.data[scope.data.column.columnname] ">&#45;&#45;</span>-->
+    </template>
+    <template v-slot:tbOpreation="scope">
+      <delData class="inline-16" :ownerid="scope.data.data.sat_orderclueid" sys_object="1" @delSuccess="delSuccess"></delData>
+      <recovery type="线索" class="inline-16" :ownerid="scope.data.data.sat_orderclueid" sys_object="1" @recoverySuccess="queryData"></recovery>
+    </template>
+  </basicLayout>
+</template>
+
+<script>
+import recovery from "@/HManagement/ecycle/modules/recovery"
+import delData from "@/HManagement/ecycle/modules/delData"
+import batchDeletion from "@/HManagement/ecycle/modules/batchDeletion";
+import batchRecovery from "@/HManagement/ecycle/modules/batchRecovery";
+import application from '../application/index'
+export default {
+  name: "index",
+  components:{recovery,delData,batchDeletion,batchRecovery,application},
+  data(){
+    return {
+      application:'7',
+      options:{
+        cluesourcesift:[],
+        tradefield:[],
+        tagData:[],
+        datafollowuptype:[]
+      },
+      selectParam:{
+        tradefield:'',
+        status:'',
+        tag:[],
+        cluesource:''
+      },
+      selectData:[]
+    }
+  },
+  methods:{
+    queryData(){
+      this.$refs.basicLayout.param.content.isAll = 0
+      // this.$refs.basicLayout.param.content.type = 0
+      this.$refs.basicLayout.param.content.deleted = 1
+      this.$refs.basicLayout.param.content.where = this.selectParam
+      // this.$refs.basicLayout.param.content.sort = [{reversed:0,sorted:1,sortid:182,sortname:'作废时间倒序'}]
+      this.$refs.basicLayout.listData()
+    },
+    /*获取分类*/
+    async queryType(val){
+      if (this.options[val].length == 0){
+        const res = await this.$store.dispatch("optiontypeselect", val)
+        this.options[val] = res.data
+      }
+    },
+    /*标签列表*/
+    async tagList(){
+      const res = await this.$api.requested({
+        "id":20221013104401,
+        "content":{
+          "isExport":1,
+          "pageNumber":1,
+          "pageSize":100,
+          "sys_systemtagid":14,
+          "where":{
+            "condition":""
+          }
+        }
+      })
+      this.options.tagData = res.data
+    },
+    checkboxCallBack(val){
+      this.selectData = []
+      val.forEach((item,index) => {
+        this.selectData[index] = item.sat_orderclueid
+      })
+      this.$refs.batchDeletion.length = this.selectData.length
+      this.$refs.batchRecovery.length = this.selectData.length
+    },
+    delSuccess(){
+      this.queryData()
+    },
+    changeApplication(val){
+      this.$emit('changeApplication',val)
+    }
+  },
+  mounted() {
+    this.queryData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 4 - 0
src/HManagement/ecycle/quotedPrice/index.vue

@@ -149,6 +149,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       dateSelect:'',

+ 4 - 0
src/HManagement/ecycle/saleClue/index.vue

@@ -104,6 +104,10 @@ export default {
         {
           label: '合作伙伴',
           value: "6",
+        },
+        {
+          label: '公海线索',
+          value: "7",
         }
       ],
       status:'',

+ 107 - 0
src/components/voidTemplate/index.vue

@@ -0,0 +1,107 @@
+<template>
+  <div>
+    <el-button
+        style="width: 100%"
+        :type="
+        disabled
+          ? ''
+          : 'primary'
+      "
+        size="mini"
+        block
+        @click="onshow"
+        :disabled="
+        disabled"
+    >{{ $t("作废") }}</el-button
+    >
+    <el-dialog title="" :visible.sync="dialogForm" width="25%" append-to-body>
+      <div slot="title" style="font-size: 15px">{{ $t("作废") }}</div>
+      <div>
+        <el-row :gutter="20">
+          <el-form
+              :model="form"
+              :rules="rules"
+              ref="form"
+              size="mini"
+              label-position="top"
+              :label-width="tool.onlyZh('90px')"
+          >
+            <el-col :span="24">
+              <el-form-item :label="$t(`作废原因`) + ':'" prop="deletereason">
+                <el-input
+                    type="textarea"
+                    v-model="form.deletereason"
+                    :placeholder="$t(`输入作废原因`)"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+      </div>
+      <div class="dialog-footer">
+        <el-button
+            size="small"
+            @click="dialogForm = false"
+            class="normal-btn-width"
+        >{{ $t("取 消") }}</el-button
+        >
+        <el-button
+            size="small"
+            type="primary"
+            @click="onSubmit"
+            class="normal-btn-width"
+        >{{ $t("确 定") }}</el-button
+        >
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "toVoid",
+  props: ["id", "disabled", "data"],
+  data() {
+    return {
+      dialogForm: false,
+      form: {
+        deletereason: "",
+      },
+      rules: {
+        deletereason: [
+          {
+            required: true,
+            message: this.$t("未填写作废原因"),
+            trigger: "change",
+          },
+        ],
+      },
+    };
+  },
+  methods: {
+    onshow() {
+      this.dialogForm = true;
+      this.$emit("onshow");
+    },
+    onSubmit() {
+      this.$refs["form"].validate(async (valid) => {
+        if (!valid) return false;
+        const res = await this.$api.requested({
+          id: 20221101100502,
+          content: {
+            sat_orderclueids: [this.$route.query.id],
+            deletereason: this.form.deletereason, //作废时传,可选
+          },
+        });
+        this.tool.showMessage(res, () => {
+          this.dialogForm = false;
+          this.$store.dispatch("changeDetailDrawer", false);
+        });
+      });
+    },
+  },
+};
+</script>
+
+<style scoped>
+</style>