qymljy 3 lat temu
rodzic
commit
4f52dc249f

+ 51 - 71
src/HDrpManagement/contractManage/components/itemClass/index.vue

@@ -14,69 +14,17 @@
       </el-input>&nbsp;
       <!--      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization" ></product_table>-->
       <add v-if="tool.checkAuth($route.name,'productClassManage') && data.status === '新建' && isLeader" :data="data" class="inline-16" @itemClassAdd="listData"></add>
+      <el-button v-if="tool.checkAuth($route.name,'productClassManage') && data.status === '新建' && isLeader" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
     </div>
     <div class="produtMag-panel">
-      <el-table
-          ref="multipleTable"
-          :data="list"
-          style="width: 100%"
-          height="calc(100vh - 500px)"
-          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
-          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
-          border
-      >
-        <!--        <el-table-column
-                    type="selection"
-                    width="55">
-                </el-table-column>-->
-        <el-table-column
-            prop="itemclassnum"
-            label="编号"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="itemclassfullname"
-            label="产品类别名称"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="brandname"
-            label="品牌"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="discountrate"
-            label="折扣(%)"
-            width="80"
-            fixed="right">
-          <template slot-scope="scope">
-            <div v-if=" !saveShow || index !== scope.row.rowindex">
-              <p><span >{{scope.row.discountrate}}</span></p>
-            </div>
-            <span v-else>
-              <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="operation"
-            fixed="right"
-            label="操作"
-            width="120">
-          <template slot-scope="scope">
-            <el-button  size="mini" type="text" class="inline-16" @click="onEdit(scope.row)" v-if="index !== scope.row.rowindex" :disabled="!tool.checkAuth($route.name,'productClassManage') || data.status !== '新建' || !isLeader">编 辑</el-button>
-            <el-button  size="mini" type="text" class="inline-16" @click="onSave(scope.row)" v-if="saveShow && index === scope.row.rowindex">保 存</el-button>
-            <el-popconfirm
-                title="确定删除该产品类别吗?"
-                @confirm="deleteProduct(scope.row)"
-            >
-              <el-button class="inline-16" slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'productClassManage') || data.status !== '新建' || !isLeader">删 除</el-button>
-            </el-popconfirm>
-
-<!--            <el-button  size="mini" type="text" class="inline-16" @click="onCancel" v-if="saveShow">取 消</el-button>-->
-          </template>
-        </el-table-column>
-      </el-table>
+      <tableLayout :layout="tablecols" checkbox="true"  :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="offerPrice amount" @selectionChange="selectionChange">
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname == 'discountrate'">
+            <el-input v-model="scope.column.data.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.column.data.discountrate,scope.column.data,scope.$index)"></el-input>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+        </template>
+      </tableLayout>
       <div style="height: 35px;margin-top: 20px">
         <!--        <div style="float: left">总金额(元):{{ totalPrice }}</div>-->
         <div style="float: right">
@@ -99,13 +47,15 @@
 
 <script>
 import add from './add'
+import tableLayout from '@/components/table/index5'
 export default {
   name: "index",
   props:["data","isLeader"],
-  components:{add},
+  components:{add,tableLayout},
   data(){
     return {
       tablecols:[],
+      delProductData:[],
       list:[],
       total:0,
       currentPage:0,
@@ -148,24 +98,29 @@ export default {
       if (val > 100){
         data.discountrate = 100
       }else if (val <= 0){
-        data.discountrate = 1
+        data.discountrate = 0
       }else {
         data.discountrate = Math.round(val * 100)/100
       }
       this.$set(this.list,index,data)
+      this.onSave(data)
     },
     onEdit(row){
       this.saveShow = true
       this.index = row.rowindex
     },
     async onSave(row){
-      row.discountrate =(row.discountrate/100).toFixed(4)
-      console.log(row,'保存的数据')
       const res = await this.$api.requested({
         "id": 20221124110202,
         "content": {
           "sa_contractid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
-          "items":[row]
+          "items":[
+            {
+              "sa_contract_itemsaleclassid": row.sa_contract_itemsaleclassid,
+              "itemclassid": row.itemclassid,
+              "discountrate": (row.discountrate/100).toFixed(4)
+            }
+          ]
         }
       })
       this.tool.showMessage(res,()=>{
@@ -179,22 +134,47 @@ export default {
       this.index = ''
       this.listData()
     },
-    async deleteProduct(row){
-      console.log(row)
+    selectionChange(val){
+      this.delProductData = []
+      val.forEach((item,index) => {
+        this.delProductData[index] = item.sa_contract_itemsaleclassid
+      })
+    },
+    /*批量删除判断*/
+    onDelProduct() {
+      this.$confirm('此操作将删除这些商品类别, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.delProduct()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消删除'
+        });
+      });
+    },
+    /*批量删除商品*/
+    async delProduct(){
       const res = await this.$api.requested({
         "id": 20221124111202,
         "content": {
           "sa_contractid":this.$route.query.id,
-          "sa_contract_itemsaleclassids":[row.sa_contract_itemsaleclassid]
-        }
+          "sa_contract_itemsaleclassids":this.delProductData
+        },
       })
       this.tool.showMessage(res,()=>{
         this.listData()
+        this.$emit("delSuccess")
       })
-    }
+    },
   },
   mounted() {
     this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).itemDiscountTable.tablecols
   }
 }
 </script>

+ 204 - 0
src/HDrpManagement/contractManage/components/itemClass/indexCopy.vue

@@ -0,0 +1,204 @@
+<template>
+  <div>
+    <div style="margin-bottom: 15px">
+      <el-input
+          size="small"
+          style="width: 200px;"
+          class="inline-16"
+          suffix-icon="el-icon-search"
+          v-model="param.content.where.condition"
+          placeholder="产品类别名称"
+          @keyup.enter.native="listData(param.content.pageNumber = 1)"
+          @clear="listData(param.content.pageNumber = 1)"
+          clearable>
+      </el-input>&nbsp;
+      <!--      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization" ></product_table>-->
+      <add v-if="tool.checkAuth($route.name,'productClassManage') && data.status === '新建' && isLeader" :data="data" class="inline-16" @itemClassAdd="listData"></add>
+    </div>
+    <div class="produtMag-panel">
+      <el-table
+          ref="multipleTable"
+          :data="list"
+          style="width: 100%"
+          height="calc(100vh - 500px)"
+          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
+          border
+      >
+        <!--        <el-table-column
+                    type="selection"
+                    width="55">
+                </el-table-column>-->
+        <el-table-column
+            prop="itemclassnum"
+            label="编号"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="itemclassfullname"
+            label="产品类别名称"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="brandname"
+            label="品牌"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="discountrate"
+            label="折扣(%)"
+            width="80"
+            fixed="right">
+          <template slot-scope="scope">
+            <div v-if=" !saveShow || index !== scope.row.rowindex">
+              <p><span >{{scope.row.discountrate}}</span></p>
+            </div>
+            <span v-else>
+              <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="operation"
+            fixed="right"
+            label="操作"
+            width="120">
+          <template slot-scope="scope">
+            <el-button  size="mini" type="text" class="inline-16" @click="onEdit(scope.row)" v-if="index !== scope.row.rowindex" :disabled="!tool.checkAuth($route.name,'productClassManage') || data.status !== '新建' || !isLeader">编 辑</el-button>
+            <el-button  size="mini" type="text" class="inline-16" @click="onSave(scope.row)" v-if="saveShow && index === scope.row.rowindex">保 存</el-button>
+            <el-popconfirm
+                title="确定删除该产品类别吗?"
+                @confirm="deleteProduct(scope.row)"
+            >
+              <el-button class="inline-16" slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'productClassManage') || data.status !== '新建' || !isLeader">删 除</el-button>
+            </el-popconfirm>
+
+<!--            <el-button  size="mini" type="text" class="inline-16" @click="onCancel" v-if="saveShow">取 消</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="height: 35px;margin-top: 20px">
+        <!--        <div style="float: left">总金额(元):{{ totalPrice }}</div>-->
+        <div style="float: right">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="param.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="100"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import add from './add'
+export default {
+  name: "index",
+  props:["data","isLeader"],
+  components:{add},
+  data(){
+    return {
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      index:'',
+      saveShow:false,
+      param:{
+        "id": 20221124135602,
+        "content": {
+          "sa_contractid": this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 100,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      for (var i=0 ;i<res.data.length;i++){
+        this.list[i].discountrate = Math.round((res.data[i].discountrate * 100)*100)/100
+        /* this.totalPrice = this.totalPrice + res.data[i].qty * res.data[i].price*/
+      }
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    onChangeDiscountrate(val,data,index){
+      if (val > 100){
+        data.discountrate = 100
+      }else if (val <= 0){
+        data.discountrate = 1
+      }else {
+        data.discountrate = Math.round(val * 100)/100
+      }
+      this.$set(this.list,index,data)
+    },
+    onEdit(row){
+      this.saveShow = true
+      this.index = row.rowindex
+    },
+    async onSave(row){
+      row.discountrate =(row.discountrate/100).toFixed(4)
+      console.log(row,'保存的数据')
+      const res = await this.$api.requested({
+        "id": 20221124110202,
+        "content": {
+          "sa_contractid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
+          "items":[row]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.saveShow = false
+        this.index = ''
+        this.listData()
+      })
+    },
+    onCancel(){
+      this.saveShow = false
+      this.index = ''
+      this.listData()
+    },
+    async deleteProduct(row){
+      console.log(row)
+      const res = await this.$api.requested({
+        "id": 20221124111202,
+        "content": {
+          "sa_contractid":this.$route.query.id,
+          "sa_contract_itemsaleclassids":[row.sa_contract_itemsaleclassid]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+      })
+    }
+  },
+  mounted() {
+    this.listData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 2 - 2
src/HDrpManagement/contractManage/components/productClassList/addProduct.vue

@@ -160,7 +160,7 @@ export default {
               {
                 "sa_contract_itemsaleclassid": 0,
                 "itemclassid": data.itemclassid,
-                "discountrate": '1'
+                "discountrate": data.discountrate
               }
             ]
         },
@@ -175,7 +175,7 @@ export default {
         return {
           "sa_contract_itemsaleclassid": 0,
           "itemclassid": item.itemclassid,
-          "discountrate": '1'
+          "discountrate":  item.discountrate
         }
       })
       

+ 51 - 13
src/HDrpManagement/contractManage/components/productClassList/productClassList.vue

@@ -4,14 +4,14 @@
       <div class="flex-align-center" style="margin-bottom:10px">
         <el-input size="small" style="width:200px;margin-right:10px" v-model="params.content.where.condition" placeholder="输入搜索内容" @clear="listData(params.content.pageNumber = 1)" @keyup.native.enter="listData(params.content.pageNumber = 1)" clearable></el-input>
         <slot name="addProduct"/>
+        <el-button v-if="tool.checkAuth($route.name,'productClassManage') && data.status === '新建' && isLeader" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
       </div>
-      <tableLayout :layout="tablecols" :data="list" :opwidth="200" :width="false"  :custom="true" fixedName="operation discountrate" height="calc(100vh - 500px)"
+      <tableLayout checkbox="true" :layout="tablecols" :data="list" :opwidth="200" :width="false"  :custom="true" fixedName="operation discountrate" height="calc(100vh - 500px)" @selectionChange="selectionChange"
                    :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
                    :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname == 'discountrate'">
-            <el-input size="mini" v-if="currentEdit.sa_contract_itemsaleclassid == scope.column.data.sa_contract_itemsaleclassid" v-model="scope.column.data.discountrate" @input="discountrateChange($event,scope.column.data)"></el-input>
-            <p v-else>{{scope.column.data[scope.column.columnname] }}</p>
+            <el-input v-model="scope.column.data.discountrate" size="mini" placeholder="请输入折扣" @change="discountrateChange(scope.column.data.discountrate,scope.column.data,scope.$index)"></el-input>
           </div>
           <div v-else-if="scope.column.columnname == 'brand'">
             {{scope.column.data[scope.column.columnname][0] && scope.column.data[scope.column.columnname][0].brandname}}
@@ -47,10 +47,12 @@ import addProduct from './addProduct'
 import previewImage from '@/components/previewImage/index'
 export default {
   components: {addProduct,previewImage},
+  props:["data","isLeader"],
   name: '',
   data() {
     return {
       list:[],
+      delProductData:[],
       params: {
           "id": 20221124135602,
           "content": {
@@ -77,7 +79,7 @@ export default {
   },
   created () {
     if (this.$route.query.id) this.listData()
-    this.tablecols = this.tool.tabelCol(this.$route.name).productClassTable.tablecols
+    this.tablecols = this.tool.tabelCol(this.$route.name).itemDiscountTable.tablecols
   },
   methods: {
     async listData(){
@@ -99,9 +101,16 @@ export default {
       console.log(num);
       
     },
-    discountrateChange (num,data) {
-      this.form.discountrate = Math.round(num * 100)/100
-      this.form.price = this.form.discountrate * data.marketprice
+    discountrateChange (val,data,index) {
+      if (val > 100){
+        data.discountrate = 100
+      }else if (val <= 0){
+        data.discountrate = 0
+      }else {
+        data.discountrate = Math.round(val * 100)/100
+      }
+      this.$set(this.list,index,data)
+      this.save(data)
     },
     priceChange (num,data) {
       this.form.price = num
@@ -110,12 +119,6 @@ export default {
       
     },
     async save (data) {
-      if (data.discountrate > 100){
-        data.discountrate = 100
-      }else if (data.discountrate < 0){
-        data.discountrate = 1
-      }
-      data.discountrate = Math.round(data.discountrate *100)/100
       let res = await this.$api.requested({
         "id":20221124110202,
         "content": {
@@ -145,6 +148,41 @@ export default {
       this.params.content.pageNumber = val
       this.listData()
     },
+    selectionChange(val){
+      this.delProductData = []
+      val.forEach((item,index) => {
+        this.delProductData[index] = item.sa_contract_itemsaleclassid
+      })
+    },
+    /*批量删除判断*/
+    onDelProduct() {
+      this.$confirm('此操作将删除这些商品类别, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.delProduct()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消删除'
+        });
+      });
+    },
+    /*批量删除商品*/
+    async delProduct(){
+      const res = await this.$api.requested({
+        "id": 20221124111202,
+        "content": {
+          "sa_contractid":this.$route.query.id,
+          "sa_contract_itemsaleclassids":this.delProductData
+        },
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+        this.$emit("delSuccess")
+      })
+    },
   },
 };
 </script>

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

@@ -74,20 +74,20 @@
       </div>
       <div slot="slot1" >
         <!--产品类别折扣表-->
-        <productClassList ref="classList" @priceChange="queryMainData" v-if="mainData.type == '框架'">
-          <addClass v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"/>
+        <productClassList :data="mainData" :isLeader="isLeader" ref="classList" @priceChange="queryMainData" v-if="mainData.type == '框架'">
+          <addClass class="inline-16" v-if="tool.checkAuth($route.name,'productClassManage')" :disabled="mainData.status != '新建' || !isLeader" slot="addProduct" @onSuccess="$refs.classList.listData()"/>
           <template v-slot:edit="scope">
-            <el-button 
+<!--            <el-button
               v-if="tool.checkAuth($route.name,'productClassManage')"
               class="inline-16" 
               :disabled="mainData.status != '新建' || !isLeader" 
               type="text" size="mini" slot="edit" 
               @click="$refs.classList.currentEdit = scope.data;$refs.classList.form = Object.assign({},$refs.classList.form,scope.data)"
-            >编 辑</el-button>
+            >编 辑</el-button>-->
           </template>
-          <template v-slot:del="scope">
+<!--          <template v-slot:del="scope">
             <delete-btn v-if="tool.checkAuth($route.name,'productClassManage')" :nameId="20221124111202" :disabled="mainData.status != '新建' || !isLeader" nameKey="sa_contract_itemsaleclassids" :id="scope.data.sa_contract_itemsaleclassid" @deleteSuccess="$refs.classList.listData()"></delete-btn>
-          </template>
+          </template>-->
         </productClassList>
         <!--    产品类别折扣    -->
         <itemClass :data="mainData" v-if="mainData.type == '项目'" :isLeader="isLeader" ></itemClass>

+ 5 - 1
src/HDrpManagement/toolBorrowingMag/detail/tabs/toolList.vue

@@ -7,6 +7,7 @@
     ></addTool>
 
     <el-button  class="inline-16 normal-margin" v-if="tool.checkAuth($route.name,'adddispatch')" size="small" type="primary" @click="adddispatch">一键发货</el-button>
+<!--    <excel style="margin:0 0 10px 10px" :tablecols="columnTitle" :param="param" :total="total" :excelTitle="excelTitle"></excel>-->
     <uploadAllData
         v-if="data.status === '新建'"
         class="inline-16 normal-margin"
@@ -200,11 +201,14 @@
 import addProduct from '@/template/toolBorrowingCanUseProduct/index.vue'
 import addTool from '@/template/addTool/index'
 import uploadAllData from '@/components/uploadAllData/index'
+import excel from '@/HDrpManagement/orderManage/details/export_excel'
 export default {
   props:['data','type'],
   data () {
     return {
       dataRefresh:true,
+      columnTitle:[],
+      excelTitle:'借用单明细',
       tableData:[],
       tablecolsAdd:[],
       param:{
@@ -242,7 +246,7 @@ export default {
     }
   },
   components:{
-    addProduct,addTool,uploadAllData
+    addProduct,addTool,uploadAllData,excel
   },
   methods:{
     async listData () {

+ 52 - 70
src/SDrpManagement/QuotedPrice/detail/modules/itemClass/index.vue

@@ -14,69 +14,17 @@
       </el-input>&nbsp;
       <!--      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization" ></product_table>-->
       <add v-if="tool.checkAuth($route.name,'itemClassDetails') && data.status === '新建' && disabled" class="inline-16" @itemClassAdd="listData" ></add>
+      <el-button v-if="tool.checkAuth($route.name,'itemClassDetails') && data.status === '新建' && disabled" size="small" :type="delProductData.length === 0?'':'primary'" @click="onDelProduct" :disabled="delProductData.length === 0">删 除</el-button>
     </div>
     <div class="produtMag-panel">
-      <el-table
-          ref="multipleTable"
-          :data="list"
-          style="width: 100%"
-          height="calc(100vh - 500px)"
-          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
-          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
-          border
-      >
-        <!--        <el-table-column
-                    type="selection"
-                    width="55">
-                </el-table-column>-->
-        <el-table-column
-            prop="itemclassnum"
-            label="编号"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="itemclassfullname"
-            label="产品类别名称"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="brandname"
-            label="品牌"
-            width="0">
-        </el-table-column>
-        <el-table-column
-            prop="discountrate"
-            label="折扣(%)"
-            width="100"
-            fixed="right">
-          <template slot-scope="scope">
-            <div v-if=" !saveShow || index !== scope.row.rowindex">
-              <p><span >{{scope.row.discountrate}}</span></p>
-            </div>
-            <span v-else>
-              <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
-            </span>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="operation"
-            fixed="right"
-            label="操作"
-            width="120">
-          <template slot-scope="scope">
-            <el-button  size="mini" type="text" class="inline-16" @click="onEdit(scope.row)" v-if="index !== scope.row.rowindex" :disabled="!tool.checkAuth($route.name,'itemClassDetails') || data.status !== '新建' || !disabled">编 辑</el-button>
-            <el-button  size="mini" type="text" class="inline-16" @click="onSave(scope.row)" v-if="saveShow && index === scope.row.rowindex">保 存</el-button>
-            <el-popconfirm
-                title="确定删除该产品类别吗?"
-                @confirm="deleteProduct(scope.row)"
-            >
-              <el-button class="inline-16" slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'itemClassDetails') || data.status !== '新建' || !disabled">删 除</el-button>
-            </el-popconfirm>
-
-<!--            <el-button  size="mini" type="text" class="inline-16" @click="onCancel" v-if="saveShow && index === scope.row.rowindex">取 消</el-button>-->
-          </template>
-        </el-table-column>
-      </el-table>
+      <tableLayout :layout="tablecols" checkbox="true"  :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="offerPrice amount" @selectionChange="selectionChange">
+        <template v-slot:customcol="scope">
+          <div v-if="scope.column.columnname == 'discountrate'">
+            <el-input v-model="scope.column.data.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.column.data.discountrate,scope.column.data,scope.$index)"></el-input>
+          </div>
+          <p v-else>{{scope.column.data[scope.column.columnname]}}</p>
+        </template>
+      </tableLayout>
       <div style="height: 35px;margin-top: 20px">
 <!--        <div style="float: left">总金额(元):{{ totalPrice }}</div>-->
         <div style="float: right">
@@ -99,13 +47,15 @@
 
 <script>
 import add from './add'
+import tableLayout from '@/components/table/index5'
 export default {
   name: "index",
   props:["data","disabled"],
-  components:{add},
+  components:{add,tableLayout},
   data(){
     return {
       tablecols:[],
+      delProductData:[],
       list:[],
       total:0,
       currentPage:0,
@@ -137,7 +87,7 @@ export default {
           this.list[i].discountrate = Math.round((res.data[i].discountrate)*100)/100
         }*/
         if (this.list[i].discountrate === 0){
-          this.list[i].discountrate = '--'
+          this.list[i].discountrate = 0
         }else {
           this.list[i].discountrate = Math.round((res.data[i].discountrate * 100)*100)/100
         }
@@ -159,23 +109,29 @@ export default {
       if (val > 100){
         data.discountrate = 100
       }else if (val <= 0){
-        data.discountrate = 1
+        data.discountrate = 0
       }else {
         data.discountrate = Math.round(val * 100)/100
       }
       this.$set(this.list,index,data)
+      this.onSave(data)
     },
     onEdit(row){
       this.saveShow = true
       this.index = row.rowindex
     },
     async onSave(row){
-      row.discountrate =(row.discountrate/100).toFixed(4)
       const res = await this.$api.requested({
         "id": 20230219161303,
         "content": {
           "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
-          "items":[row]
+          "items":[
+            {
+              "sa_quotedprice_itemclassid":row.sa_quotedprice_itemclassid,
+              "itemclassid":row.itemclassid,
+              "discountrate":(row.discountrate/100).toFixed(4)
+            }
+          ]
         }
       })
       this.tool.showMessage(res,()=>{
@@ -189,20 +145,46 @@ export default {
       this.index = ''
       this.listData()
     },
-    async deleteProduct(row){
+   selectionChange(val){
+      this.delProductData = []
+      val.forEach((item,index) => {
+        this.delProductData[index] = item.sa_quotedprice_itemclassid
+      })
+    },
+    /*批量删除判断*/
+    onDelProduct() {
+      this.$confirm('此操作将删除这些商品类别, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.delProduct()
+      }).catch(() => {
+        this.$message({
+          type: 'info',
+          message: '取消删除'
+        });
+      });
+    },
+    /*批量删除商品*/
+    async delProduct(){
       const res = await this.$api.requested({
         "id": 20230219161503,
         "content": {
-          "sa_quotedprice_itemclassids":[row.sa_quotedprice_itemclassid]
-        }
+          "sa_quotedprice_itemclassids":this.delProductData
+        },
       })
       this.tool.showMessage(res,()=>{
         this.listData()
+        this.$emit("delSuccess")
       })
-    }
+    },
   },
   mounted() {
     this.listData()
+  },
+  created() {
+    this.tablecols = this.tool.tabelCol(this.$route.name).itemDiscountTable.tablecols
   }
 }
 </script>

+ 212 - 0
src/SDrpManagement/QuotedPrice/detail/modules/itemClass/indexCopy.vue

@@ -0,0 +1,212 @@
+<template>
+  <div>
+    <div style="margin-bottom: 15px">
+      <el-input
+          size="small"
+          style="width: 200px;"
+          class="inline-16"
+          suffix-icon="el-icon-search"
+          v-model="param.content.where.condition"
+          placeholder="产品名称,编号"
+          @keyup.enter.native="listData(param.content.pageNumber = 1)"
+          @clear="listData(param.content.pageNumber = 1)"
+          clearable>
+      </el-input>&nbsp;
+      <!--      <product_table style="float: right" :data="data"  ref="quoterPrice" @productAdd="productInitialization" ></product_table>-->
+      <add v-if="tool.checkAuth($route.name,'itemClassDetails') && data.status === '新建' && disabled" class="inline-16" @itemClassAdd="listData" ></add>
+    </div>
+    <div class="produtMag-panel">
+      <el-table
+          ref="multipleTable"
+          :data="list"
+          style="width: 100%"
+          height="calc(100vh - 500px)"
+          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
+          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
+          border
+      >
+        <!--        <el-table-column
+                    type="selection"
+                    width="55">
+                </el-table-column>-->
+        <el-table-column
+            prop="itemclassnum"
+            label="编号"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="itemclassfullname"
+            label="产品类别名称"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="brandname"
+            label="品牌"
+            width="0">
+        </el-table-column>
+        <el-table-column
+            prop="discountrate"
+            label="折扣(%)"
+            width="100"
+            fixed="right">
+          <template slot-scope="scope">
+            <div v-if=" !saveShow || index !== scope.row.rowindex">
+              <p><span >{{scope.row.discountrate}}</span></p>
+            </div>
+            <span v-else>
+              <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
+            </span>
+          </template>
+        </el-table-column>
+        <el-table-column
+            prop="operation"
+            fixed="right"
+            label="操作"
+            width="120">
+          <template slot-scope="scope">
+            <el-button  size="mini" type="text" class="inline-16" @click="onEdit(scope.row)" v-if="index !== scope.row.rowindex" :disabled="!tool.checkAuth($route.name,'itemClassDetails') || data.status !== '新建' || !disabled">编 辑</el-button>
+            <el-button  size="mini" type="text" class="inline-16" @click="onSave(scope.row)" v-if="saveShow && index === scope.row.rowindex">保 存</el-button>
+            <el-popconfirm
+                title="确定删除该产品类别吗?"
+                @confirm="deleteProduct(scope.row)"
+            >
+              <el-button class="inline-16" slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'itemClassDetails') || data.status !== '新建' || !disabled">删 除</el-button>
+            </el-popconfirm>
+
+<!--            <el-button  size="mini" type="text" class="inline-16" @click="onCancel" v-if="saveShow && index === scope.row.rowindex">取 消</el-button>-->
+          </template>
+        </el-table-column>
+      </el-table>
+      <div style="height: 35px;margin-top: 20px">
+<!--        <div style="float: left">总金额(元):{{ totalPrice }}</div>-->
+        <div style="float: right">
+          <el-pagination
+              background
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="param.content.pageNumber"
+              :page-sizes="[20, 50, 100, 200]"
+              :page-size="100"
+              layout="total,sizes, prev, pager, next, jumper"
+              :total="total">
+          </el-pagination>
+        </div>
+
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import add from './add'
+export default {
+  name: "index",
+  props:["data","disabled"],
+  components:{add},
+  data(){
+    return {
+      tablecols:[],
+      list:[],
+      total:0,
+      currentPage:0,
+      index:'',
+      saveShow:false,
+      param:{
+        "id": 20230219161403,
+        "version":1,
+        "content": {
+          "sa_quotedpriceid":this.$route.query.id,
+          "pageNumber": 1,
+          "pageSize": 100,
+          "where": {
+            "condition": ""
+          }
+        }
+      }
+    }
+  },
+  methods:{
+    async listData(){
+      const res = await this.$api.requested(this.param)
+      this.list = res.data
+      this.total = res.total
+      for (var i=0 ;i<res.data.length;i++){
+        /*if (this.list[i].discountrate <= 1){
+          this.list[i].discountrate = Math.round((res.data[i].discountrate * 100)*100)/100
+        }else {
+          this.list[i].discountrate = Math.round((res.data[i].discountrate)*100)/100
+        }*/
+        if (this.list[i].discountrate === 0){
+          this.list[i].discountrate = '--'
+        }else {
+          this.list[i].discountrate = Math.round((res.data[i].discountrate * 100)*100)/100
+        }
+
+        /* this.totalPrice = this.totalPrice + res.data[i].qty * res.data[i].price*/
+      }
+    },
+    handleSizeChange(val) {
+      // console.log(`每页 ${val} 条`);
+      this.param.content.pageSize = val
+      this.productData()
+    },
+    handleCurrentChange(val) {
+      // console.log(`当前页: ${val}`);
+      this.param.content.pageNumber = val
+      this.productData()
+    },
+    onChangeDiscountrate(val,data,index){
+      if (val > 100){
+        data.discountrate = 100
+      }else if (val <= 0){
+        data.discountrate = 1
+      }else {
+        data.discountrate = Math.round(val * 100)/100
+      }
+      this.$set(this.list,index,data)
+    },
+    onEdit(row){
+      this.saveShow = true
+      this.index = row.rowindex
+    },
+    async onSave(row){
+      row.discountrate =(row.discountrate/100).toFixed(4)
+      const res = await this.$api.requested({
+        "id": 20230219161303,
+        "content": {
+          "sa_quotedpriceid":this.$route.query.id,     //sat_notice_classid<=0时 为新增
+          "items":[row]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.saveShow = false
+        this.index = ''
+        this.listData()
+      })
+    },
+    onCancel(){
+      this.saveShow = false
+      this.index = ''
+      this.listData()
+    },
+    async deleteProduct(row){
+      const res = await this.$api.requested({
+        "id": 20230219161503,
+        "content": {
+          "sa_quotedprice_itemclassids":[row.sa_quotedprice_itemclassid]
+        }
+      })
+      this.tool.showMessage(res,()=>{
+        this.listData()
+      })
+    }
+  },
+  mounted() {
+    this.listData()
+  }
+}
+</script>
+
+<style scoped>
+
+</style>

+ 0 - 244
src/SDrpManagement/QuotedPrice/detail/modules/productInventory/index.vue

@@ -38,250 +38,6 @@
       ></addProduct>
     </div>
     <div class="produtMag-panel">
-<!--      <el-table
-          ref="multipleTable"
-          :data="list"
-          style="width: 100%"
-          height="calc(100vh - 500px)"
-          :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400'}"
-          :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}"
-          @selection-change="selectionChange"
-         border>
-        <el-table-column
-            type="selection"
-            width="55"
-            fixed>
-        </el-table-column>
-&lt;!&ndash;        <el-table-column
-            align="center"
-            label="产品图"
-            width="100">
-          <template slot-scope="scope">
-            <div v-if="scope.row.attinfos[0]">
-              <previewImage class="image" :image="scope.row.attinfos[0]" :list="scope.row.attinfos" :deletebtn="false"></previewImage>
-            </div>
-          </template>
-        </el-table-column>&ndash;&gt;
-        <el-table-column
-            prop="itemname"
-            label="商品名称"
-            width="180">
-        </el-table-column>
-        <el-table-column
-            prop="itemno"
-            label="编码"
-            width="180">
-        </el-table-column>
-        <el-table-column
-            prop="erpitemno"
-            label="品号"
-            width="180">
-        </el-table-column>
-        <el-table-column
-            label="型号"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.model}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="marketprice"
-            label="牌价"
-            width="80"
-        >
-          <template slot-scope="scope">
-            <p><span>{{scope.row.marketprice?tool.formatAmount(scope.row.marketprice,2):'&#45;&#45;'}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="num"
-            label="数量"
-            width="160"
-        >
-          <template slot-scope="scope">
-            <span>
-&lt;!&ndash;              <el-input-number :disabled="!saveShow || index !== scope.row.rowindex" v-model="scope.row.qty" size="mini"  :min="1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>&ndash;&gt;
-                  <el-input-number :disabled="data.status !== '新建'" v-model="scope.row.qty" size="mini"  :min="1" label="描述文字" @change="onChangeNum(scope.row.qty,scope.row,scope.$index)"></el-input-number>
-
-            </span>
-          </template>
-        </el-table-column>
-        
-        <el-table-column
-            prop="discountrate"
-            label="折扣(%)"
-            width="100"
-        >
-          <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount >= 0 ">
-              <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
-                 <el-input :disabled="data.status !== '新建'"  v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
-              </span>
-            </div>
-            <div v-else-if="scope.row.discountDifferenceAmount < 0 ">
-              <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
-                 <el-input :disabled="data.status !== '新建'"  v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
-              </span>
-            </div>
-&lt;!&ndash;            <span v-else>
-              <span v-if="saveShow && index === scope.row.rowindex">
-                 <el-input v-model="scope.row.discountrate" size="mini" placeholder="请输入折扣" @change="onChangeDiscountrate(scope.row.discountrate,scope.row,scope.$index)"></el-input>
-              </span>
-              <span v-else>
-                <span >{{tool.formatAmount(scope.row.discountrate,2)}}</span>
-              </span>
-
-            </span>&ndash;&gt;
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="price"
-            label="单价"
-            width="120"
-        >
-          <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount >= 0 ">
-              <p v-if="!disabled"><span :style="[setTopColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
-              <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
-                <el-input :disabled="data.status !== '新建'"  v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
-              </span>
-            </div>
-            <div v-else-if="scope.row.discountDifferenceAmount < 0 " >
-              <p v-if="!disabled"><span :style="[setDownColor]">{{tool.formatAmount(scope.row.price,2)}}</span></p>
-              <span v-if="tool.checkAuth($route.name,'productDetails') || data.status == '新建' || disabled">
-                <el-input :disabled="data.status !== '新建'"  v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
-              </span>
-            </div>
-&lt;!&ndash;            <span v-else>
-              <span v-if="saveShow && index === scope.row.rowindex">
-                <el-input v-model="scope.row.price" size="mini" placeholder="请输入单价" @change="onChangePrice(scope.row.price,scope.row,scope.$index)"></el-input>
-              </span>
-               <span v-else>
-                <span >{{tool.formatAmount(scope.row.price,2)}}</span>
-              </span>
-            </span>&ndash;&gt;
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="discountDifferenceAmount"
-            label="单价差额(元)"
-            width="100"
-        >
-          <template slot-scope="scope">
-            <p><span>{{tool.formatAmount(scope.row.discountDifferenceAmount,2)}}</span></p>
-          </template>
-        </el-table-column>
-        
-        
-        
-        <el-table-column
-            label="规格"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.spec}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="material"
-            label="材质"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.material?scope.row.material:'&#45;&#45;'}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="standards"
-            label="标准"
-            width="100">
-        </el-table-column>
-        <el-table-column
-            prop="unitid"
-            label="计量单位"
-            width="100">
-          <template slot-scope="scope">
-            <el-tag size="mini" type="info" effect="plain">{{scope.row.unitname}}/{{scope.row.axunitname}}</el-tag>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="device"
-            label="装置"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.device || '&#45;&#45;'}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="prodline"
-            label="产线"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.prodline || '&#45;&#45;'}}</span></p>
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="specalnote"
-            label="特殊说明"
-            width="180">
-          <template slot-scope="scope">
-            <p><span>{{scope.row.specalnote || '&#45;&#45;'}}</span></p>
-          </template>
-        </el-table-column>
-        
-
-        <el-table-column
-            prop="mindiscountrate"
-            label="最低授权折扣(%)"
-            width="80"
-            >
-          <template slot-scope="scope">
-            <p><span>{{scope.row.mindiscountrate}}</span></p>
-          </template>
-        </el-table-column>
-
-        <el-table-column
-            prop="amount"
-            label="金额"
-            width="100"
-            fixed="right">
-          <template slot-scope="scope">
-            <div v-if="scope.row.discountDifferenceAmount >= 0  ">
-              <p ><span style="color: #79da56">{{tool.formatAmount(scope.row.amount,2)}}</span></p>
-            </div>
-            <div v-else-if="scope.row.discountDifferenceAmount < 0 " >
-              <p><span style="color: #ef230c ">{{tool.formatAmount(scope.row.amount,2)}}</span></p>
-            </div>
-&lt;!&ndash;            <p v-else><span>{{tool.formatAmount(scope.row.amount,2)}}</span></p>&ndash;&gt;
-          </template>
-        </el-table-column>
-        <el-table-column
-            prop="specialoffer"
-            label="是否特价"
-            width="50"
-            fixed="right">
-          <template slot-scope="scope">
-            <i class="el-icon-check" v-if="scope.row.discountDifferenceAmount < 0"  style="color: red;font-size: 20px"></i>
-            <p v-else>&#45;&#45;</p>
-          </template>
-        </el-table-column>
-        &lt;!&ndash; <el-table-column
-            prop="operation"
-            fixed="right"
-            label="操作"
-            width="120">
-          <template slot-scope="scope">
-            <el-button  size="mini" type="text" class="inline-16" @click="onEdit(scope.row)" v-if="index !== scope.row.rowindex" :disabled="!tool.checkAuth($route.name,'productDetails') || data.status !== '新建' || !disabled">编 辑</el-button>
-            <el-button  size="mini" type="text" class="inline-16" @click="onSave(scope.row)" v-if="saveShow && index === scope.row.rowindex">保 存</el-button>
-            <el-popconfirm
-                title="确定删除该产品吗?"
-                @confirm="deleteProduct(scope.row)"
-            >
-              <el-button class="inline-16" slot="reference" size="mini" type="text"  :disabled="!tool.checkAuth($route.name,'productDetails') || data.status !== '新建' || !disabled" >删 除</el-button>
-            </el-popconfirm>
-
-           <el-button  size="mini" type="text" class="inline-16" @click="saveShow = false;index = '';productData()" v-if="saveShow && index === scope.row.rowindex">取 消</el-button>
-          </template>
-        </el-table-column> &ndash;&gt;
-      </el-table>-->
       <tableLayout :layout="tablecols" checkbox="true"  :data="list" :opwidth="200" height="calc(100vh - 550px)" :width="true" :custom="true" fixedName="offerPrice amount" @selectionChange="selectionChange">
         <template v-slot:customcol="scope">
           <div v-if="scope.column.columnname == 'qty'">

+ 1 - 1
src/components/dynamic-table/index.vue

@@ -5,7 +5,7 @@
               :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
           type="selection"
-          width="55"  v-if="checkbox">
+          width="35" fixed v-if="checkbox">
       </el-table-column>
       <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="width && col.width === 0 ? 150 : col.width" :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">

+ 17 - 23
src/components/table/index5.vue

@@ -1,19 +1,22 @@
 <template>
   <div>
-    <el-table ref="tables" :row-class-name="tableClassName" v-loading="loading" highlight-current-row :data="data" :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
-              :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}" size="mini" :height="height" @row-click="rowClick" style="width:100%" @selection-change="handleSelectionChange"  border>
+    <!-- :header-cell-style="{background:'#EEEEEE',color:'#333'}" -->
+    <el-table ref="table" :row-class-name="tableClassName" highlight-current-row :data="data"  size="mini"  :height="height" @row-click="rowClick" style="width:100%;min-height:910px;" :header-cell-style="{height:'50px',color:'#606266',fontWeight:'400',fontSize:'14px'}"
+              :cell-style="{height:'50px',color:'#666666',fontWeight:'400'}" border @selection-change="selectionChange">
       <el-table-column
-        type="selection"
-        width="55" @handleSelectionChange="handleSelectionChange"  >
+          type="selection"
+          width="35" fixed v-if="checkbox">
       </el-table-column>
-      <el-table-column  v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title" :width="col.width">
+      <el-table-column v-for="col in layout" :key="col.tablecolid" :prop="col.columnname" :label="col.title"  :fixed="fixedName ? fixedName.indexOf(col.columnname)!= -1?'right':false : false">
         <template slot-scope="scope">
-          <!-- 自定义表格显示内容 -->
-          <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
-          <!-- 否则就是默认 -->
-          <span v-else>{{scope.row[col.columnname]}}</span>
-          <!-- 操作结构内容 -->
-          <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+          <div class="table-panel">
+            <!-- 自定义表格显示内容 -->
+            <slot v-if="custom" name="customcol" :column="{data:scope.row,columnname:col.columnname}"></slot>
+            <!-- 否则就是默认 -->
+            <span v-else>{{scope.row[col.columnname]}}</span>
+            <!-- 操作结构内容 -->
+            <slot v-if="col.columnname === 'operation'" name="opreation" :data="scope.row"></slot>
+          </div>
         </template>
       </el-table-column>
     </el-table>
@@ -29,7 +32,7 @@ export default {
     custom:是否启用自定义结构;
     opwidth:操作列宽度
   */
-  props:['layout','data','custom','height','checkbox'],
+  props:['layout','data','custom','height','fixedName','width','checkbox'],
   data () {
     return {
       list:[],
@@ -47,20 +50,11 @@ export default {
     tableClassName ({row,rowIndex}) {
       row.index = rowIndex
     },
-    handleSelectionChange(val) {
-      this.$emit('checkboxCallBack',val)      
-    },
-    isCheck(row,rowIndex) {
-      if (!row.status) return true
-      if(row.status == '待跟进' || row.status == '跟进中' || row.projectnum) {
-        return true
-      } else {
-        return false
-      }
+    selectionChange(row){
+      this.$emit('selectionChange',row)
     }
   },
   mounted () {
-    // this.listData()
   }
 }
 

+ 1 - 1
vue.config.js

@@ -15,7 +15,7 @@ module.exports = {
       proxy: {
         '/apis': {
           // target: 'http://61.164.207.46:8000',  // target host*/
-          // target: 'http://192.168.3.9:8080',  // 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