Jelajahi Sumber

【修改】优化政策货品列表

howie 2 tahun lalu
induk
melakukan
4881db9448

+ 9 - 7
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -51,7 +51,7 @@
             <div class="value">{{ details.refTel }}</div>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <el-col :xs="24" :sm="24" :lg="16" class="item">
             <div class="label">跨区厂编号</div>
             <div class="value">
 <!--              {{ details.refFactoryNo }}-->
@@ -73,7 +73,7 @@
             <div class="label">押金总额</div>
             <div class="value">{{ details.depositAmount }}</div>
           </el-col>
-          <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
             <div class="label">工程差价总额</div>
             <div class="value">{{ details.depositDiffAmount }}</div>
           </el-col>
@@ -83,7 +83,7 @@
                  <el-input  v-model=" details.geLiInerNote" placeholder="格力备注" ></el-input>
               </div>
             </el-col>
-          <el-col :xs="24" :sm="24" :lg="16" class="item">
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
             <div class="label">使用单位</div>
             <div class="value">{{ details.refUseUnit }}</div>
           </el-col>
@@ -210,7 +210,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <template v-if="detailList.examineStatus !== 'WAIT'">
+                <template v-if="details.examineStatus !== 'WAIT'">
                   {{ scope.row.contractQty }}
                 </template>
                 <el-input
@@ -230,7 +230,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <template v-if="detailList.examineStatus !== 'WAIT'">
+                <template v-if="details.examineStatus !== 'WAIT'">
                   {{ scope.row.contractPrice }}
                 </template>
                 <el-input
@@ -249,7 +249,7 @@
               show-overflow-tooltip
             >
               <template slot-scope="scope">
-                <template v-if="detailList.examineStatus !== 'WAIT'">
+                <template v-if="details.examineStatus !== 'WAIT'">
                   {{ comTotal(scope.row.contractQty,scope.row.contractPrice) }}
                 </template>
                 <div v-else>
@@ -686,5 +686,7 @@ export default {
   transition: all 0.3s;
 }
 }
-
+.value{
+  overflow: hidden;
+}
 </style>

+ 17 - 7
src/views/sales_policy/components/AddPolicy.vue

@@ -162,6 +162,8 @@
             fit
             highlight-current-row
             stripe
+            v-el-select-loadmore="loadmore2"
+
           >
             <el-table-column
               type="index"
@@ -181,7 +183,6 @@
 
                 <el-select
                   v-model="scope.row.materialNumber"
-                  v-el-select-loadmore="loadmore"
                   size="mini"
                   :remote-method="(query) => remoteMethod(query, 'number')"
                   filterable
@@ -530,7 +531,7 @@ export default {
       bind(el, binding) {
         // 获取element-ui定义好的scroll盒⼦
         const SELECTWRAP_DOM = el.querySelector(
-          ".el-select-dropdown .el-select-dropdown__wrap"
+          ".el-table__body-wrapper"
         );
         SELECTWRAP_DOM.addEventListener("scroll", function () {
           /**
@@ -640,9 +641,18 @@ export default {
         this.$successMsg("删除成功");
       });
     },
-    loadmore() {
-      this.sleectBox.currentPage++;
-      this.getK3List();
+    // loadmore() {
+    //   this.sleectBox.currentPage++;
+    //   this.getK3List();
+    // },
+    loadmore2(){
+       if(this.dataList.length<this.listTotal){
+        let total = Math.floor(this.listTotal/10)
+          if (this.dcurrentPage<=total) {
+            this.dcurrentPage++
+           this.handletwoList()
+          }
+        }
     },
     getK3List() {
       getK3List({
@@ -840,7 +850,7 @@ export default {
 
       const paramss = {
         pageNum: this.dcurrentPage,
-        pageSize: -1,
+        pageSize: 10,
         policyId: this.comCode,
         saleTypeCode: "",
       };
@@ -867,7 +877,7 @@ export default {
             });
           });
           // this.dataList=[]
-          this.dataList = result.data.records;
+          this.dataList = [...this.dataList,result.data.records];
           this.listTotal = result.data.total;
           this.listLoading = false;
         })

+ 21 - 9
src/views/sales_policy/components/editPolicy.vue

@@ -154,7 +154,7 @@
             fit
             highlight-current-row
             stripe
-
+            v-el-select-loadmore="loadmore2"
           >
             <el-table-column
               type="index"
@@ -173,7 +173,7 @@
       <CopyButton :copyText="scope.row.materialNumber" />
                 <el-select
                   v-model="scope.row.materialNumber"
-                  v-el-select-loadmore="loadmore"
+
                   size="mini"
                   :remote-method="(query)=>remoteMethod(query,'number')"
                   filterable
@@ -358,6 +358,7 @@
                 </el-popconfirm>
               </template>
             </el-table-column>
+
           </el-table>
           </div>
           <!-- 分页 -->
@@ -516,9 +517,11 @@ export default {
   directives: {
     'el-select-loadmore': {
       bind(el, binding) {
+          console.log(el);
         // 获取element-ui定义好的scroll盒⼦
         const SELECTWRAP_DOM = el.querySelector(
-          '.el-select-dropdown .el-select-dropdown__wrap'
+          ".el-table__body-wrapper"
+          // '.el-select-dropdown .el-select-dropdown__wrap'
         )
         SELECTWRAP_DOM.addEventListener('scroll', function() {
           /**
@@ -640,9 +643,18 @@ export default {
       this.$refs.comDom.getCommonApi(this.conditionList[0].id)
       this.$store.commit('sales/setId', this.searchForm.code)
     },
-    loadmore() {
-      this.sleectBox.currentPage++
-      this.getK3List()
+    // loadmore() {
+    //   this.sleectBox.currentPage++
+    //   this.getK3List()
+    // },
+    loadmore2(){
+       if(this.dataList.length<this.listTotal){
+        let total = Math.floor(this.listTotal/10)
+          if (this.dcurrentPage<=total) {
+            this.dcurrentPage++
+           this.handletwoList()
+          }
+        }
     },
     getK3List() {
       getK3List({
@@ -863,8 +875,8 @@ export default {
       this.listLoading = true
       const paramss = {
         pageNum: this.dcurrentPage,
-        pageSize: -1,
-        policyId: this.searchForm.code,
+        pageSize: 10,
+         policyId: this.searchForm.code,
         saleTypeCode: ''
       }
       getMaterialList(paramss)
@@ -888,7 +900,7 @@ export default {
             })
           })
 
-          this.dataList = result.data.records
+          this.dataList = [...this.dataList,...result.data.records]
           this.listTotal = result.data.total
           this.listLoading = false
         })