chenrui 11 ay önce
ebeveyn
işleme
d95eb6c05d

+ 2 - 3
src/views/allocationManagement/allocateReturnConfirmation/detailModal.vue

@@ -16,6 +16,7 @@
 </template>
 
 <script>
+// 组件
 import detail from '@/views/allocationManagement/transferReturn/detail'
 export default {
   name: 'AllocateReturnDetailModal',
@@ -35,8 +36,6 @@ export default {
       isShow: this.openModal //  是否打开弹框
     }
   },
-  methods: {
-  },
   watch: {
     //  父页面传过来的弹框状态
     openModal (newValue, oldValue) {
@@ -47,7 +46,7 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$store.state.app.curActionPermission = ''
-      }else{
+      } else {
         this.$store.state.app.curActionPermission = 'M_allocateReturnConfirmationDetail'
       }
     }

+ 332 - 304
src/views/allocationManagement/allocateReturnConfirmation/list.vue

@@ -3,50 +3,72 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper" >
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="transferReturnConfirmation-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate id="transferReturnConfirmation-rangeDate" ref="rangeDate" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="调拨退货单号">
-                <a-input id="transferReturnConfirmation-allocateReturnNo" v-model.trim="queryParam.allocateReturnNo"
-                  allowClear placeholder="请输入调拨退货单号" />
+                <a-input
+                  id="transferReturnConfirmation-allocateReturnNo"
+                  v-model.trim="queryParam.allocateReturnNo"
+                  allowClear
+                  placeholder="请输入调拨退货单号" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-item label="客户名称" :label-col="{ span:7 }" :wrapper-col="{ span:17}">
-                <a-input id="transferReturnConfirmation-targetName" v-model.trim="queryParam.targetName" allowClear
+                <a-input
+                  id="transferReturnConfirmation-targetName"
+                  v-model.trim="queryParam.targetName"
+                  allowClear
                   placeholder="请输入客户名称" />
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-item label="是否抓单">
-                  <v-select v-model="queryParam.grabFlag" ref="grabFlag" id="transferReturnConfirmation-grabFlag"
-                    code="FLAG" placeholder="请选择" allowClear></v-select>
+                  <v-select
+                    v-model="queryParam.grabFlag"
+                    ref="grabFlag"
+                    id="transferReturnConfirmation-grabFlag"
+                    code="FLAG"
+                    placeholder="请选择"
+                    allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="状态">
-                  <v-select v-model="queryParam.state" ref="state" id="transferReturnConfirmation-state"
-                    code="ALLOCATE_RETURN_STATE_CONFIRM" placeholder="请选择状态" allowClear></v-select>
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="transferReturnConfirmation-state"
+                    code="ALLOCATE_RETURN_STATE_CONFIRM"
+                    placeholder="请选择状态"
+                    allowClear></v-select>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="仓库">
-                  <chooseWarehouse ref="warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
+                  <chooseWarehouse ref="warehouse" id="transferReturnConfirmation-warehouse" v-model="queryParam.warehouseSn"></chooseWarehouse>
                 </a-form-model-item>
               </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
-              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled"
+              <a-button
+                type="primary"
+                @click="$refs.table.refresh(true)"
+                :disabled="disabled"
                 id="transferReturnConfirmation-refresh">查询</a-button>
-              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled"
+              <a-button
+                style="margin-left: 5px"
+                @click="resetSearchForm"
+                :disabled="disabled"
                 id="transferReturnConfirmation-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="transferReturnConfirmation-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
@@ -58,28 +80,36 @@
     <a-card size="small" :bordered="false">
       <a-spin :spinning="spinning" tip="Loading...">
         <!-- 列表 -->
-        <s-table 
-        class="sTable fixPagination" 
-        ref="table" 
-        :style="{ height: tableHeight+70+'px' }" 
-        size="small"
-        :rowKey="(record) => record.id" 
-        :columns="columns" 
-        :pageSize="30"
-        :data="loadData" :scroll="{ y: tableHeight }"
-        :defaultLoadData="false" bordered>
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+70+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :pageSize="30"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
           <!-- 销退单号 -->
           <template slot="allocateReturnNo" slot-scope="text, record">
-            <span v-if="$hasPermissions('M_allocateReturnConfirmationDetail')" class="link-bule"
+            <span
+              v-if="$hasPermissions('M_allocateReturnConfirmationDetail')"
+              class="link-bule"
+              :id="'transferReturnConfirmation-allocateReturnNo-'+record.id"
               @click="handleDetail(record)">{{ record.allocateReturnNo }}</span>
             <span v-else>{{ record.allocateReturnNo }}</span>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
-            <a-button size="small" type="link"
+            <a-button
+              size="small"
+              type="link"
               v-if="record.state=='WAIT_FINANCIAL_AUDIT' && $hasPermissions('B_allocateReturnConfirmationAudit')"
-              class="button-warning" @click="handleAudit(record)"
-              id="transferReturnConfirmation-audit-btn">退货确认</a-button>
+              class="button-warning"
+              @click="handleAudit(record)"
+              :id="'transferReturnConfirmation-submit-'+record.id">退货确认</a-button>
             <span v-else>--</span>
           </template>
         </s-table>
@@ -91,304 +121,302 @@
 </template>
 
 <script>
-  import {
-    commonMixin
-  } from '@/utils/mixin'
-  import rangeDate from '@/views/common/rangeDate.vue'
-  import {
-    STable,
-    VSelect
-  } from '@/components'
-  import AllocateReturnDetailModal from './detailModal.vue'
-  import chooseWarehouse from '@/views/common/chooseWarehouse'
-  import {
-    allocateReturnQueryConfirmPage,
-    allocateReturnFinanceAudit
-  } from '@/api/allocateReturn'
-  export default {
-    name: 'AllocateReturnConfirmationList',
-    mixins: [commonMixin],
-    components: {
-      STable,
-      VSelect,
-      AllocateReturnDetailModal,
-      rangeDate,
-      chooseWarehouse
-    },
-    data() {
-      return {
-        spinning: false,
-        tableHeight: 0,
-        queryParam: { //  查询条件
-          beginDate: '',
-          endDate: '',
-          allocateReturnNo: '', //  单号
-          targetName: '',
-          grabFlag: undefined,
-          state: undefined, //  状态
-          warehouseSn: undefined
-        },
-        disabled: false, //  查询、重置按钮是否可操作
-        advanced: true,
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          this.spinning = true
-          return allocateReturnQueryConfirmPage(Object.assign(parameter, this.queryParam)).then(res => {
-            let data
-            if (res.status == 200) {
-              data = res.data
-              const no = (data.pageNo - 1) * data.pageSize
-              for (var i = 0; i < data.list.length; i++) {
-                data.list[i].no = no + i + 1
-              }
-              this.disabled = false
-            }
-            this.spinning = false
-            return data
-          })
-        },
-        openModal: false,
-        itemSn: ''
-      }
-    },
-    // 根据权限显示列表字段
-    computed: {
-      columns() {
-        const arr = [{
-            title: '序号',
-            dataIndex: 'no',
-            width: '4%',
-            align: 'center'
-          },
-          {
-            title: '创建时间',
-            dataIndex: 'createDate',
-            width: '11%',
-            align: 'center',
-            customRender: function(text) {
-              return text || '--'
-            }
-          },
-          {
-            title: '退货单号',
-            scopedSlots: {
-              customRender: 'allocateReturnNo'
-            },
-            width: '16%',
-            align: 'center'
-          },
-          {
-            title: '调拨退货客户',
-            dataIndex: 'targetName',
-            align: 'center',
-            width: '15%',
-            customRender: function(text) {
-              return text || '--'
-            },
-            ellipsis: true
-          },
-          {
-            title: '仓库',
-            dataIndex: 'warehouseName',
-            align: 'center',
-            width: '15%',
-            customRender: function(text) {
-              return text || '--'
-            },
-            ellipsis: true
-          },
-          {
-            title: '是否抓单',
-            dataIndex: 'grabFlagDictValue',
-            width: '7%',
-            align: 'center',
-            customRender: function(text) {
-              return text || '--'
-            }
-          },
-          {
-            title: '退货总数量',
-            dataIndex: 'totalQty',
-            width: '7%',
-            align: 'center',
-            customRender: function(text) {
-              return ((text || text == 0) ? text : '--')
-            }
-          },
-          {
-            title: '坏件数量',
-            dataIndex: 'totalBadQty',
-            width: '7%',
-            align: 'center',
-            customRender: function(text) {
-              return ((text || text == 0) ? text : '--')
-            }
-          },
-          {
-            title: '返库数量',
-            dataIndex: 'totalBackStockQty',
-            width: '7%',
-            align: 'center',
-            customRender: function(text) {
-              return ((text || text == 0) ? text : '--')
-            }
-          },
-          // { title: '退货总金额', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
-          {
-            title: '确认时间',
-            dataIndex: 'financeAuditTime',
-            width: '11%',
-            align: 'center',
-            customRender: function(text) {
-              return text || '--'
-            }
-          },
-          {
-            title: '状态',
-            dataIndex: 'stateDictValue',
-            width: '6%',
-            align: 'center',
-            customRender: function(text) {
-              return text || '--'
+import { commonMixin } from '@/utils/mixin'
+// 组件
+import rangeDate from '@/views/common/rangeDate.vue'
+import { STable, VSelect } from '@/components'
+import AllocateReturnDetailModal from './detailModal.vue'
+import chooseWarehouse from '@/views/common/chooseWarehouse'
+// 接口
+import { allocateReturnQueryConfirmPage, allocateReturnFinanceAudit } from '@/api/allocateReturn'
+export default {
+  name: 'AllocateReturnConfirmationList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, AllocateReturnDetailModal, rangeDate, chooseWarehouse },
+  data () {
+    return {
+      spinning: false,
+      tableHeight: 0, // 表格高度
+      //  查询条件
+      queryParam: {
+        beginDate: '', // 创建开始时间
+        endDate: '', // 创建结束时间
+        allocateReturnNo: '', //  单号
+        targetName: '', // 调拨退货客户
+        grabFlag: undefined, // 是否抓单
+        state: undefined, //  状态
+        warehouseSn: undefined// 出库仓库
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true, // 展开关闭
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        // 获取列表数据  有分页
+        return allocateReturnQueryConfirmPage(Object.assign(parameter, this.queryParam)).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            // 计算表格序号
+            const no = (data.pageNo - 1) * data.pageSize
+            for (var i = 0; i < data.list.length; i++) {
+              data.list[i].no = no + i + 1
             }
-          },
-          {
-            title: '操作',
-            scopedSlots: {
-              customRender: 'action'
-            },
-            width: '8%',
-            align: 'center'
+            this.disabled = false
           }
-        ]
-        if (this.$hasPermissions('M_allocateReturnConfirmationList_salesPrice')) { //  售价权限
-          arr.splice(9, 0, {
-            title: '退货总金额',
-            dataIndex: 'totalPrice',
-            width: '7%',
-            align: 'right',
-            customRender: text => ((text || text == 0) ? this.toThousands(text) : '--')
-          })
+          this.spinning = false
+          return data
+        })
+      },
+      openModal: false, // 打开详情弹窗
+      itemSn: ''// 当前行sn
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    // 表头
+    columns () {
+      const arr = [{
+        title: '序号',
+        dataIndex: 'no',
+        width: '4%',
+        align: 'center'
+      },
+      {
+        title: '创建时间',
+        dataIndex: 'createDate',
+        width: '11%',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
         }
-        return arr
-      }
-    },
-    methods: {
-      //  创建时间  change
-      dateChange(date) {
-        this.queryParam.beginDate = date[0]
-        this.queryParam.endDate = date[1]
       },
-      custChange(val) {
-        this.queryParam.buyerSn = val.key
+      {
+        title: '退货单号',
+        scopedSlots: {
+          customRender: 'allocateReturnNo'
+        },
+        width: '16%',
+        align: 'center'
       },
-      //  重置
-      resetSearchForm() {
-        this.$refs.rangeDate.resetDate()
-        this.queryParam.beginDate = ''
-        this.queryParam.endDate = ''
-        this.queryParam.allocateReturnNo = ''
-        this.queryParam.targetName = ''
-        this.queryParam.grabFlag = undefined
-        this.queryParam.state = undefined
-        this.queryParam.warehouseSn = undefined
-        this.$refs.table.refresh(true)
+      {
+        title: '调拨退货客户',
+        dataIndex: 'targetName',
+        align: 'center',
+        width: '15%',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
       },
-      // 详情
-      handleDetail(row) {
-        this.itemSn = row.allocateReturnSn
-        this.openModal = true
+      {
+        title: '仓库',
+        dataIndex: 'warehouseName',
+        align: 'center',
+        width: '15%',
+        customRender: function (text) {
+          return text || '--'
+        },
+        ellipsis: true
       },
-      closeModal() {
-        this.itemSn = ''
-        this.openModal = false
+      {
+        title: '是否抓单',
+        dataIndex: 'grabFlagDictValue',
+        width: '7%',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
       },
-      // 退货确认
-      handleAudit(row) {
-        const _this = this
-        this.$confirm({
-          title: '提示',
-          content: '请点击下方按钮确认操作',
-          centered: true,
-          closable: true,
-          okText: '通过',
-          cancelText: '不通过',
-          onOk() {
-            _this.auditOrder(row.allocateReturnSn, 'FINISH')
-          },
-          onCancel(e) {
-            if (!e.triggerCancel) {
-              _this.auditOrder(row.allocateReturnSn, 'FINANCIAL_REJECT')
-            }
-            _this.$destroyAll()
-          }
-        })
+      {
+        title: '退货总数量',
+        dataIndex: 'totalQty',
+        width: '7%',
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
       },
-      auditOrder(sn, flag) {
-        const _this = this
-        _this.spinning = true
-        allocateReturnFinanceAudit({
-          allocateReturnSn: sn,
-          state: flag
-        }).then(res => {
-          if (res.status == 200) {
-            _this.$message.success(res.message)
-            _this.$refs.table.refresh()
-            _this.spinning = false
-          } else {
-            _this.spinning = false
-          }
-        })
+      {
+        title: '坏件数量',
+        dataIndex: 'totalBadQty',
+        width: '7%',
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
       },
-      pageInit() {
-        const _this = this
-        this.$nextTick(() => { // 页面渲染完成后的回调
-          _this.setTableH()
-        })
+      {
+        title: '返库数量',
+        dataIndex: 'totalBackStockQty',
+        width: '7%',
+        align: 'center',
+        customRender: function (text) {
+          return ((text || text == 0) ? text : '--')
+        }
+      },
+      // { title: '退货总金额', dataIndex: 'totalPrice', width: '7%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+      {
+        title: '确认时间',
+        dataIndex: 'financeAuditTime',
+        width: '11%',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
+      },
+      {
+        title: '状态',
+        dataIndex: 'stateDictValue',
+        width: '6%',
+        align: 'center',
+        customRender: function (text) {
+          return text || '--'
+        }
       },
-      setTableH() {
-        const tableSearchH = this.$refs.tableSearch.offsetHeight
-        this.tableHeight = window.innerHeight - tableSearchH - 200
+      {
+        title: '操作',
+        scopedSlots: {
+          customRender: 'action'
+        },
+        width: '8%',
+        align: 'center'
       }
-    },
-    watch: {
-      advanced(newValue, oldValue) {
-        const _this = this
-        this.$nextTick(() => { // 页面渲染完成后的回调
-          _this.setTableH()
+      ]
+      if (this.$hasPermissions('M_allocateReturnConfirmationList_salesPrice')) { //  售价权限
+        arr.splice(9, 0, {
+          title: '退货总金额',
+          dataIndex: 'totalPrice',
+          width: '7%',
+          align: 'right',
+          customRender: text => ((text || text == 0) ? this.toThousands(text) : '--')
         })
-      },
-      '$store.state.app.winHeight'(newValue, oldValue) { //  窗口变更时,需同时更改表格高度
-        this.setTableH()
       }
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
     },
-    mounted() {
-      if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-        this.pageInit()
-        this.resetSearchForm()
-      }
+    // 退货客户
+    custChange (val) {
+      this.queryParam.buyerSn = val.key
     },
-    activated() {
-      // 如果是新页签打开,则重置当前页面
-      if (this.$store.state.app.isNewTab) {
-        this.pageInit()
-        this.resetSearchForm()
-      }
-      // 仅刷新列表,不重置页面
-      if (this.$store.state.app.updateList) {
-        this.pageInit()
-        this.$refs.table.refresh()
-      }
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate()
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.allocateReturnNo = ''
+      this.queryParam.targetName = ''
+      this.queryParam.grabFlag = undefined
+      this.queryParam.state = undefined
+      this.queryParam.warehouseSn = undefined
+      this.$refs.table.refresh(true)
     },
-    beforeRouteEnter(to, from, next) {
-      next(vm => {})
+    // 详情
+    handleDetail (row) {
+      this.itemSn = row.allocateReturnSn
+      this.openModal = true
+    },
+    // 关闭详情弹窗
+    closeModal () {
+      this.itemSn = ''
+      this.openModal = false
+    },
+    // 退货确认
+    handleAudit (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '请点击下方按钮确认操作',
+        centered: true,
+        closable: true,
+        okText: '通过',
+        cancelText: '不通过',
+        onOk () {
+          _this.auditOrder(row.allocateReturnSn, 'FINISH')
+        },
+        onCancel (e) {
+          if (!e.triggerCancel) {
+            _this.auditOrder(row.allocateReturnSn, 'FINANCIAL_REJECT')
+          }
+          _this.$destroyAll()
+        }
+      })
+    },
+    // 退货确认成功
+    auditOrder (sn, flag) {
+      const _this = this
+      _this.spinning = true
+      allocateReturnFinanceAudit({
+        allocateReturnSn: sn,
+        state: flag
+      }).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$refs.table.refresh()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    // 初始化
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    // 计算表格高度
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 200
+    }
+  },
+  watch: {
+    // 展开关闭 监听表格高度变化
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
     }
+  },
+  activated () {
+    // 如果是新页签打开,则重置当前页面
+    if (this.$store.state.app.isNewTab) {
+      this.pageInit()
+      this.resetSearchForm()
+    }
+    // 仅刷新列表,不重置页面
+    if (this.$store.state.app.updateList) {
+      this.pageInit()
+      this.$refs.table.refresh()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
   }
+}
 </script>
 
 <style lang="less">
   .transferReturnConfirmation-wrap {
-     
+
   }
-</style>
+</style>

+ 43 - 53
src/views/allocationManagement/allocationList/list.vue

@@ -4,7 +4,7 @@
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form-model
-          id="allocateBillList-form"
+          id="allocationList-form"
           ref="ruleForm"
           class="form-model-con"
           layout="inline"
@@ -14,13 +14,13 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="创建时间" prop="time">
-                <rangeDate ref="rangeDate" :value="queryParam.time" @change="dateChange" />
+                <rangeDate id="allocationList-rangeDate" ref="rangeDate" :value="queryParam.time" @change="dateChange" />
               </a-form-model-item>
             </a-col>
             <a-col :md="6" :sm="24">
               <a-form-model-item label="调往对象">
                 <a-input
-                  id="allocateBillList-targetName"
+                  id="allocationList-targetName"
                   v-model.trim="queryParam.targetName"
                   allowClear
                   placeholder="请输入调往对象" />
@@ -29,7 +29,7 @@
             <a-col :md="6" :sm="24">
               <a-form-model-item label="费用/调拨类型">
                 <AllocateType
-                  id="allocateBillList-costTypeName"
+                  id="allocationList-allocateTypeVal"
                   v-model="allocateTypeVal"
                   :changeOnSelect="true"
                   placeholder="请选择费用/调拨类型"
@@ -39,7 +39,7 @@
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="收货客户名称">
-                  <dealerSearchList ref="receiverSn" @change="custChange" />
+                  <dealerSearchList id="allocationList-receiverSn" ref="receiverSn" @change="custChange" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -47,7 +47,7 @@
                   <v-select
                     v-model="queryParam.state"
                     ref="state"
-                    id="allocateBillList-state"
+                    id="allocationList-state"
                     code="ALLOCATE_STATUS2"
                     placeholder="请选择业务状态"
                     allowClear></v-select>
@@ -56,7 +56,7 @@
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="调拨单号">
                   <a-input
-                    id="allocateBillList-allocateNo"
+                    id="allocationList-allocateNo"
                     v-model.trim="queryParam.allocateNo"
                     allowClear
                     placeholder="请输入调拨单号" />
@@ -64,7 +64,7 @@
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="调出仓库">
-                  <warehouse v-model="queryParam.warehouseSn" id="allocateBillList-warehouseSn" placeholder="请选择调出仓库" />
+                  <warehouse v-model="queryParam.warehouseSn" id="allocationList-warehouseSn" placeholder="请选择调出仓库" />
                 </a-form-model-item>
               </a-col>
               <a-col :md="6" :sm="24">
@@ -72,7 +72,7 @@
                   <v-select
                     v-model="queryParam.printState"
                     ref="printState"
-                    id="allocateBillList-printState"
+                    id="allocationList-printState"
                     code="PRINT_STATUS"
                     placeholder="请选择打印状态"
                     allowClear></v-select>
@@ -83,7 +83,7 @@
                   <v-select
                     v-model="queryParam.checkStatus"
                     ref="checkStatus"
-                    id="allocateBillList-checkStatus"
+                    id="allocationList-checkStatus"
                     code="CHECK_STATUS"
                     placeholder="请选择对单状态"
                     allowClear></v-select>
@@ -95,13 +95,13 @@
                 type="primary"
                 @click="handleSearch"
                 :disabled="disabled"
-                id="allocateBillList-refresh">查询</a-button>
+                id="allocationList-refresh">查询</a-button>
               <a-button
                 style="margin-left: 5px"
                 @click="resetSearchForm"
                 :disabled="disabled"
-                id="allocateBillList-reset">重置</a-button>
-              <a @click="advanced=!advanced" style="margin-left: 5px">
+                id="allocationList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px" id="allocationList-advanced">
                 {{ advanced ? '收起' : '展开' }}
                 <a-icon :type="advanced ? 'up' : 'down'" />
               </a>
@@ -132,13 +132,14 @@
           </template>
           <!-- 调拨单号 -->
           <template slot="allocateNo" slot-scope="text, record">
-            <span class="link-bule" @click="handleDetail(record,2)">{{ record.allocateNo }}</span>
+            <span class="link-bule" :id="'allocationList-allocateNo-'+record.id" @click="handleDetail(record,2)">{{ record.allocateNo }}</span>
           </template>
           <!-- 发货单号  -->
           <template slot="sendBillNo" slot-scope="text, record">
             <span
               v-if="record.sendBill&&record.sendBill.sendBillNo"
               class="link-bule"
+              :id="'allocationList-sendBillNo-'+record.id"
               @click="handleDetail(record,1)">{{ record.sendBill.sendBillNo }}</span>
             <span v-else>--</span>
           </template>
@@ -169,84 +170,69 @@
 </template>
 
 <script>
-import {
-  commonMixin
-} from '@/utils/mixin'
+import { commonMixin } from '@/utils/mixin'
 import moment from 'moment'
 import getDate from '@/libs/getDate.js'
+// 组件
 import rangeDate from '@/views/common/rangeDate.vue'
-import {
-  STable,
-  VSelect
-} from '@/components'
+import { STable, VSelect } from '@/components'
 import commonModal from '@/views/common/commonModal.vue'
 import detailModal from '@/views/salesManagement/sendOutOrder/detailModal.vue'
 import AllocateType from '@/views/common/allocateType.js'
 import dealerSearchList from '@/views/common/dealerSearchList.vue'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import {
-  queryOverviewPage
-} from '@/api/allocateBill'
 import allocationDetailModal from '@/views/allocationManagement/transferOut/detail.vue'
+// 接口
+import { queryOverviewPage } from '@/api/allocateBill'
 export default {
-  name: 'PushOrderManagementList',
+  name: 'AllocationList',
   mixins: [commonMixin],
-  components: {
-    STable,
-    VSelect,
-    allocationDetailModal,
-    AllocateType,
-    warehouse,
-    dealerSearchList,
-    rangeDate,
-    commonModal,
-    detailModal
-  },
+  components: { STable, VSelect, allocationDetailModal, AllocateType, warehouse, dealerSearchList, rangeDate, commonModal, detailModal },
   data () {
     return {
       spinning: false,
       advanced: true, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
-      showDetailModal: false,
-      showTipModal: false,
-      bizSn: null,
-      tableHeight: 0,
-      allocateTypeVal: [],
+      showDetailModal: false, // 调拨单详情弹窗
+      showTipModal: false, // 发货单详情弹窗
+      bizSn: null, // 调拨单sn
+      tableHeight: 0, // 表格高度
+      allocateTypeVal: [], // 调拨类型
 
       // 查询参数
-      queryParam: { //  查询条件
+      queryParam: {
+        // 创建时间默认值
         time: [
           moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
           moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
         ],
-        beginDate: getDate.getThreeMonthDays().starttime,
-        endDate: getDate.getCurrMonthDays().endtime,
+        beginDate: getDate.getThreeMonthDays().starttime, // 创建开始时间
+        endDate: getDate.getCurrMonthDays().endtime, // 创建结束时间
         targetName: '', //  调往对象
         costTypeSn: undefined, // 费用类型
         allocateSortSn: undefined, //  调拨类型1
         allocateTypeSn: undefined, //  调拨类型2
         state: undefined, //  业务状态
         allocateNo: '', //  调拨单号
-        receiverSn: undefined,
-        checkStatus: undefined,
-        printState: undefined,
-        warehouseSn: undefined
+        receiverSn: undefined, // 收货客户sn
+        checkStatus: undefined, // 对单状态
+        printState: undefined, // 打印状态
+        warehouseSn: undefined// 出库仓库sn
       },
+      // 表单验证规则
       rules: {
-        'time': [{
-          required: true,
-          message: '请选择退货完成时间',
-          trigger: 'change'
-        }]
+        'time': [{ required: true, message: '请选择退货完成时间', trigger: 'change' }]
       },
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
+        // 获取列表数据  有分页
         return queryOverviewPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -260,6 +246,7 @@ export default {
     }
   },
   computed: {
+    // 表头
     columns () {
       const _this = this
       const arr = [{
@@ -613,6 +600,7 @@ export default {
       this.$refs.receiverSn.resetForm()
       this.$refs.table.refresh(true)
     },
+    // 初始化
     pageInit () {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调
@@ -620,12 +608,14 @@ export default {
       })
       _this.resetSearchForm()
     },
+    // 计算表格高度
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 200
     }
   },
   watch: {
+    // 展开关闭  监听表格高度变化
     advanced (newValue, oldValue) {
       const _this = this
       this.$nextTick(() => { // 页面渲染完成后的回调

+ 32 - 28
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -229,7 +229,7 @@
     <!-- 修改基础信息 -->
     <a-modal
       centered
-      wrapClassName="allocateBill-editRemark-modal"
+      wrapClassName="transferReturn-editRemark-modal"
       v-if="basicInfoData"
       :footer="null"
       :maskClosable="false"
@@ -244,8 +244,8 @@
         :auto-size="{ minRows: 3, maxRows: 5 }"
       />
       <div class="btn-cont">
-        <a-button type="primary" id="allocateBill-basicInfo-modal-save" @click="handleEditRemark">保存</a-button>
-        <a-button id="allocateBill-basicInfo-modal-back" @click="editRemark = false" style="margin-left: 15px;">取消</a-button>
+        <a-button type="primary" id="transferReturn-editGrp-modal-save" @click="handleEditRemark">保存</a-button>
+        <a-button id="transferReturn-editGrp-modal-cancel" @click="editRemark = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-modal>
   </div>
@@ -253,22 +253,15 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+//组件
 import { STable, VSelect } from '@/components'
 // import ImportGuideModal from './importGuideModal.vue'
 import print from './print.vue'
 import warehouse from '@/views/common/chooseWarehouse.js'
-import { allocDetailQueryPageForReturn } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
-import {
-  allocateReturnSave,
-  allocReturnDetailQueryPage,
-  allocateReturnQueryBySn,
-  allocReturnDetailInsert,
-  allocReturnDetailUpdate,
-  allocateReturnSubmit,
-  allocReturnDetailDelete,
-  allocReturnDetailInsertBatch
-} from '@/api/allocateReturn'
+//接口
+import { allocDetailQueryPageForReturn } from '@/api/allocateBill'
+import {allocateReturnSave, allocReturnDetailQueryPage, allocateReturnQueryBySn,allocReturnDetailInsert,allocReturnDetailUpdate,allocateReturnSubmit, allocReturnDetailDelete,allocReturnDetailInsertBatch} from '@/api/allocateReturn'
 
 export default {
   name: 'TransferReturnGrpEdit',
@@ -277,30 +270,34 @@ export default {
   data () {
     return {
       spinning: false,
-      showDetail: false,
+      showDetail: false,//控制基础信息显示
+      // 查询条件
       queryParam: {
-        productCode: '',
-        productName: '',
-        allocateNo: ''
+        productCode: '',//产品编码
+        productName: '',//产品名称
+        allocateNo: ''//调拨单号
       },
+      //已选产品查询条件
       chooseQueryParam: {
-        productCode: '',
-        productName: ''
+        productCode: '',//产品编码
+        productName: ''//产品名称
       },
-      editRemark: false,
+      editRemark: false,//编辑备注
       disabled: false, //  查询、重置按钮是否可操作
-      loading: false,
+      loading: false,//表格加载状态
       chooseDisabled: false, //  查询、重置按钮是否可操作
       advanced: false, // 高级搜索 展开/关闭
-      allocateReturnSn: '',
+      allocateReturnSn: '',//调拨sn
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         const targetSn = this.basicInfoData.targetSn
         const allocateNo = this.queryParam.allocateNo
+        //获取待选产品列表  有分页
         const otherParams = { allocateBill: { targetType: this.basicInfoData.targetType, targetSn: targetSn, allocateNo: allocateNo } }
         return allocDetailQueryPageForReturn(Object.assign(parameter, this.queryParam, otherParams)).then(res => {
           const data = res.data
+          //计算表格序号 优化表格数据
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
@@ -313,14 +310,16 @@ export default {
           return data
         })
       },
-      loadDataSource: [],
-      localDataSource: [],
+      loadDataSource: [],//待选表格数据
+      localDataSource: [],//已选表格数据
       // 加载数据方法 必须为 Promise 对象
       chooseLoadData: parameter => {
         this.chooseDisabled = true
+        //获取已选表格数据  有分页
         const params = Object.assign(parameter, { product: { name: this.chooseQueryParam.productName, code: this.chooseQueryParam.productCode }, allocateReturnSn: this.allocateReturnSn })
         return allocReturnDetailQueryPage(params).then(res => {
           const data = res.data
+          //计算表格序号
           const no = (data.pageNo - 1) * data.pageSize
           for (var i = 0; i < data.list.length; i++) {
             data.list[i].no = no + i + 1
@@ -333,14 +332,16 @@ export default {
       },
       basicInfoData: null, // 基本信息
       openGuideModal: false, //  导入产品引导
-      rowSelectionInfo: null,
-      allocateTypeVal: []
+      rowSelectionInfo: null,//已选表格数据
+      allocateTypeVal: []//调拨退货类型列表
     }
   },
   computed: {
+    //计算所选条数
     selectTotal () {
       return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
     },
+    //表头
     columns () {
       const _this = this
       const arr = [
@@ -359,6 +360,7 @@ export default {
       arr.splice(5, 0, { title: '调拨单价', dataIndex: 'price', width: '10%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } })
       return arr
     },
+    //已选列表表头
     chooseColumns () {
       const _this = this
       const arr = [
@@ -421,6 +423,7 @@ export default {
         }
       })
     },
+    //添加成功后的操作提示
     showFailMessage (data) {
       const h = this.$createElement
       const htmlStr = [h('p', data.message)]
@@ -635,6 +638,7 @@ export default {
       this.$refs.table.refresh()
       this.$refs.chooseTable.refresh()
     },
+    //初始化
     pageInit () {
       this.allocateReturnSn = this.$route.params.sn
       this.getDetail()
@@ -696,7 +700,7 @@ export default {
       }
     }
   }
-  .allocateBill-editRemark-modal{
+  .transferReturn-editRemark-modal{
     .btn-cont{
       text-align: center;
       padding-top: 20px;

+ 14 - 5
src/views/allocationManagement/transferReturn/importGuideModal.vue

@@ -19,7 +19,13 @@
             <li>2) 除了“产品编码”、“数量”两列,其他列可自定义,不影响数据导入</li>
             <li>3) 如果导入的产品已经存在,则不会导入该行</li>
           </ul>
-          <a-button type="link" icon="download" style="padding: 0 0 0 23px;" :loading="exportLoading" @click="handleExport">下载导入模板</a-button>
+          <a-button
+            id="importGuide-download"
+            type="link"
+            icon="download"
+            style="padding: 0 0 0 23px;"
+            :loading="exportLoading"
+            @click="handleExport">下载导入模板</a-button>
         </div>
         <div class="explain-item">
           <div class="explain-tit">
@@ -64,8 +70,10 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import ChooseImportModal from './chooseImportModal.vue'
 import { Upload } from '@/components'
+// 接口
 import { allocateBillDownload } from '@/api/allocateBill'
 export default {
   name: 'TransferReturnImportGuideModal',
@@ -85,12 +93,12 @@ export default {
     return {
       isShow: this.openModal, //  是否打开弹框
       openImportModal: false, //  导入
-      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload',
-      paramsData: null,
-      uploadParams: {
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/upload', // 上传文件地址
+      paramsData: null, // 上传文件参数
+      uploadParams: {// 上传文件参数
         savePathType: 'local'
       },
-      exportLoading: false
+      exportLoading: false// 导出按钮加载状态
     }
   },
   methods: {
@@ -146,6 +154,7 @@ export default {
         }
       })
     },
+    // 下载模板
     download (data) {
       if (!data) { return }
       const url = window.URL.createObjectURL(new Blob([data]))

+ 10 - 7
src/views/allocationManagement/transferReturn/print.vue

@@ -5,7 +5,7 @@
       type="primary"
       class="button-info"
       v-if="$hasPermissions('B_transferReturnPrint')"
-      id="editGrap-db-print-btn"
+      id="transferReturn-db-print-btn"
       :disabled="disabled"
       @click="handlePrint('preview')">打印预览</a-button>
     <a-button
@@ -13,7 +13,7 @@
       type="primary"
       class="button-info"
       v-if="$hasPermissions('B_transferReturnPrint')"
-      id="editGrap-dbfl-print-btn"
+      id="transferReturn-dbfl-print-btn"
       :disabled="disabled"
       @click="handlePrint('print')">快捷打印</a-button>
     <a-divider type="vertical" />
@@ -22,7 +22,7 @@
       type="default"
       class="button-warning"
       v-if="$hasPermissions('B_transferReturnExport')"
-      id="editGrap-export-btn"
+      id="transferReturn-export-btn"
       :disabled="disabled"
       @click="handleExcel">导出Excel</a-button>
     <!-- 打印导出 -->
@@ -34,7 +34,9 @@
 
 <script>
 import { printFun, exportExcel } from '@/libs/JGPrint.js'
+// 组件
 import printModal from './printModal.vue'
+// 接口
 import { allocateReturnExcel, allocateReturnPrint } from '@/api/allocateReturn'
 export default {
   components: { printModal },
@@ -58,8 +60,8 @@ export default {
   },
   data () {
     return {
-      openModal: false,
-      nowType: null
+      openModal: false, // 打开打印导出
+      nowType: null// 打印类型
     }
   },
   methods: {
@@ -68,6 +70,7 @@ export default {
       this.nowType = type
       this.openModal = true
     },
+    // 打印导出
     handleOk (obj) {
       const _this = this
       const params = {
@@ -79,10 +82,10 @@ export default {
         params.orderBy = obj.orderBy
       }
       _this.$emit('loading')
-      printFun(allocateReturnPrint, params, obj.isPreview, '调拨退货单', () => { 
+      printFun(allocateReturnPrint, params, obj.isPreview, '调拨退货单', () => {
         _this.$emit('unloading')
         _this.$store.state.app.curActionPermission = ''
-     })
+      })
     },
     // 导出
     handleExcel () {

+ 20 - 17
src/views/allocationManagement/transferReturn/printModal.vue

@@ -20,23 +20,23 @@
         <a-form-model-item style="margin:0" label="调拨退货单号">{{ itemData&&itemData.allocateReturnNo || '--' }}</a-form-model-item>
         <a-form-model-item style="margin:0" label="调拨退货对象">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
         <a-form-model-item label="产品价格" prop="priceType">
-          <a-radio-group v-model="form.priceType">
-            <a-radio value="thj" v-if="$hasPermissions('B_transferReturnPrint_salesPrice')">退货价</a-radio>
-            <a-radio value="cbj" v-if="$hasPermissions('B_transferReturnPrint_costPrice')">成本价</a-radio>
-            <a-radio value="bdy">不打印</a-radio>
+          <a-radio-group id="allocateBill-print-priceType" v-model="form.priceType">
+            <a-radio value="thj" id="allocateBill-print-priceType1" v-if="$hasPermissions('B_transferReturnPrint_salesPrice')">退货价</a-radio>
+            <a-radio value="cbj" id="allocateBill-print-priceType2" v-if="$hasPermissions('B_transferReturnPrint_costPrice')">成本价</a-radio>
+            <a-radio value="bdy" id="allocateBill-print-priceType3">不打印</a-radio>
           </a-radio-group>
         </a-form-model-item>
         <a-form-model-item label="货位编号" prop="orderBy">
-          <a-radio-group v-model="form.orderBy">
-            <a-radio value="ASC">打印(↑升序)</a-radio>
-            <a-radio value="DESC">打印(↓降序)</a-radio>
-            <a-radio value="-1">不打印</a-radio>
+          <a-radio-group id="allocateBill-print-orderBy" v-model="form.orderBy">
+            <a-radio value="ASC" id="allocateBill-print-orderBy1">打印(↑升序)</a-radio>
+            <a-radio value="DESC" id="allocateBill-print-orderBy2">打印(↓降序)</a-radio>
+            <a-radio value="-1" id="allocateBill-print-orderBy3">不打印</a-radio>
           </a-radio-group>
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="allocateBill-print-save" @click="handleSave(0)">取消</a-button>
-        <a-button type="primary" id="allocateBill-print-back" @click="handleSave(1)" style="margin-left: 15px;">确定</a-button>
+        <a-button id="allocateBill-print-cancel" @click="handleSave(0)">取消</a-button>
+        <a-button type="primary" id="allocateBill-print-save" @click="handleSave(1)" style="margin-left: 15px;">确定</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -62,21 +62,24 @@ export default {
   },
   data () {
     return {
+      spinning: false,
       isShow: this.openModal, //  是否打开弹框
+      // 提交参数
       form: {
         id: 'all',
-        priceType: undefined,
-        orderBy: undefined
+        priceType: undefined, // 产品价格
+        orderBy: undefined// 货位编号
       },
+      // 表单验证规则
       rules: {
         priceType: [{ required: true, message: '请选择产品价格', trigger: 'change' }],
         orderBy: [{ required: true, message: '请选择货位编号', trigger: 'change' }]
       },
+      // form表单label布局
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 18 }
-      },
-      spinning: false
+      }
     }
   },
   methods: {
@@ -120,9 +123,9 @@ export default {
       if (!newValue) {
         this.$emit('close')
         this.$refs.ruleForm.resetFields()
-      }else{
-        if(!this.$hasPermissions('B_transferReturnPrint_salesPrice')&&!this.$hasPermissions('B_transferReturnPrint_costPrice')){
-          this.form.priceType = "bdy"
+      } else {
+        if (!this.$hasPermissions('B_transferReturnPrint_salesPrice') && !this.$hasPermissions('B_transferReturnPrint_costPrice')) {
+          this.form.priceType = 'bdy'
         }
       }
     }

+ 9 - 9
src/views/inventoryManagement/inventoryQuery/list.vue

@@ -3,7 +3,7 @@
     <a-card size="small" :bordered="false" class="searchBoxNormal">
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="inventoryQueryList-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="产品编码">
@@ -27,18 +27,13 @@
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="产品分类">
+                <a-form-item label="产品分类">
                   <ProductType id="inventoryQueryList-productType" placeholder="请选择产品分类" @change="changeProductType" v-model="productType"></ProductType>
-                </a-form-model-item>
+                </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="仓库">
-                  <warehouse
-                    isPermission
-                    v-model="queryParam.warehouseSn"
-                    id="inventoryQueryList-warehouseSn"
-                    placeholder="请选择仓库"
-                  />
+                  <warehouse isPermission v-model="queryParam.warehouseSn" id="inventoryQueryList-warehouseSn" placeholder="请选择仓库" />
                 </a-form-item>
               </a-col>
               <a-col :md="4" :sm="24">
@@ -119,6 +114,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
+// 组件
 import { STable, VSelect } from '@/components'
 import inventoryQueryDetailModal from './detailModal.vue'
 import exportExcelModal from './exportExcelModal.vue'
@@ -126,6 +122,7 @@ import { hdExportExcel } from '@/libs/exportExcel'
 import ProductType from '../../common/productType.js'
 import ProductBrand from '@/views/common/productBrand.js'
 import warehouse from '@/views/common/chooseWarehouse.js'
+// 接口
 import { stockList, stockCount, stockExport } from '@/api/stock'
 export default {
   name: 'InventoryQueryList',
@@ -179,10 +176,12 @@ export default {
         } else {
           params.zeroQtyFlag = ''
         }
+        // 获取列表数据  有分页
         return stockList(params).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
+            // 计算表格序号
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
@@ -202,6 +201,7 @@ export default {
     }
   },
   computed: {
+    // 表头
     columns () {
       const _this = this
       const arr = [