From 93ce8553a5509fbaa71ad420f339fd879961e122 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 18 二月 2025 17:31:25 +0800
Subject: [PATCH] Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
---
src/views/standard/standardLibrary/index.vue | 561 ++++---------------------------------------------------
1 files changed, 42 insertions(+), 519 deletions(-)
diff --git a/src/views/standard/standardLibrary/index.vue b/src/views/standard/standardLibrary/index.vue
index 2f0e756..ff3c615 100644
--- a/src/views/standard/standardLibrary/index.vue
+++ b/src/views/standard/standardLibrary/index.vue
@@ -1,7 +1,8 @@
<style scoped>
.standard {
- padding: 10px 0;
+ padding-top: 10px;
display: flex;
+ height: calc(100vh - 90px);
}
.left {
@@ -43,7 +44,7 @@
.right {
margin-left: 5px;
- width: calc(100% - 365px);
+ width: calc(100% - 350px);
height: calc(100% - 40px);
}
@@ -204,7 +205,7 @@
></el-input>
</el-col>
<el-col
- v-if="checkPermi(['system:standard:standardLibrary:add'])"
+ v-if="checkPermi(['standard:standardLibrary:add'])"
:span="4"
style="text-align: center; line-height: 30px"
>
@@ -261,9 +262,7 @@
</el-col>
<el-col
v-if="
- checkPermi([
- 'system:standard:standardLibrary:delStandardTree',
- ]) &&
+ checkPermi(['standard:standardLibrary:delStandardTree']) &&
(node.data.children === null ||
node.data.children === undefined)
"
@@ -280,9 +279,7 @@
</el-col>
<el-col
v-if="
- checkPermi([
- 'system:standard:standardLibrary:delStandardTree',
- ]) &&
+ checkPermi(['standard:standardLibrary:delStandardTree']) &&
(node.data.children === null ||
node.data.children === undefined)
"
@@ -310,7 +307,7 @@
<el-button
v-if="isShowCopy"
size="small"
- style="position: absolute; right: 50px; top: 1px"
+ style="position: absolute; right: 20px; top: 1px"
type="primary"
@click="openCopyDia"
>鎵归噺澶嶅埗</el-button
@@ -414,9 +411,7 @@
<template slot-scope="scope">
<el-input
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.ask"
:autosize="{ minRows: 1, maxRows: 3 }"
@@ -433,9 +428,7 @@
<template slot-scope="scope">
<el-input
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.tell"
:autosize="{ minRows: 1, maxRows: 3 }"
@@ -454,9 +447,7 @@
<template slot-scope="scope">
<el-select
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.methodS"
clearable
@@ -486,9 +477,7 @@
<template slot-scope="scope">
<el-select
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.radius"
clearable
@@ -519,9 +508,7 @@
<template slot-scope="scope">
<el-input
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.price"
placeholder="鍗曚环(鍏�)"
@@ -538,9 +525,7 @@
<template slot-scope="scope">
<el-input
v-if="
- checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ checkPermi(['standard:standardLibrary:upStandardProduct'])
"
v-model="scope.row.manHour"
placeholder="鍗曚环(鍏�)"
@@ -564,9 +549,7 @@
<el-select
v-model="scope.row.templateId"
:disabled="
- !checkPermi([
- 'system:standard:standardLibrary:upStandardProduct',
- ])
+ !checkPermi(['standard:standardLibrary:upStandardProduct'])
"
filterable
size="small"
@@ -592,11 +575,19 @@
></el-table-column>
<el-table-column label="鎿嶄綔" prop="section" width="160">
<template slot-scope="scope">
- <el-button type="text" @click="sectionUp(scope.row)"
+ <el-button
+ type="text"
+ @click="sectionUp(scope.row)"
+ :disabled="
+ !checkPermi(['standard:standardLibrary:upStandardProduct'])
+ "
>鍖洪棿璁剧疆</el-button
>
<el-button
type="text"
+ :disabled="
+ !checkPermi(['standard:standardLibrary:upStandardProduct'])
+ "
@click="bindSupplierDensitySecond(scope.row)"
>缁戝畾鍘傚</el-button
>
@@ -614,6 +605,7 @@
</el-pagination>
</el-row>
</div>
+
<el-dialog :visible.sync="addDia" title="鍒嗙被娣诲姞" width="400px">
<div class="body">
<el-row style="line-height: 50px">
@@ -664,305 +656,6 @@
>纭� 瀹�</el-button
>
</span>
- </el-dialog>
- <el-dialog
- :visible.sync="moreEdit"
- class="more-edit"
- title="鎵归噺缂栬緫"
- width="90%"
- >
- <div
- class="body"
- style="display: flex; flex-direction: column; height: 85vh"
- >
- <div class="search">
- <div class="search-item">
- <el-row style="width: 25%; margin-bottom: 16px">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 瑕佹眰鍊硷細</el-col
- >
- <el-col :span="16">
- <el-input
- v-model="moreInfo.ask"
- :disabled="moreSelects.length == 0"
- clearable
- size="small"
- ></el-input>
- </el-col>
- </el-row>
- <el-row style="width: 25%; margin-bottom: 16px">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 瑕佹眰鎻忚堪锛�</el-col
- >
- <el-col
- :span="16"
- style="display: flex; align-items: flex-start; height: 100%"
- >
- <el-input
- v-model="moreInfo.tell"
- :autosize="{ minRows: 1, maxRows: 3 }"
- :disabled="moreSelects.length == 0"
- clearable
- size="small"
- type="textarea"
- ></el-input>
- </el-col>
- </el-row>
- <el-row style="width: 25%; margin-bottom: 16px">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 璇曢獙鏂规硶锛�</el-col
- >
- <el-col :span="16">
- <el-select
- v-model="moreInfo.methodS"
- :disabled="moreSelects.length == 0"
- clearable
- filterable
- size="small"
- style="width: 100%"
- >
- <el-option
- v-for="(a, ai) in methodList"
- :key="ai"
- :label="a.label"
- :value="a.value"
- ></el-option>
- </el-select>
- </el-col>
- </el-row>
- <el-row style="width: 25%; margin-bottom: 16px">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 鍗曚环(鍏�)锛�</el-col
- >
- <el-col :span="16">
- <el-input
- v-model="moreInfo.price"
- :disabled="moreSelects.length == 0"
- clearable
- size="small"
- ></el-input>
- </el-col>
- </el-row>
- <el-row style="width: 25%">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 宸ユ椂绯绘暟锛�</el-col
- >
- <el-col :span="16">
- <el-input
- v-model="moreInfo.manHour"
- :disabled="moreSelects.length == 0"
- clearable
- size="small"
- ></el-input>
- </el-col>
- </el-row>
- <el-row style="width: 25%">
- <el-col :span="6" style="text-align: right">
- <!-- <span class="required-span">* </span> -->
- 妯℃澘锛�</el-col
- >
- <el-col :span="16">
- <el-select
- v-model="moreInfo.templateId"
- :disabled="moreSelects.length == 0"
- filterable
- placeholder="妯℃澘"
- size="small"
- style="width: 100%"
- >
- <el-option
- v-for="(a, ai) in templateList"
- :key="ai"
- :label="a.name"
- :value="a.id"
- ></el-option>
- </el-select>
- </el-col>
- </el-row>
- <el-row style="width: 25%">
- <el-col :span="6" style="text-align: right"> 鏄惁鍚敤锛�</el-col>
- <el-col :span="16">
- <el-select
- v-model="moreInfo.state"
- :disabled="moreSelects.length == 0"
- clearable
- filterable
- placeholder="妯℃澘"
- size="small"
- style="width: 100%"
- >
- <el-option :value="1" label="鍚敤"></el-option>
- <el-option :value="0" label="涓嶅惎鐢�"></el-option>
- </el-select>
- </el-col>
- </el-row>
- <el-row style="width: 100%; margin-top: 8px">
- <el-col
- :span="24"
- style="display: flex; align-items: center; justify-content: end"
- >
- <el-button size="small" type="danger" @click="clearProduct(1)"
- >閲嶇疆鍗曚环</el-button
- >
- <el-button size="small" type="danger" @click="clearProduct(2)"
- >閲嶇疆宸ユ椂绯绘暟</el-button
- >
- <el-button
- size="small"
- type="primary"
- @click="sectionUp(moreSelects)"
- >璁剧疆鍖洪棿</el-button
- >
- <el-button size="small" @click="moreEdit = false"
- >鍙� 娑�</el-button
- >
- <el-button
- :loading="moreEditLoad"
- size="small"
- type="primary"
- @click="subMoreEdit"
- >淇� 瀛�</el-button
- >
- </el-col>
- </el-row>
- </div>
- </div>
- <div v-loading="productTableLoading0" style="flex: 1; overflow-y: auto">
- <el-table
- ref="productTable0"
- :data="productList0"
- :fit="true"
- :row-key="(row) => row.id"
- border
- header-row-class-name="header-class"
- height="96%"
- highlight-current-row
- stripe
- style="width: 100%"
- tooltip-effect="dark"
- @select="handleSelectionChange0"
- @select-all="handleSelectAll0"
- @filter-change="filterHandler"
- >
- <el-table-column type="selection" width="50"> </el-table-column>
- <el-table-column
- label="浜у搧"
- min-width="100"
- prop="sample"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- label="鍨嬪彿"
- min-width="100"
- prop="model"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- :filter-multiple="false"
- :filters="filters0"
- column-key="inspectionItem"
- filter-placement="bottom-start"
- label="妫�楠岄」"
- min-width="140"
- prop="inspectionItem"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- :filter-multiple="false"
- :filters="filters1"
- column-key="inspectionItemSubclass"
- filter-placement="bottom-start"
- label="妫�楠岄」瀛愰」"
- min-width="140"
- prop="inspectionItemSubclass"
- show-overflow-tooltip
- ></el-table-column>
- <el-table-column
- :filter-multiple="false"
- :filters="filters"
- column-key="sonLaboratory"
- filter-placement="bottom-start"
- label="瀛愬疄楠屽"
- prop="sonLaboratory"
- show-overflow-tooltip
- width="130"
- ></el-table-column>
- <el-table-column
- label="瑕佹眰鍊�"
- min-width="200px"
- prop="ask"
- ></el-table-column>
- <el-table-column
- label="瑕佹眰鎻忚堪"
- min-width="220px"
- prop="tell"
- ></el-table-column>
- <el-table-column
- label="璇曢獙鏂规硶"
- prop="methodS"
- width="200"
- ></el-table-column>
- <el-table-column
- label="鏉′欢"
- prop="radius"
- width="200"
- ></el-table-column>
- <el-table-column
- label="璁¢噺鍗曚綅"
- prop="unit"
- show-overflow-tooltip
- width="100"
- ></el-table-column>
- <el-table-column
- label="鍗曚环(鍏�)"
- prop="price"
- width="120"
- ></el-table-column>
- <el-table-column
- label="宸ユ椂绯绘暟"
- prop="manHour"
- width="120"
- ></el-table-column>
- <el-table-column
- label="宸ユ椂鍒嗙粍"
- prop="manHourGroup"
- show-overflow-tooltip
- width="100"
- ></el-table-column>
- <el-table-column label="妯℃澘" prop="templateId" width="200">
- <template slot-scope="scope">
- {{
- templateList.find((item) => item.id == scope.row.templateId)
- ? templateList.find(
- (item) => item.id == scope.row.templateId
- ).name
- : ""
- }}
- </template>
- </el-table-column>
- <el-table-column
- label="鍖洪棿"
- prop="section"
- show-overflow-tooltip
- width="120"
- ></el-table-column>
- </el-table>
- <el-pagination
- :current-page="currentPage0"
- :page-size="100"
- :total="total0"
- layout="total, prev, pager, next, jumper"
- style="position: absolute; right: 16px; bottom: 4px"
- @current-change="handleCurrentChange0"
- >
- </el-pagination>
- </div>
- </div>
</el-dialog>
<el-dialog
:close-on-click-modal="false"
@@ -1071,41 +764,19 @@
></el-button>
</span>
</el-dialog>
- <el-dialog :visible.sync="uploadDia" title="鏁版嵁瀵煎叆" width="500px">
- <div style="margin: 0 auto">
- <el-upload
- ref="upload"
- :action="
- VUE_APP_BASE_API + '/standardTree/inExcelOfTree/' + isEquipment
- "
- :auto-upload="false"
- :file-list="fileList"
- :headers="token"
- :limit="1"
- :on-change="beforeUpload"
- :on-error="onError"
- :on-success="onSuccess"
- accept=".xlsx"
- drag
- name="file"
- >
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- </el-upload>
- </div>
- <span slot="footer" class="dialog-footer">
- <el-button @click="uploadDia = false">鍙� 娑�</el-button>
- <el-button :loading="uploading" type="primary" @click="submitUpload()"
- >涓� 浼�</el-button
- >
- </span>
- </el-dialog>
- <!-- <bindSupplierDensityDialogAsk v-if="bindSupplierDensityDialog"
- :bindSupplierDensityDialog="bindSupplierDensityDialog"
- :currentRow="currentSupplierDensityRow"
- @closeBindPartDialog="closeBindSupplierDensityDialog"></bindSupplierDensityDialogAsk> -->
- <!-- <BatchCopy v-if="batchCopyDia" ref="BatchCopy" :selectTree1="selectTree"
- :standardId="standardId" @refreshList="refreshList"></BatchCopy> -->
+ <bindSupplierDensityDialogAsk
+ v-if="bindSupplierDensityDialog"
+ :bindSupplierDensityDialog="bindSupplierDensityDialog"
+ :currentRow="currentSupplierDensityRow"
+ @closeBindPartDialog="closeBindSupplierDensityDialog"
+ ></bindSupplierDensityDialogAsk>
+ <BatchCopy
+ v-if="batchCopyDia"
+ ref="BatchCopy"
+ :selectTree1="selectTree"
+ :standardId="standardId"
+ @refreshList="refreshList"
+ ></BatchCopy>
</div>
</template>
@@ -1134,16 +805,13 @@
getStandardTemplate,
selectStandardProductByMethodId,
selectStandardProductEnumByMethodId,
- resetTreeOfPrice,
- resetTreeOfHour,
} from "@/api/standard/standardLibrary";
-import { checkPermi } from "@/utils/permission"; // 鏉冮檺鍒ゆ柇鍑芥暟
-// import bindSupplierDensityDialogAsk from "../do/a5-capacity-scope/bindSupplierDensityDialogAsk.vue";
-// import BatchCopy from "../do/a5-capacity-scope/BatchCopy.vue";
+import bindSupplierDensityDialogAsk from "./components/bindSupplierDensityDialogAsk.vue";
+import BatchCopy from "./components/BatchCopy.vue";
export default {
components: {
- // BatchCopy,
- // bindSupplierDensityDialogAsk,
+ BatchCopy,
+ bindSupplierDensityDialogAsk,
draggable,
},
dicts: ["sys_factory", "sys_sub_lab", "sys_samp_type"],
@@ -1194,21 +862,9 @@
total: 0,
currentPage: 1,
standardId: 0,
- moreEdit: false,
- moreEditLoad: false,
- moreSelects: [],
total0: 0,
currentPage0: 1,
productList0: [],
- moreInfo: {
- ask: "",
- tell: "",
- methodS: "",
- price: "",
- manHour: "",
- templateId: "",
- state: null,
- },
methodList: [],
productTableLoading0: false,
filters0: [],
@@ -1217,7 +873,6 @@
inspectionItem: null,
inspectionItemSubclass: null,
sonLaboratory: null,
- uploadDia: false,
token: null,
fileList: [],
uploading: false,
@@ -1229,25 +884,8 @@
isShowCopy: false,
batchCopyDia: false,
VUE_APP_BASE_API: process.env.VUE_APP_BASE_API,
+ moreSelects: [],
};
- },
- watch: {
- moreEdit(val) {
- if (!val) {
- this.$refs.productTable0.clearSelection();
- this.moreSelects = [];
- this.currentPage0 = 1;
- this.productList0 = [];
- this.moreInfo = {
- ask: "",
- tell: "",
- methodS: "",
- price: "",
- manHour: "",
- templateId: "",
- };
- }
- },
},
mounted() {
this.selectEnumByCategoryForFactory();
@@ -1263,7 +901,6 @@
};
},
methods: {
- checkPermi,
// 淇敼鏈�瀛愮骇鍚嶅瓧
editTreeName(info) {
this.updateDia = true;
@@ -2079,16 +1716,6 @@
this.$refs.BatchCopy.getList();
});
},
- async handleMore() {
- if (
- (!this.standardId && this.standardId != 0) ||
- this.standardList.length == 0
- ) {
- return this.$message.error("璇烽�夋嫨瀹為獙瀹ゃ�佹牱鍝�");
- }
- await this.getList();
- this.moreEdit = true;
- },
selectStandardMethodsSec() {
selectStandardMethods().then((res) => {
let data = [];
@@ -2099,33 +1726,6 @@
});
});
this.methodList = data;
- });
- },
- subMoreEdit() {
- if (this.moreSelects.length === 0) {
- return this.$message.error("璇烽�夋嫨妫�楠岄」");
- }
- this.moreEditLoad = true;
- for (let a in this.moreInfo) {
- if (this.moreInfo[a] == "") {
- delete this.moreInfo[a];
- }
- }
- upStandardProducts({
- ids: JSON.stringify(this.moreSelects.map((a) => a.id)),
- standardProductList: this.moreInfo,
- }).then((res) => {
- this.moreEditLoad = false;
- if (res.code == 201) {
- this.$message.error("鏈繚瀛�");
- return;
- }
- this.$message.success("宸蹭繚瀛�");
- this.currentPage0 = 1;
- this.getList();
- this.rowClick({
- id: this.standardId,
- });
});
},
handleSelectAll0(rows) {
@@ -2202,83 +1802,6 @@
}
});
});
- },
- beforeUpload(file, fileList) {
- if (
- file.raw.type !=
- "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
- ) {
- this.$message.error("涓婁紶鏂囦欢鏍煎紡涓嶆纭�");
- this.$refs.upload.clearFiles();
- return false;
- }
- },
- submitUpload() {
- if (this.$refs.upload.uploadFiles.length == 0) {
- this.$message.error("鏈�夋嫨鏂囦欢");
- return;
- }
- this.uploading = true;
- this.$refs.upload.submit();
- },
- onSuccess(response, file, fileList) {
- this.$refs.upload.clearFiles();
- this.uploadDia = false;
- this.uploading = false;
- if (response.code == 201) {
- this.$message.error(response.message);
- return;
- }
- this.$message.success("涓婁紶鎴愬姛");
- this.standardList = [];
- this.productList = [];
- this.selectStandardTreeList();
- },
- onError(err, file, fileList) {
- this.$message.error("涓婁紶澶辫触");
- this.$refs.upload.clearFiles();
- this.uploading = false;
- },
- clearProduct(type) {
- this.$confirm("鏄惁娓呯┖?", "璀﹀憡", {
- confirmButtonText: "纭畾",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- if (type === 1) {
- resetTreeOfPrice({
- tree: this.selectTree,
- standardId: this.standardId,
- }).then((res) => {
- if (res.code == 201) {
- return;
- }
- this.$message.success("宸叉竻绌�");
- this.currentPage0 = 1;
- this.getList();
- this.rowClick({
- id: this.standardId,
- });
- });
- } else if (type === 2) {
- resetTreeOfHour({
- tree: this.selectTree,
- standardId: this.standardId,
- }).then((res) => {
- if (res.code == 201) {
- return;
- }
- this.$message.success("宸叉竻绌�");
- this.currentPage0 = 1;
- this.getList();
- this.rowClick({
- id: this.standardId,
- });
- });
- }
- })
- .catch(() => {});
},
},
};
--
Gitblit v1.9.3