ll
liukangdong
2025-02-07 abfb84c633a2bd1773cf9be27e753f787f1ed641
admin/src/views/stock/components/AssetSel.vue
@@ -21,14 +21,14 @@
    </el-form>
    <!--  -->
    <el-table @selection-change="handleSelectionChange" :data="list" stripe>
      <el-table-column type="selection"  width="55" />
      <el-table-column type="selection" width="55" />
      <el-table-column prop="code" label="物料编码" min-width="100px"></el-table-column>
      <el-table-column prop="name" label="物料名称" min-width="80px"></el-table-column>
      <el-table-column prop="qrcode" label="条码" min-width="100px"></el-table-column>
      <el-table-column prop="brand" label="品牌" min-width="80px"></el-table-column>
      <el-table-column prop="attr" label="规格型号" min-width="80px"></el-table-column>
      <el-table-column prop="unitName" label="单位" min-width="80px"></el-table-column>
      <el-table-column prop="maxStock" label="库存" min-width="80px"></el-table-column>
      <el-table-column v-if="isOut" prop="maxStock" label="库存" min-width="80px"></el-table-column>
    </el-table>
    <Pagination class="mt10" @size-change="handleSizeChange" @current-change="getList" :pagination="pagination">
    </Pagination>
@@ -82,19 +82,19 @@
    getList(page) {
      const { pagination, searchForm, isOut, warehouseId } = this
      this.listLoading = true
      if(page){pagination.page = page}
      console.log('isOut', isOut);
      if (page) { pagination.page = page }
      console.log('isOut', isOut)
      let fn = isOut ? ywStockPage : fetchList
      fn({
        capacity: pagination.pageSize,
        page: pagination.page,
        model: {...searchForm,status: 0, warehouseId}
        model: { ...searchForm, status: 0, warehouseId }
      }).then((res) => {
        this.listLoading = false
        this.list = res.records
        this.pagination.total = res.total || 0
        if(isOut){
        if (isOut) {
          this.list.forEach(item => {
            item.brand = item.materialBrand
            item.attr = item.materialAttr
@@ -123,7 +123,7 @@
      if (e && e.length == 2) {
        this.$set(this.searchForm, 'cateId', e[1])
        this.$set(this.searchForm, 'parentCateId', '')
      }else if((e && e.length == 1)){
      } else if ((e && e.length == 1)) {
        this.$set(this.searchForm, 'parentCateId', e[0])
        this.$set(this.searchForm, 'cateId', '')
      } else {