From a2299a6d4a6f99e9c11132138f5d3e9ec68f03ea Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期五, 06 六月 2025 19:19:34 +0800 Subject: [PATCH] 开发更新 --- admin/src/views/stock/components/AssetSel.vue | 26 ++++++++++++++++---------- 1 files changed, 16 insertions(+), 10 deletions(-) diff --git a/admin/src/views/stock/components/AssetSel.vue b/admin/src/views/stock/components/AssetSel.vue index a315d02..f06fbda 100644 --- a/admin/src/views/stock/components/AssetSel.vue +++ b/admin/src/views/stock/components/AssetSel.vue @@ -1,5 +1,5 @@ <template> - <GlobalWindow title="閫夋嫨鐗╂枡" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close" + <GlobalWindow title="閫夋嫨鐗╂枡" :visible.sync="isShowModal" :confirm-working="isLoading" width="1000px" @close="close" @confirm="confirm"> <el-form ref="searchForm" :model="searchForm" label-width="100px" inline> <el-form-item prop="code" label="鐗╂枡淇℃伅"> @@ -10,7 +10,8 @@ :options="cateList" :props="{ label: 'name', value: 'id', - children: 'childCategoryList' + children: 'childCategoryList', + checkStrictly: true }"></el-cascader> </el-form-item> <span> @@ -20,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> @@ -54,6 +55,7 @@ total: 0 }, isOut: false, + warehouseId: false, list: [], selList: [], cateList: [], @@ -78,21 +80,21 @@ this.selList = val }, getList(page) { - const { pagination, searchForm, isOut } = this + 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} + 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 @@ -120,6 +122,10 @@ changeSel(e) { if (e && e.length == 2) { this.$set(this.searchForm, 'cateId', e[1]) + this.$set(this.searchForm, 'parentCateId', '') + } else if ((e && e.length == 1)) { + this.$set(this.searchForm, 'parentCateId', e[0]) + this.$set(this.searchForm, 'cateId', '') } else { this.$set(this.searchForm, 'cateId', '') } -- Gitblit v1.9.3