瀏覽代碼

fix:修改

maliang 1 月之前
父節點
當前提交
d5e12ccb16

+ 1 - 1
jshERP-web/src/views/stock/CheckList.vue

@@ -159,7 +159,7 @@ export default {
           this.$set(this.queryParam, i, null)
         }
       }
-      const url = this.url.list + '?pageNum=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
       this.loading = true
       const params = { ...this.queryParam }
       postAction(url, params).then((res) => {

+ 1 - 1
jshERP-web/src/views/stock/components/editForm.vue

@@ -71,7 +71,7 @@
           <a-input placeholder="请输入" disabled v-decorator.trim="['operTime']" />
         </a-form-item>
       </a-col>
-      <a-col v-show="false" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
+      <a-col v-show="true" :xl="6" :lg="8" :md="12" :sm="24" class="form-col">
         <a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="盘点状态">
           <a-select placeholder="请选择" v-decorator="['taskStatus']" :options="taskStatusList" :disabled="isDisabled">
           </a-select>

+ 31 - 16
jshERP-web/src/views/stock/components/stockModal.vue

@@ -9,7 +9,7 @@
           :rules="rules"
           :stockVisible="stockVisible"
           ref="editForm"
-          :total="dataSource.length || 0"
+          :total="ipagination.total"
           :openType="openType"
           :stockType="stockType"
           @getForm="getForm"
@@ -29,7 +29,7 @@
             :dataSource="dataSource"
             :loading="loading"
             :scroll="{ y: 500 }"
-            :pagination="false"
+            :pagination="ipagination"
             @change="handleTableChange"
           >
             <span v-if="isShowBtn" slot="action" slot-scope="text, record">
@@ -126,6 +126,7 @@ export default {
       form: {},
       isShow: false,
       stockType: 'task',
+      batchNumberStr: ''
     }
   },
   watch: {
@@ -230,32 +231,39 @@ export default {
         .filter((item) => item)
         .join(',')
         console.log('rows', rows)
+        console.log('ids', ids)
+        console.log('str===', str)
       getAction('/materialBatch/findBatchNumbersByBarCode',{
         barCodes: str,
       }).then((res) => {
-        this.getBatchData(res.data)
+        const batchStr = res.data.split(',')
+        .filter((item) => item)
+        .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
       })
     },
     findAllSelect() {
       // const params = { ...this.$refs.selectModal.queryParam }
       getAction('/materialBatch/findBatchNumbersByBarCode').then((res) => {
         this.$refs.selectModal.close()
-        this.getBatchData(res.data)
-      })
-    },
-    getBatchData(val) {
-      const batchStr = val
-        .split(',')
+        const batchStr = res.data.split(',')
         .filter((item) => item)
         .join(',')
+        this.batchNumberStr = batchStr
+        this.getBatchData()
+      })
+    },
+    getBatchData() {
       const params = {
-        batchNumber: batchStr,
-        organId: '',
-        mpList: '',
-        prefixNo: '',
+        batchNumber: this.batchNumberStr,
+        // organId: '',
+        // mpList: '',
+        // prefixNo: '',
       }
-      getMaterialByBatchNumber(params).then((res) => {
-        this.dataSource.push(...res.data)
+      getAction(`/material/getMaterialByBatchNumber?currentPage=${this.ipagination.current}&pageSize=${this.ipagination.pageSize}`, params).then((res) => {
+        this.dataSource = res.data.rows
+        this.ipagination.total = Number(res.data.total)
         this.dataSource = this.dataSource.reduce((acc, cur) => {
           const hasDuplicate = acc.some((item) => item.batchNumber === cur.batchNumber)
           if (!hasDuplicate) {
@@ -276,6 +284,8 @@ export default {
 
     onClearList(val) {
       this.dataSource = []
+      this.ipagination.current = 1
+      this.ipagination.total = 0
       this.getForm(val)
       if (val.taskType === 1) {
         this.findAllSelect()
@@ -285,7 +295,12 @@ export default {
     handleDrag() {},
     // ipagination() {},
 
-    handleTableChange() {},
+    handleTableChange(pagination) {
+      if (pagination && pagination.current) {
+        this.ipagination = pagination
+      }
+      this.getBatchData()
+    },
   },
 }
 </script>

+ 2 - 1
jshERP-web/src/views/system/AppVersionList.vue

@@ -65,7 +65,8 @@ export default {
         this.ipagination.current = 1
       }
       this.loading = true
-      postAction(this.url.list, {}).then((res) => {
+      const url = this.url.list + '?currentPage=' + this.ipagination.current + '&pageSize=' + this.ipagination.pageSize
+      postAction(url, {}).then((res) => {
         if (res.code === 200) {
           this.dataSource = res.data.rows
           this.ipagination.total = Number(res.data.total)