Prechádzať zdrojové kódy

销售漏斗,消息提醒

qymljy 2 rokov pred
rodič
commit
b3a49c347b

+ 31 - 1
src/HDrpManagement/invoicePredictionManage/details/modules/custom.vue

@@ -1,7 +1,8 @@
 <template>
   <div>
     <addCustom v-if="!isDisabled" ref="addOrder" :param="paramAdd" :tablecols="tablecolsAdd" :title="'添加客户'" class="inline-16" @add="addCustom"
-               @adds="addCustoms" @uploadData="uploadData" @onSuccess="onSuccess"></addCustom>
+               @adds="addCustoms" @uploadData="uploadData" @onSuccess="onSuccess" :dataType="'客户'"></addCustom>
+    <el-button @click="delAll" type="primary" size="small">一键删除</el-button>
     <el-button v-if="!isDisabled" :type="items.length > 0?'primary':''" size="small" @click="delCustom" class="inline-16" :disabled="items.length === 0">删 除</el-button>
     <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
@@ -157,6 +158,35 @@ export default {
         })
       }
     },
+    /*一键删除*/
+    delAll(){
+      this.$confirm('此操作将删除全部订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id": 20230705145304,
+          "content": {
+            "sa_salesforecastbillid":this.id,
+            "sa_salesforecastprojectids":[],
+            "isAll":1,
+            "ownertable":"sa_customers"
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.items = []
+          /*this.projectParam.content.pageNumber = 1
+          this.listData()*/
+          this.onSuccess()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
     async delCustom(val){
       console.log(val)
       const res = await this.$api.requested({

+ 31 - 2
src/HDrpManagement/invoicePredictionManage/details/modules/order.vue

@@ -1,7 +1,8 @@
 <template>
   <div>
     <addOrder v-if="!isDisabled" ref="addOrder" :param="paramAdd" :tablecols="tablecolsAdd" :title="'添加订单'" class="inline-16" @add="addOrder"
-              @adds="addOrders" @uploadData="uploadData" @onSuccess="onSuccess"></addOrder>
+              @adds="addOrders" @uploadData="uploadData" @onSuccess="onSuccess" :dataType="'订单'"></addOrder>
+    <el-button @click="delAll" type="primary" size="small">一键删除</el-button>
     <el-button v-if="!isDisabled" :type="items.length > 0?'primary':''" size="small" @click="delOrders" class="inline-16" :disabled="items.length === 0">删 除</el-button>
     <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
@@ -149,11 +150,39 @@ export default {
             "sa_salesforecastprojectid": 0,
             "ownerid": item.sa_orderid,
             "discountrate": 0
-
           }
         })
       }
     },
+    /*一键删除*/
+    delAll(){
+      this.$confirm('此操作将删除全部订单, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id": 20230705145304,
+          "content": {
+            "sa_salesforecastbillid":this.id,
+            "sa_salesforecastprojectids":[],
+            "isAll":1,
+            "ownertable":"sa_order"
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.items = []
+          /*this.projectParam.content.pageNumber = 1
+          this.listData()*/
+          this.onSuccess()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
     async delOrders(){
       let items = []
       items = this.items.map(item=>item.sa_salesforecastprojectid)

+ 48 - 1
src/HDrpManagement/invoicePredictionManage/details/modules/project.vue

@@ -1,6 +1,8 @@
 <template>
   <div>
-    <addProject v-if="!isDisabled" ref="addOrder" :param="paramAdd" :tablecols="tablecolsAdd" :title="'添加项目'" class="inline-16" @add="addProject" @adds="addProjects"></addProject>
+    <addProject v-if="!isDisabled" ref="addOrder" :param="paramAdd" :tablecols="tablecolsAdd" :title="'添加项目'" class="inline-16" @add="addProject"
+                @adds="addProjects" @uploadData="uploadData" @onSuccess="onSuccess" :dataType="'项目'"></addProject>
+    <el-button @click="delAll" type="primary" size="small">一键删除</el-button>
     <el-button v-if="!isDisabled" :type="items.length > 0?'primary':''" size="small" @click="delProject" class="inline-16" :disabled="items.length === 0">删 除</el-button>
     <el-input  style="width:200px;" placeholder="搜索" :suffix-icon="param.content.where.condition?param.content.where.condition.length > 0?'':'':'el-icon-search'" v-model="param.content.where.condition" @keyup.native.enter="listData(param.content.pageNumber = 1)" @clear="listData(param.content.pageNumber = 1)" size="small" class="input-with-select inline-16 layout_search__panel" clearable>
     </el-input>
@@ -140,6 +142,51 @@ export default {
         this.listData()
       })
     },
+    /*一键全选*/
+    uploadData (uploadApi,data) {
+      uploadApi.id = 20230705145104
+      uploadApi.content = {
+        "sa_salesforecastbillid": this.id, //订单ID
+        "ownertable": "sa_project",
+        "salesforecastproject": data.map(item=>{
+          return {
+            "sa_salesforecastprojectid": 0,
+            "ownerid": item.sa_projectid,
+            "discountrate": 0
+
+          }
+        })
+      }
+    },
+    /*一键删除*/
+    delAll(){
+      this.$confirm('此操作将删除全部项目, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(async() => {
+        const res = await this.$api.requested({
+          "id": 20230705145304,
+          "content": {
+            "sa_salesforecastbillid":this.id,
+            "sa_salesforecastprojectids":[],
+            "isAll":1,
+            "ownertable":"sa_project"
+          }
+        })
+        this.tool.showMessage(res,()=>{
+          this.items = []
+          /*this.projectParam.content.pageNumber = 1
+          this.listData()*/
+          this.onSuccess()
+        })
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '已取消删除'
+        });
+      });
+    },
     async delProject(val){
       console.log(val)
       const res = await this.$api.requested({

+ 1 - 1
src/HManagement/siteManage/systemRemind/components/edit.vue

@@ -24,7 +24,7 @@
                 <el-option label="邮件" value="邮件"></el-option>
                 <el-option label="弹框" value="弹框"></el-option>
                 <el-option label="微信公众号" value="微信公众号" v-if="data.cansendbywechatservice"></el-option>
-                <el-option label="企业微信" value="企业微信"></el-option>
+                <el-option label="企业微信" value="企业微信" v-if="data.cansendbyworkwechat"></el-option>
               </el-select>
             </el-form-item>
           </el-col>

+ 1 - 1
src/style/style.css

@@ -234,7 +234,7 @@ ul{
   color: #666
 }
 .content-title{
-  font-size: 12px;
+  font-size: 14px;
   color: #888;
   text-align: center;
 }