From ce166a90614211a6c8ea4ac092ed8970979594a4 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 10 一月 2025 10:52:51 +0800
Subject: [PATCH] Merge branch '2.0.1' of http://139.186.142.91:10010/r/productDev/funingyunwei into 2.0.1
---
admin/src/views/stock/components/AssetSel.vue | 125 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 125 insertions(+), 0 deletions(-)
diff --git a/admin/src/views/stock/components/AssetSel.vue b/admin/src/views/stock/components/AssetSel.vue
new file mode 100644
index 0000000..afbbb23
--- /dev/null
+++ b/admin/src/views/stock/components/AssetSel.vue
@@ -0,0 +1,125 @@
+<template>
+ <GlobalWindow title="閫夋嫨鐗╂枡" :visible.sync="isShowModal" :confirm-working="isLoading" width="900px" @close="close"
+ @confirm="confirm">
+ <el-form ref="searchForm" :model="searchForm" label-width="100px" inline>
+ <el-form-item prop="areaType" label="鐗╂枡淇℃伅">
+ <el-input v-model="searchForm.aaa" placeholder="璇疯緭鍏ョ墿鏂欑紪鐮�/鍚嶇О" @keypress.enter.native="search"></el-input>
+ </el-form-item>
+ <el-form-item prop="areaIds" label="鐗╂枡鍒嗙被">
+ <el-cascader v-model="searchForm.areaIds" @change="changeSel" placeholder="璇烽�夋嫨鐗╂枡鍒嗙被" clearable
+ :options="cateList" :props="{
+ label: 'name',
+ value: 'id',
+ children: 'childCategoryList'
+ }"></el-cascader>
+ </el-form-item>
+ <span>
+ <el-button type="primary" @click="getList">鎼滅储</el-button>
+ <el-button @click="reset">閲嶇疆</el-button>
+ </span>
+ </el-form>
+ <!-- -->
+ <el-table @selection-change="handleSelectionChange" :data="list" stripe>
+ <el-table-column type="selection" width="55" />
+ <el-table-column prop="categoryName" label="鐗╂枡缂栫爜" min-width="100px"></el-table-column>
+ <el-table-column prop="creatorName" label="鐗╂枡鍚嶇О" min-width="80px"></el-table-column>
+ <el-table-column prop="createDate" label="鏉$爜" min-width="100px"></el-table-column>
+ <el-table-column prop="dealUserName" label="鍝佺墝" min-width="80px"></el-table-column>
+ <el-table-column prop="dealUserName" label="瑙勬牸鍨嬪彿" min-width="80px"></el-table-column>
+ <el-table-column prop="dealUserName" label="鍗曚綅" min-width="80px"></el-table-column>
+ <el-table-column prop="dealUserName" label="搴撳瓨" min-width="80px"></el-table-column>
+ </el-table>
+ <Pagination @size-change="handleSizeChange" @current-change="getList" :pagination="pagination">
+ </Pagination>
+ </GlobalWindow>
+</template>
+
+<script>
+import BaseOpera from '@/components/base/BaseOpera'
+import GlobalWindow from '@/components/common/GlobalWindow'
+import Pagination from '@/components/common/Pagination'
+import { fetchList as getCateList } from '@/api/business/category.js'
+export default {
+ name: 'OperaCategoryWindow',
+ components: { GlobalWindow, Pagination },
+ data() {
+ return {
+ // 琛ㄥ崟鏁版嵁
+ searchForm: {},
+ pagination: {
+ pageSize: 10,
+ page: 1,
+ total: 0
+ },
+ list: [],
+ selList: [],
+ cateList: [],
+ isShowModal: false,
+ isLoading: false,
+ // 楠岃瘉瑙勫垯
+ rules: {
+ name: [{ required: true, message: '璇疯緭鍏ヤ簩绾у垎绫诲悕绉�', trigger: 'blur' }],
+ },
+ dataList: []
+ }
+ },
+ created() {
+ this.initData()
+ },
+ methods: {
+ confirm() {
+ this.$emit('change', this.selList)
+ this.close()
+ },
+ handleSelectionChange(val) {
+ this.selList = val
+ },
+ getList(page) {
+ const { pagination, searchForm } = this
+ this.listLoading = true
+ if(page){pagination.page = page}
+ fetchList({
+ capacity: pagination.pageSize,
+ page: pagination.page,
+ model: {...searchForm}
+ }).then((res) => {
+ this.listLoading = false
+ this.list = res.records
+ this.pagination.total = res.total || 0
+ }, () => {
+ this.listLoading = false
+ })
+ },
+ initData() {
+ getCateList({
+ model: { type: 3 },
+ capacity: 1000,
+ page: 1,
+ }).then(res => {
+ this.cateList = res.records || []
+ })
+ },
+ changeSel(e) {
+ if (e && e.length == 2) {
+ this.$set(this.searchForm, 'cateId', e[1])
+ } else {
+ this.$set(this.searchForm, 'cateId', '')
+ }
+ },
+ reset() {
+ this.searchForm = {}
+ this.pagination.pageSize = 10
+ this.pagination.page = 1
+ this.getList()
+ },
+ handleSizeChange(capacity) {
+ this.pagination.pageSize = capacity
+ this.getList()
+ },
+ close() {
+ this.isShowModal = false
+ this.$emit('close')
+ },
+ }
+}
+</script>
--
Gitblit v1.9.3