From b64d6db597d332c699f84e4928f6d3e5551851f1 Mon Sep 17 00:00:00 2001 From: zss <zss@example.com> Date: 星期二, 04 三月 2025 16:43:16 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue | 77 +++++++++++++++++--------------------- 1 files changed, 34 insertions(+), 43 deletions(-) diff --git a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue index 1951036..9ddb399 100644 --- a/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue +++ b/src/views/CNAS/externalService/serviceAndSupplyPro/component/Store.vue @@ -13,21 +13,14 @@ </el-button> </div> <div class="table"> - <limsTable - :column="tableColumn" - :height="'calc(100vh - 20em)'" - :table-data="storageTableData" - :table-loading="tableLoading" - style="padding: 0 10px;margin-bottom: 16px" - :page="page" - @pagination="pagination"> + <limsTable :column="tableColumn" :height="'calc(100vh - 20em)'" :table-data="storageTableData" + :table-loading="tableLoading" style="padding: 0 10px;margin-bottom: 16px" :page="page" @pagination="pagination"> </limsTable> </div> <!-- 缂栬緫-鏂板寮规 --> - <el-dialog :before-close="handleClose" :close-on-click-modal="false" - :close-on-press-escape="false" :title="title" - :visible.sync="dialogVisible" width="70%"> + <el-dialog :before-close="handleClose" :close-on-click-modal="false" :close-on-press-escape="false" :title="title" + :visible.sync="dialogVisible" width="70%"> <!-- 鍏ュ簱鍗� --> <div> <div style="display: flex; align-items: center"> @@ -51,19 +44,17 @@ </el-col> <el-col :span="12"> <el-form-item label="鍏ュ簱鏃ユ湡"> - <el-date-picker v-model="form.storageTime" format="yyyy-MM-dd" - placeholder="閫夋嫨鏃ユ湡" - size="small" - style="width: 100%" type="date" value-format="yyyy-MM-dd"></el-date-picker> + <el-date-picker v-model="form.storageTime" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" size="small" + style="width: 100%" type="date" value-format="yyyy-MM-dd"></el-date-picker> </el-form-item> </el-col> - <el-col :span="12"> - <el-form-item label="鍏ュ簱浜�"> - <el-select v-model="form.storageUser" size="small" style="width: 100%"> - <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option> - </el-select> - </el-form-item> - </el-col> + <el-col :span="12"> + <el-form-item label="鍏ュ簱浜�"> + <el-select v-model="form.storageUser" size="small" style="width: 100%"> + <el-option v-for="item in users" :key="item.id" :label="item.name" :value="item.id"></el-option> + </el-select> + </el-form-item> + </el-col> <el-col :span="12"> <el-form-item label="鍏ュ簱璇存槑"> <el-input v-model="form.remark" :rows="2" placeholder="璇疯緭鍏ュ唴瀹�" type="textarea"> @@ -106,8 +97,7 @@ </el-input> </div> </div> - <el-button size="mini" type="primary" - @click="addTableData">娣诲姞 + <el-button size="mini" type="primary" @click="addTableData">娣诲姞 </el-button> </div> <el-table :data="consumables" style="margin-top: 10px"> @@ -225,7 +215,7 @@ label: '鐧昏浜�', prop: 'registrantName', minWidth: '160' - },{ + }, { label: '鐧昏鏃ユ湡', prop: 'registrantTime', minWidth: '100' @@ -322,7 +312,7 @@ // 娣诲姞琛ㄦ牸鏁版嵁 addTableData() { this.$nextTick() - console.log('this.consumableOptions',this.consumableOptions) + console.log('this.consumableOptions', this.consumableOptions) this.consumableOptions.forEach(item => { if (item.id === this.formTwo.id) { this.consumables.push({ @@ -343,13 +333,13 @@ this.consumables.splice(index, 1); }, // 鎵撳紑寮规 - addOrUpdateStore(type,row) { + addOrUpdateStore(type, row) { if (type === 'edit') { this.dialogType = "update"; - selectStoreById({id:row.id}).then(res => { + selectStoreById({ id: row.id }).then(res => { if (res.code === 201) return this.consumables = res.data.consumables - this.form = {...res.data.store} + this.form = { ...res.data.store } }).catch(err => { console.log('err---', err); }) @@ -359,11 +349,11 @@ this.dialogVisible = true; }, // 鏌ヨ鍒楄〃 - searchList () { + searchList() { this.tableLoading = true - storeList({...this.page,...this.searchForm}).then(res => { + storeList({ ...this.page, ...this.searchForm }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.storageTableData = res.data.records this.page.total = res.data.total } @@ -374,10 +364,9 @@ }, // 瀵煎嚭excel async importExcel() { - exportProcurementSuppliesStoreExcel({parentId:this.contentsId}).then(res => { - const blob = new Blob([res], {type: 'application/octet-stream'}); + exportProcurementSuppliesStoreExcel({ parentId: this.contentsId }).then(res => { + const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, '鑰楁潗鍏ュ簱.xlsx') - this.$message.success('瀵煎嚭鎴愬姛') }) }, handleClose() { @@ -404,11 +393,11 @@ // 鑾峰彇鎵�鏈夌敤鎴� getUserList() { selectUserCondition().then((res) => { - this.users = res.data; - }); + this.users = res.data; + }); }, async fetchListOptions() { - procurementSuppliesList({contentsId: this.contentsId}).then(res => { + procurementSuppliesList({ contentsId: this.contentsId }).then(res => { if (res.code === 200) { this.consumableOptions = res.data.records } @@ -416,20 +405,20 @@ }, // 鍒犻櫎 - deleteStore (row) { + deleteStore(row) { this.$confirm('姝ゆ搷浣滃皢姘镐箙鍒犻櫎璇ユ暟鎹�, 鏄惁缁х画?', '鎻愮ず', { confirmButtonText: '纭畾', cancelButtonText: '鍙栨秷', type: 'warning' }).then(() => { this.tableLoading = true - console.log('row>>>>>>>>>>>>>>s',row) + console.log('row>>>>>>>>>>>>>>s', row) deleteStore({ - id:row.id, - consumablesId:row.consumablesId + id: row.id, + consumablesId: row.consumablesId }).then(res => { this.tableLoading = false - if (res.code === 200){ + if (res.code === 200) { this.$message.success('鍒犻櫎鎴愬姛') this.searchList() } @@ -457,10 +446,12 @@ .el-dialog { margin: 6vh auto 50px !important; } + .el-dialog__body { max-height: 42em; overflow-y: auto; } + .input-form { display: flex; margin: 10px 0; -- Gitblit v1.9.3