admin-web/src/views/departmentitem/itemdis/disDetails/index.vue
@@ -219,7 +219,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/departmentitem/itemret/retDetails/index.vue
@@ -201,7 +201,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/departmentitem/itemscr/scrappDetails/index.vue
@@ -201,7 +201,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/departmentitem/ledgerquy/itemQuy/index.vue
@@ -206,7 +206,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() } admin-web/src/views/departmentitem/ledgerquy/ledQuy/index.vue
@@ -225,7 +225,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/foundation/material/index.vue
@@ -306,7 +306,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() } admin-web/src/views/foundation/store/index.vue
@@ -304,7 +304,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() } admin-web/src/views/foundation/store/person.vue
@@ -8,7 +8,9 @@ <template slot-scope="{ node, data }"> <div v-if="data.type != 'user'">{{ data.name }}</div> <div v-else class="leaf-node" :class="data.checked ? 'checked' : ''" @click="handleCheckItem(data)"> {{ data.name }} <div>{{ data.name }}</div> <i style="font-size: 18px;font-weight: bold;color: #0d997c;margin-right: 10px" class="el-icon-check"></i> </div> </template> </el-tree> @@ -28,8 +30,8 @@ </div> </div> <div slot="footer" align="center" class="dialog-footer"> <my-button name="取消" site="form" @click="close" /> <my-button name="保存" site="form" @click="save" /> <my-button name="取消" site="form" @click="close"/> <my-button name="保存" site="form" @click="save"/> </div> </win-md> </template> @@ -41,17 +43,18 @@ export default { name: 'person', components: { winMd, myButton }, components: {winMd, myButton}, props: { setting: { type: Object, default: () => {}, default: () => { }, }, }, data() { return { loading:true, loadingText:'加载中', loading: true, loadingText: '加载中', selectdSections: [], treeData: [], formData: {}, @@ -72,47 +75,45 @@ this.formData = Object.assign({}, JSON.parse(this.setting.info)); } this.init(); warehouseManagerList({ warehouseId: this.formData.id }).then((res) => { this.selectdSections = res.map((item) => { item.name = item.managerName; item.id = item.managerId; return item; }); this.key = Math.random(); this.loading = false }); }, methods: { async init() { let managerRes = await warehouseManagerList({ warehouseId: this.formData.id }); this.managerListStr = JSON.stringify(managerRes); const res = await userSelectDepartment({ agencyId: this.formData.agencyId }); let managerRes = await warehouseManagerList({warehouseId: this.formData.id}); this.selectdSections = managerRes.map((item) => { item.name = item.managerName; item.id = item.managerId; item.checked = true return item; }); const res = await userSelectDepartment({agencyId: this.formData.agencyId}); this.treeData = this.deepList([res]); this.key = Math.random(); this.loading = false }, deepList(list) { return list.map((item) => { if (item.children && item.children.length) { this.deepList(item.children); } else { if (this.managerListStr.includes(item.id)) { item.checked = true; } else { item.checked = false; } item.checked = this.selectdSections.some(s=>item.id===s.id) } return item; }); }, handleCheckItem(data) { this.selectdSections = []; if (!data.checked) { this.selectdSections.push(data); } else { let idx = this.selectdSections.findIndex(item => item.id === data.id) if (idx !== -1) { this.selectdSections.splice(idx, 1) } } this.treeData[0].children.forEach((item, index) => { if (item.children) { item.children.forEach((child, childIndex) => { if (child.id == data.id) { this.$set(this.treeData[0].children[index].children[childIndex], 'checked', !child.checked); } if (child.checked) { this.selectdSections.push(child); } }); } @@ -131,6 +132,10 @@ this.$emit('close'); }, save() { if(this.selectdSections.length===0){ this.$message.error('请选择库管员!'); return } let params = { warehouseId: this.setting.id, warehouseManagerInfoList: [], @@ -141,16 +146,6 @@ managerName: item.name, }); }); // setTimeout(()=>{ // warehouseManagerAdd(params).then((res) => { // this.$message.success('保存成功!'); // this.close(); // this.$emit('search'); // }); // this.$message.success('保存成功!'); // this.close(); // this.$emit('search'); // },6000) warehouseManagerAdd(params).then((res) => { this.$message.success('保存成功!'); this.close(); @@ -165,12 +160,14 @@ height: 400px; display: flex; justify-content: space-between; ::v-deep { .el-tree-node__expand-icon.is-leaf { display: none; } } } .section-left, .section-right { width: calc((100% - 20px) / 2); @@ -181,10 +178,12 @@ border-radius: 4px; overflow-y: auto; } .header-row { display: flex; align-items: center; justify-content: space-between; .title { color: #3d3d3d; font-size: 14px; @@ -192,9 +191,11 @@ font-weight: 400; } } .section-body { margin-top: 20px; } .section-right { .btn { display: inline-block; @@ -209,11 +210,13 @@ background: rgba($color: #0d997c, $alpha: 0.1); cursor: pointer; } .del-btn { color: #f9675b; border: 1px solid #f9675b; background: rgba($color: #f9675b, $alpha: 0.1); } .section-item { width: 44%; margin: 0 auto; @@ -223,20 +226,24 @@ margin-bottom: 10px; } } .leaf-node { width: 100%; height: 26px; line-height: 26px; padding-left: 10px; &:hover { background: #f5f7fa; display: flex; justify-content: space-between; align-items: center; i { display: none; } } .checked { width: 100%; background: #f5f7fa; height: 26px; line-height: 26px; box-sizing: border-box; i { display: inline-flex; } } </style> admin-web/src/views/stock/inventorycount/exceptionDetails/index.vue
@@ -243,7 +243,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/inventorycount/inventorytask/index.vue
@@ -365,7 +365,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/ledger/alertQuery/index.vue
@@ -189,7 +189,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/ledger/inventoryAlert/index.vue
@@ -259,7 +259,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/ledger/inventoryQuery/index.vue
@@ -200,7 +200,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/ledger/ledgerQuery/index.vue
@@ -254,7 +254,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/procure/receiptDetails/index.vue
@@ -268,7 +268,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/scrap/scrapDetails/index.vue
@@ -219,7 +219,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/stock/transfer/transferdetails/index.vue
@@ -239,7 +239,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/systemManger/org/index.vue
@@ -269,7 +269,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() } admin-web/src/views/systemManger/server/user/index.vue
@@ -280,7 +280,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/systemSetting/department/index.vue
@@ -210,7 +210,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum); this.$refs.myTable.search({pageNum}); } else { this.$refs.myTable.search(); } admin-web/src/views/systemSetting/dict/index.vue
@@ -286,7 +286,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() } admin-web/src/views/systemSetting/role/index.vue
@@ -303,7 +303,7 @@ // 查询table列表 search(pageNum) { if (pageNum != undefined) { this.$refs.myTable.search(pageNum) this.$refs.myTable.search({pageNum}) } else { this.$refs.myTable.search() }