浏览代码

2022-12-23 17:00

codeMan 2 年之前
父节点
当前提交
ba706fc584

+ 1 - 0
src/HDrpManagement/ProductGroupMag/modules/table.vue

@@ -69,6 +69,7 @@ export default {
         this.allArr.splice(index,1)
       }
       console.log(this.allArr);
+      this.$emit('selectArr',this.allArr)
       
     },
     selectAll (val) {

+ 5 - 5
src/HDrpManagement/contractManage/components/addContract.vue

@@ -18,7 +18,7 @@
                   placement="bottom"
                   trigger="manual"
                   v-model="agentVisible"
-                  width="400">
+                  width="500">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="agentChange" @onCancel="agentVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
@@ -76,7 +76,7 @@
                   placement="bottom"
                   trigger="manual"
                   v-model="agentVisible"
-                  width="400">
+                  width="500">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="agentChange" @onCancel="agentVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
@@ -146,7 +146,7 @@
                   placement="bottom"
                   trigger="manual"
                   v-model="accountVisible"
-                  width="400">
+                  width="500">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="accountVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
@@ -216,7 +216,7 @@
                   placement="bottom"
                   trigger="manual"
                   v-model="accountVisible"
-                  width="400">
+                  width="500">
                   <selectAgent ref="member" :param="agentListPrams" :radio="true" @onSelect="accountChange" @onCancel="accountVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('accountVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>
@@ -274,7 +274,7 @@
                   placement="bottom"
                   trigger="manual"
                   v-model="agentVisible"
-                  width="400">
+                  width="500">
                   <selectAgent ref="member" :type="false" :param="agentListPrams" :radio="true" @onSelect="centerChange" @onCancel="agentVisible = false"></selectAgent>
                   <el-input readonly type="text" slot="reference" size="small" @focus="showChange('agentVisible')" v-model="form.enterprisename"></el-input>
                 </el-popover>

+ 43 - 7
src/HDrpManagement/contractManage/components/productClassList/addProduct.vue

@@ -5,7 +5,7 @@
       <div class="container">
         <p class="normal-title normal-margin">产品类别</p>
         <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
-          <Table ref="table" id="itemclassid" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
+          <Table @selectArr="selectArr" ref="table" id="itemclassid" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
             <template v-slot:customcol="scope">
               <div v-if="scope.column.columnname == 'attinfos'">
                 <previewImage 
@@ -21,19 +21,23 @@
                 {{scope.column.data[scope.column.columnname][0] ? scope.column.data[scope.column.columnname][0].brandname : '--'}}
               </div>
               <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-              <span v-if="!scope.column.data[scope.column.columnname]">--</span>
+              <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
+            </template>
+            <template v-slot:opreation="scope">
+              <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
             </template>
           </Table>
-          <div class="container normal-panel" style="text-align:right">
+          <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
+            <span>已添加产品数:{{addProductLength}}</span>
             <el-pagination
-                style="text-align:right"
+                style="display:inline-block"
                 background
                 small
                 @size-change="handleSizeChange"
                 @current-change="handleCurrentChange"
                 :current-page="params.content.pageNumber"
                 :page-sizes="[20, 50, 100, 200]"
-                layout="total,sizes, prev, pager, next, jumper"
+                layout="total, prev, pager, next, jumper"
                 :total="total">
             </el-pagination>
           </div>
@@ -41,7 +45,7 @@
       
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="onSumit">确 定</el-button>
+        <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
       </div>
     </el-drawer>
   </div>
@@ -63,6 +67,8 @@ export default {
         price:'',
 
       },
+      selectProductLength:0,
+      addProductLength:0,
       tablecols:[],
       productList:[],
       itemno:'',
@@ -84,10 +90,19 @@ export default {
   },
   watch:{
   },
+  updated () {
+    setTimeout(() => {
+      this.addProductLength = this.$parent.list.length
+    },300)
+  },
   created () {
-    this.tablecols = this.tool.tabelCol(this.$route.name)['productClassTable'].tablecols.splice(0,2)
+    this.tablecols = this.tool.tabelCol(this.$route.name)['productClassTable'].tablecols
   },
   methods: {
+    selectArr (data) {
+      this.selectProductLength = data.length
+      console.log(this.selectProductLength);
+    },
     addBtn () {
       this.drawer = true
       this.getProductList()
@@ -100,6 +115,25 @@ export default {
       console.log(this.productList);
       
     },
+    async addProduct (data) {
+      let res = await this.$api.requested({
+        "id": 20221124110202,
+        "content": {
+            "sa_contractid": this.$route.query.id,
+            "items": [
+              {
+                "sa_contract_itemsaleclassid": 0,
+                "itemclassid": data.itemclassid,
+                "discountrate": '100'
+              }
+            ]
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.getProductList()
+        this.$emit('onSuccess')
+      })
+    },
     async onSumit () {
       let item = this.$refs.table.allArr.map(item => {
         return {
@@ -119,6 +153,8 @@ export default {
       this.tool.showMessage(res,() => {
         this.drawer = false
         this.$emit('onSuccess')
+        this.$refs.table.allArr = []
+
       })
     },
     upDateData (data) {

+ 1 - 1
src/HDrpManagement/contractManage/components/productClassList/table.vue

@@ -67,7 +67,7 @@ export default {
         this.allArr.splice(index,1)
       }
       console.log(this.allArr);
-      
+      this.$emit('selectArr',this.allArr)
     },
     selectAll (val) {
       if (val.length == 0) {

+ 41 - 6
src/HDrpManagement/contractManage/components/productDetailList/addProduct.vue

@@ -5,7 +5,7 @@
       <div class="container">
         <p class="normal-title normal-margin">产品清单</p>
         <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
-        <Table ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
+        <Table @selectArr="selectArr" ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname == 'attinfos'">
               <previewImage 
@@ -21,26 +21,30 @@
               {{scope.column.data[scope.column.columnname][0] ? scope.column.data[scope.column.columnname][0].brandname : '--'}}
             </div>
             <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-            <span v-if="!scope.column.data[scope.column.columnname]">--</span>
+            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
+          </template>
+          <template v-slot:opreation="scope">
+            <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
           </template>
         </Table>
-        <div class="container normal-panel" style="text-align:right">
+        <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
+          <span>已添加产品数:{{addProductLength}}</span>
           <el-pagination
-              style="text-align:right"
+              style="display:inline-block"
               background
               small
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page="params.content.pageNumber"
               :page-sizes="[20, 50, 100, 200]"
-              layout="total,sizes, prev, pager, next, jumper"
+              layout="total, prev, pager, next, jumper"
               :total="total">
           </el-pagination>
         </div>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="onSumit">确 定</el-button>
+        <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
       </div>
     </el-drawer>
   </div>
@@ -62,6 +66,8 @@ export default {
         price:'',
 
       },
+      selectProductLength:0,
+      addProductLength:0,
       tablecols:[],
       productList:[],
       itemno:'',
@@ -84,6 +90,11 @@ export default {
   },
   watch:{
   },
+  updated () {
+    setTimeout(() => {
+      this.addProductLength = this.$parent.list.length
+    },300)
+  },
   created () {
     this.tablecols = this.tool.tabelCol(this.$route.name)['productTable'].tablecols
   },
@@ -100,6 +111,25 @@ export default {
       console.log(this.productList);
       
     },
+    async addProduct (data) {
+      let res = await this.$api.requested({
+        "id": 20221123164402,
+        "content": {
+            "sa_contractid": this.$route.query.id,
+            "items": [
+              {
+                "itemid": data.itemid,
+                "price": '0',
+                "qty": '0'
+              }
+            ]
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.getProductList()
+        this.$emit('onSuccess')
+      })
+    },
     async onSumit () {
       console.log(this.$refs.table.allArr);
       let item = this.$refs.table.allArr.map(item => {
@@ -119,8 +149,13 @@ export default {
       this.tool.showMessage(res,() => {
         this.drawer = false
         this.$emit('onSuccess')
+        this.$refs.table.allArr = []
+
       })
     },
+    selectArr (data) {
+      this.selectProductLength = data.length
+    },
     upDateData (data) {
       console.log(data);
       

+ 148 - 10
src/HDrpManagement/contractManage/components/productList/addProduct.vue

@@ -1,11 +1,61 @@
 <template>
   <div>
     <el-button type="primary" size="small" :disabled="disabled" @click="addBtn">添 加</el-button>
+
+    <el-dialog append-to-body title="选择报价单" :visible.sync="drawer2" width="70%">
+        <div class="inline-16" style="margin-bottom:10px">
+          <el-input suffix-icon="el-icon-search" size="small" v-model="params2.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="getQuotationList(params2.content.pageNumber = 1)" @clear="getQuotationList(params2.content.pageNumber = 1)" clearable></el-input> 
+        </div>
+        <el-table
+          :data="ENlist"
+          stripe
+          style="width: 100%"
+          height="300"
+          border>
+          <el-table-column
+            prop="billno"
+            label="单号"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="submitby"
+            label="提交人"
+            width="180">
+          </el-table-column>
+          <el-table-column
+            prop="submitdate"
+            label="提交时间">
+          </el-table-column>
+          <el-table-column>
+            <template slot-scope="scope">
+              <el-button size="mini" type="text" @click="rowClick(scope.row)">选 择</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div style="display:flex;justify-content:space-between;margin-top:16px;">
+          <div style="text-align:left">
+          <el-pagination
+              background
+              small
+              @size-change="handleSizeChange2"
+              @current-change="handleCurrentChange2"
+              :current-page="params2.content.pageNumber"
+              :page-size="params2.content.pageSize"
+              layout="total, prev, pager, next"
+              :total="total2">
+            </el-pagination>
+          </div>
+          <el-button size="mini" @click="cancel()">取消</el-button>
+        </div>
+        
+        
+      </el-dialog>
+
     <el-drawer append-to-body size="80%" :with-header="false" :visible.sync="drawer">
       <div class="container">
         <p class="normal-title normal-margin">产品清单</p>
         <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
-        <Table ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
+        <Table @selectArr="selectArr" ref="table" fixedName="operation" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname == 'attinfos'">
               <previewImage 
@@ -21,26 +71,30 @@
               {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
             </div>
             <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0">--</span>
+            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
+          </template>
+          <template v-slot:opreation="scope">
+            <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
           </template>
         </Table>
-        <div class="container normal-panel" style="text-align:right">
+        <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
+          <span>已添加产品数:{{addProductLength}}</span>
           <el-pagination
-              style="text-align:right"
+              style="display:inline-block"
               background
               small
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page="params.content.pageNumber"
               :page-sizes="[20, 50, 100, 200]"
-              layout="total,sizes, prev, pager, next, jumper"
+              layout="total, prev, pager, next, jumper"
               :total="total">
           </el-pagination>
         </div>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="onSumit">确 定</el-button>
+        <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
       </div>
     </el-drawer>
   </div>
@@ -50,28 +104,47 @@
 import Table from '@/HDrpManagement/ProductGroupMag/modules/table'
 import previewImage from '@/components/previewImage/index'
 export default {
-  props:['disabled'],
+  props:['disabled','data'],
   name: '',
   components:{Table,previewImage},
   data() {
     return {
       drawer:false,
+      drawer2:false,
       form:{
         qty:'',
         discountrate:'',
         price:'',
 
       },
+      currentQuotation:'',
+      selectProductLength:0,
+      addProductLength:0,
       tablecols:[],
       productList:[],
       itemno:'',
       total:0,
+      total2:0,
+      ENlist:[],
       params: {
         "id": 20221123162902,
         "content": {
             "sa_contractid": '',
             "pageNumber": 1,
             "pageSize": 20,
+            "nocache":true,
+            "where": {
+                "condition": ""
+            }
+        },
+      },
+      params2: {
+        "id": 20221123162902,
+        "content": {
+            "sa_contractid": '',
+            "pageNumber": 1,
+            "pageSize": 20,
+            "nocache":true,
             "where": {
                 "condition": ""
             }
@@ -83,22 +156,61 @@ export default {
   },
   watch:{
   },
+  updated () {
+    setTimeout(() => {
+      this.addProductLength = this.$parent.list.length
+    },300)
+  },
   created () {
     this.tablecols = this.tool.tabelCol(this.$route.name)['productTable'].tablecols
   },
   methods: {
-    addBtn () {
+    cancel () {
+      this.drawer2=false
+    },
+    rowClick (data) {
+      console.log(data);
       this.drawer = true
-      this.getProductList()
+      this.drawer2 = false
+      this.currentQuotation = data
+      this.getProductList(data)
+    },
+    addBtn () {
+      this.drawer2 = true
+      this.getQuotationList()
     },
-    async getProductList () {
+    async getProductList (data) {
       this.params.content.sa_contractid = this.$route.query.id
+      this.params.content.sa_quotedpriceid = this.currentQuotation.sa_quotedpriceid
+
       let res = await this.$api.requested(this.params)
       this.productList = res.data
       this.total = res.total
       console.log(this.productList);
       
     },
+    selectArr (data) {
+      this.selectProductLength = data.length
+    },
+    async addProduct (data) {
+      let res = await this.$api.requested({
+        "id": 20221123164402,
+        "content": {
+            "sa_contractid": this.$route.query.id,
+            "items": [
+              {
+                "itemid": data.itemid,
+                "price": '0',
+                "qty": '0'
+              }
+            ]
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.getProductList()
+        this.$emit('onSuccess')
+      })
+    },
     async onSumit () {
       console.log(this.$refs.table.allArr);
       let item = this.$refs.table.allArr.map(item => {
@@ -118,11 +230,29 @@ export default {
       this.tool.showMessage(res,() => {
         this.drawer = false
         this.$emit('onSuccess')
+        this.$refs.table.allArr = []
       })
     },
     upDateData (data) {
       console.log(data);
       
+    },
+    async getQuotationList () {
+      let res = await this.$api.requested({
+        "id": 20221222151302,
+        "content": {
+            "sa_projectid": this.data.sa_projectid,
+            "pageNumber": 1,
+            "pageSize": 20,
+            "where": {
+                "condition": ""
+            }
+        },
+      })
+      this.ENlist = res.data
+      this.total2 = res.total
+      console.log(this.ENlist,'报价单数据');
+      
     },
     handleSizeChange(val) {
       // console.log(`每页 ${val} 条`);
@@ -132,6 +262,14 @@ export default {
       // console.log(`当前页: ${val}`);
       this.params.content.pageNumber = val
     },
+    handleSizeChange2(val) {
+      // console.log(`每页 ${val} 条`);
+      this.params2.content.pageSize = val
+    },
+    handleCurrentChange2(val) {
+      // console.log(`当前页: ${val}`);
+      this.params2.content.pageNumber = val
+    },
   },
 };
 </script>

+ 2 - 2
src/HDrpManagement/contractManage/components/submitCheck.vue

@@ -26,7 +26,7 @@ export default {
   methods: {
     submit () {
       if (this.data.status == '新建') {
-        this.$confirm('确定提交当前合同吗?','提示',{
+        this.$confirm('确定进行提交操作吗?','提示',{
           confirmButtonText:'确定',
           cancelButtonText:'取消'
         }).then(async () => {
@@ -41,7 +41,7 @@ export default {
           })
         })
       } else {
-        this.$confirm('确定审核当前合同吗?','提示',{
+        this.$confirm('确定进行审核操作吗?','提示',{
           confirmButtonText:'确定',
           cancelButtonText:'取消'
         }).then(async () => {

+ 41 - 6
src/HDrpManagement/contractManage/components/toolList/addTool.vue

@@ -5,7 +5,7 @@
       <div class="container">
         <p class="normal-title normal-margin">工具清单</p>
         <el-input size="small" style="width:200px;margin-bottom:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="getProductList(params.content.pageNumber = 1)" @keyup.native.enter="getProductList(params.content.pageNumber = 1)" clearable></el-input>
-        <Table ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
+        <Table @selectArr="selectArr" ref="table" v-model="itemno" :layout="tablecols" :data="productList" :custom="true" height="500px"  @upDateData="upDateData">
           <template v-slot:customcol="scope">
             <div v-if="scope.column.columnname == 'attinfos'">
               <previewImage 
@@ -21,26 +21,30 @@
               {{scope.column.data[scope.column.columnname][0] ? scope.column.data[scope.column.columnname][0].brandname : '--'}}
             </div>
             <div v-else>{{scope.column.data[scope.column.columnname]}}</div>
-            <span v-if="!scope.column.data[scope.column.columnname]">--</span>
+            <span v-if="!scope.column.data[scope.column.columnname] && scope.column.data[scope.column.columnname] !== 0 && scope.column.columnname != 'operation'">--</span>
+          </template>
+          <template v-slot:opreation="scope">
+            <el-button type="text" size="mini" @click="addProduct(scope.data)">添 加</el-button>
           </template>
         </Table>
-        <div class="container normal-panel" style="text-align:right">
+        <div style="display:flex;justify-content:space-between;align-items:center;margin-top:10px">
+          <span>已添加产品数:{{addProductLength}}</span>
           <el-pagination
-              style="text-align:right"
+              style="display:inline-block"
               background
               small
               @size-change="handleSizeChange"
               @current-change="handleCurrentChange"
               :current-page="params.content.pageNumber"
               :page-sizes="[20, 50, 100, 200]"
-              layout="total,sizes, prev, pager, next, jumper"
+              layout="total, prev, pager, next, jumper"
               :total="total">
           </el-pagination>
         </div>
       </div>
       <div class="fixed__btn__panel">
         <el-button size="small" @click="drawer = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="onSumit">确 定</el-button>
+        <el-button type="primary" size="small" :disabled="selectProductLength == 0" @click="onSumit">批 量 添 加</el-button>
       </div>
     </el-drawer>
   </div>
@@ -64,6 +68,8 @@ export default {
       },
       tablecols:[],
       productList:[],
+      selectProductLength:0,
+      addProductLength:0,
       itemno:'',
       total:0,
       params: {
@@ -92,7 +98,15 @@ export default {
   created () {
     this.tablecols = this.tool.tabelCol(this.$route.name)['productTable'].tablecols
   },
+  updated () {
+    setTimeout(() => {
+      this.addProductLength = this.$parent.list.length
+    },300)
+  },
   methods: {
+    selectArr (data) {
+      this.selectProductLength = data.length
+    },
     addBtn () {
       this.drawer = true  
       this.getProductList()
@@ -105,6 +119,25 @@ export default {
       console.log(this.productList);
       
     },
+    async addProduct (data) {
+      let res = await this.$api.requested({
+        "id": 20221123164402,
+        "content": {
+            "sa_contractid": this.$route.query.id,
+            "items": [
+              {
+                "itemid": data.itemid,
+                "price": '0',
+                "qty": '0'
+              }
+            ]
+        },
+      })
+      this.tool.showMessage(res,() => {
+        this.getProductList()
+        this.$emit('onSuccess')
+      })
+    },
     async onSumit () {
       console.log(this.$refs.table.allArr);
       let item = this.$refs.table.allArr.map(item => {
@@ -123,6 +156,8 @@ export default {
       })
       this.tool.showMessage(res,() => {
         this.drawer = false
+        this.$refs.table.allArr = []
+
         this.$emit('onSuccess')
       })
     },

+ 1 - 1
src/HDrpManagement/contractManage/modules/detail.vue

@@ -24,7 +24,7 @@
       <div slot="slot0" >
         <!--产品清单表-->
         <productBillno ref="billno" @priceChange="queryMainData" v-if="mainData.type == '项目'">
-          <addProduct v-if="tool.checkAuth($route.name,'addProductList')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.billno.listData()"/>
+          <addProduct ref="addProduct" :data="mainData" v-if="tool.checkAuth($route.name,'addProductList')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.billno.listData()"/>
           <template v-slot:edit="scope">
             <el-button 
               v-if="tool.checkAuth($route.name,'editProductList')"

+ 15 - 4
src/HManagement/addressList/mycontact/index.vue

@@ -54,7 +54,8 @@ export default {
       group:[],
       activeGroupData:[],
       activeContactsData:null,
-      tagList:[]
+      tagList:[],
+      allData:[]
     }
   },
   methods:{
@@ -62,6 +63,9 @@ export default {
       this.$refs['grouplist'].listData(()=>{
         let arr = []
         arr = [...this.$refs['grouplist'].sysGroup,...this.$refs['grouplist'].myGroup]
+        this.allData = arr
+        console.log(this.allData,'所有数据');
+        
         this.activeGroupData = arr.filter(e=>{return e.rowindex === this.activeGroupData.rowindex})[0]
         this.activeContactsData = this.activeGroupData.phonebook.filter(e=>{return e.rowindex === this.activeContactsData.rowindex})[0]
       })
@@ -79,9 +83,10 @@ export default {
     setGroupData (val) {
       this.group = val
     },
-    clickGroup (val) {
+    clickGroup (val,allData) {
       this.activeGroupData = val
       this.activeContactsData = null
+      this.allData = allData
     },
     clickContacts (val) {
       this.activeContactsData = val
@@ -94,12 +99,18 @@ export default {
       // this.$refs['grouplist'].listData()
     },
     filtetContacts (type,val) {
+      let allData = []
+      this.allData.map(item => item.phonebook).forEach(item2 => {
+        allData.push(...item2)
+      })
+      console.log(allData);
+      
       if (type === 'name') {
-        this.activeGroupData.phonebook = this.activeGroupData.phonebook.filter(e=>{
+        this.activeGroupData.phonebook = allData.filter(e=>{
           return e.name === val
         })
       } else if (type === 'phonenumber') {
-        this.activeGroupData.phonebook = this.activeGroupData.phonebook.filter(e=>{
+        this.activeGroupData.phonebook = allData.filter(e=>{
           return e.phonenumber === val
         })
       } else {

+ 0 - 2
src/HManagement/addressList/mycontact/modules/edit.vue

@@ -134,8 +134,6 @@ export default {
       this.form = Object.assign({},this.form,this.data.data)
     },
     addGroup () {
-      return console.log(this.data.data);
-      
       this.$refs['form'].validate(async (valid) => {
         if (!valid)  return false;
         this.tags = this.form.tag

+ 6 - 2
src/HManagement/addressList/mycontact/modules/group.vue

@@ -42,12 +42,14 @@
 </template>
 
 <script>
+import { log } from '@antv/g2plot/lib/utils'
 export default {
   data () {
     return {
       sysGroup:[],
       myGroup:[],
-      active:0
+      active:0,
+      allData:[]
     }
   },
   methods:{
@@ -65,6 +67,8 @@ export default {
       res.data.forEach(e=>{e.phonebook.forEach(element => {
         element.tag = element.tag1
       });})
+      this.allData = res.data
+      
       this.sysGroup = res.data.filter(e=>{
         if(e.sys_phonebookgroupid === 0)
           return e
@@ -80,7 +84,7 @@ export default {
     },
     clickGroup (item) {
       this.active = item.rowindex
-      this.$emit('clickGroup',item)
+      this.$emit('clickGroup',item,this.allData)
     }
   },
   mounted () {

+ 2 - 2
src/HManagement/personalTarget/target/modules/edit/components/editTarget.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <el-button  size="small" type="text" @click="onShow(dialogTableVisible = true)">编 辑</el-button>
+    <el-button  size="small" type="text" :disabled="disabled" @click="onShow(dialogTableVisible = true)">编 辑</el-button>
     <el-dialog title="编辑人员目标" append-to-body :visible.sync="dialogTableVisible" width="90%" top="20px">
       <el-row :gutter="40">
         <el-form :model="form" :disabled="date.year > year" label-position="right" label-width="80px" size="small">
@@ -96,7 +96,7 @@
 
 <script>
 export default {
-  props:['data','year'],
+  props:['data','year','disabled'],
   data () {
     return {
       dialogTableVisible:false,

+ 1 - 1
src/HManagement/personalTarget/target/modules/edit/index.vue

@@ -29,7 +29,7 @@
       <div slot="slot0">
         <targetTable ref="list" class="container normal-panel">
           <template  v-slot:editTarget="scope">
-            <editTarget v-if="tool.checkAuth($route.name,'update')" style="display:inline" :year="mainInfo.year" :data="scope.data" @onSuccess="onSuccess"></editTarget>
+            <editTarget v-if="tool.checkAuth($route.name,'update')" :disabled="mainData.status != '新建'" style="display:inline" :year="mainInfo.year" :data="scope.data" @onSuccess="onSuccess"></editTarget>
           </template>
 <!--          <template  v-slot:del="scope">
             <ondel v-if="tool.checkAuth($route.name,'delete')" :data="scope.data" @onSuccess="onSuccess"></ondel>

+ 2 - 3
src/HManagement/siteManage/custom_option/index.vue

@@ -12,11 +12,10 @@
         <div>
           <details_list ref="listDetails" :id="optiontypeid">
             <template v-slot:edit="scope">
-              <edit v-if="tool.checkAuth($route.name,'update')"  :data="scope.data" :classname="classname" @updateSuccess="onSuccess" :type="'text'" ></edit>
-              <el-divider direction="vertical"></el-divider>
+              <edit v-if="tool.checkAuth($route.name,'update') && scope.data.siteid"  :data="scope.data" :classname="classname" @updateSuccess="onSuccess" :type="'text'" ></edit>
             </template>
             <template v-slot:del="scope">
-              <del_option v-if="tool.checkAuth($route.name,'delete')"  :data="scope.data"   :type="'text'" @delSuccess="onSuccess" ></del_option>
+              <del_option v-if="tool.checkAuth($route.name,'delete') && scope.data.siteid"  :data="scope.data"   :type="'text'" @delSuccess="onSuccess" ></del_option>
             </template>
           </details_list>
         </div>

+ 2 - 0
src/HManagement/siteManage/custom_option/modules/list.vue

@@ -55,6 +55,8 @@ export default {
     async queryOptions (setRow) {
       const res = await this.$api.requested(this.param)
       this.list = res.data
+      console.log(this.list);
+      
       this.total = res.total
       this.currentPage = res.pageNumber
       this.$nextTick(() => {

+ 5 - 15
src/SManagement/orderclue_detail/index.vue

@@ -24,11 +24,11 @@
           @updataList="queryMainData" 
           :teamList="teamList()"  
           v-if="userInfo.isAuth == 1 ? mainData.status == '待跟进' || mainData.status == '跟进中' : ''"></move> -->
-        <changeProject v-if="tool.checkAuth($route.name,'change')" :data="mainData" :disabled="!isHandle" class="inline-16"/>
-        <changeCustomer v-if="tool.checkAuth($route.name,'change')" :data="mainData" :disabled="!isHandle" class="inline-16" @onChangeCustomer="onChangeCustomer"></changeCustomer>
-        <el-button :type="!isHandle?'':'primary'" v-if="tool.checkAuth($route.name,'goBack')" :disabled="!isHandle" class="inline-16" size="mini" @click="goBack">退 回</el-button>
-        <noNull v-if="tool.checkAuth($route.name,'change')" class="inline-16" :disabled="!isHandle" @onSuccess="$store.dispatch('changeDetailDrawer',false);$router.replace('/orderclue')" :id="mainData.sat_orderclueid"/>
-        <Del v-if="tool.checkAuth($route.name,'delete')" class="inline-16" :disabled="!isHandle" :idName="20221123193702" @onSuccess="$store.dispatch('changeDetailDrawer',false);$router.replace('/orderclue')" :id="mainData.sat_orderclueid" idKey="sat_orderclueids"/>
+        <changeProject v-if="tool.checkAuth($route.name,'change') && mainData.isproject == 0" :data="mainData" :disabled="!isHandle" class="inline-16"/>
+        <changeCustomer v-if="tool.checkAuth($route.name,'change') && mainData.iscustomer == 0" :data="mainData" :disabled="!isHandle" class="inline-16" @onChangeCustomer="onChangeCustomer"></changeCustomer>
+        <el-button :type="!isHandle?'':'primary'" v-if="tool.checkAuth($route.name,'goBack') && mainData.status != '已转化'" :disabled="!isHandle" class="inline-16" size="mini" @click="goBack">退 回</el-button>
+        <noNull v-if="tool.checkAuth($route.name,'change') && mainData.status != '已转化'" class="inline-16" :disabled="!isHandle" @onSuccess="$store.dispatch('changeDetailDrawer',false);$router.replace('/orderclue')" :id="mainData.sat_orderclueid"/>
+        <Del v-if="tool.checkAuth($route.name,'delete') && mainData.status != '已转化'" class="inline-16" :disabled="!isHandle" :idName="20221123193702" @onSuccess="$store.dispatch('changeDetailDrawer',false);$router.replace('/orderclue')" :id="mainData.sat_orderclueid" idKey="sat_orderclueids"/>
       </div>
       <div slot="slot1" class="container normal-panel">
         <BaseInfo :detailInfo="detailInfo"/>
@@ -82,22 +82,12 @@ export default {
         if(this.mainData.leader.length <= 0 ) return
         if(JSON.parse(window.sessionStorage.getItem('userInfo')).userid == this.mainData.leader[0].userid) {
           is = true
-          if(this.mainData.status == '待跟进' || this.mainData.status == '跟进中') {
-            is = true
-          } else {
-            is = false
-          }
         } else {
           is = false
         }
       } else {
         console.log('不是负责人逻辑');
         is = true
-        if(this.mainData.status == '待跟进' || this.mainData.status == '跟进中') {
-          is = true
-        } else {
-          is = false
-        }
       }
       this.isHandle = is
       console.log(this.isHandle,'权限');