| | |
| | | import request from '@/utils/request' |
| | | import request from "@/utils/request"; |
| | | |
| | | // å页æ¥è¯¢ |
| | | // ä¾åºæ |
| | | export function suppliersDirectoryContentsListing(query) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/suppliersDirectoryContentsListing", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ä¾åºåç®å½è¯¦æ
|
| | | export function selectSuppliersDirectoryContentsById(query) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/selectSuppliersDirectoryContentsById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ°å¢èç¹ |
| | | export function addSuppliersDirectoryContents(data) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/addSuppliersDirectoryContents", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¼è¾èç¹ |
| | | export function updateSuppliersDirectoryContents(data) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/updateSuppliersDirectoryContents", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | //å é¤èç¹ |
| | | export function deleteSuppliersDirectoryContentsById(query) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/deleteSuppliersDirectoryContentsById", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // æ¥è¯¢ææèç¹ |
| | | export function getSuppliersDirectoryContentsNodeNames(query) { |
| | | return request({ |
| | | url: "/suppliersDirectoryContents/getSuppliersDirectoryContentsNodeNames", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å页æ¥è¯¢åæ ¼ä¾æ¹å |
| | | export function selectQualifiedSupplierManagementPage(query) { |
| | | return request({ |
| | | url: '/supplierManagement/selectQualifiedSupplierManagementPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | url: "/supplierManagement/selectQualifiedSupplierManagementPage", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // ç¼è¾ä¾åºå |
| | | export function updateSupplierManagement(query) { |
| | | //å é¤ä¾åºå |
| | | export function delSupplierManagement(query) { |
| | | return request({ |
| | | url: '/supplierManagement/updateSupplierManagement', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ä¾åºå |
| | | export function addSupplierManagement(query) { |
| | | return request({ |
| | | url: '/supplierManagement/addSupplierManagement', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | url: "/supplierManagement/delSupplierManagement/" + query, |
| | | method: "delete", |
| | | // params: query, |
| | | }); |
| | | } |
| | | |
| | | // 导åºä¾åºå |
| | | export function exportSupplierManagement(query) { |
| | | return request({ |
| | | url: "/supplierManagement/exportSupplierManagement", |
| | | url: "/supplierManagement/exportSupplierManagement/" + query, |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å é¤ä¾åºå |
| | | export function delSupplierManagement(query) { |
| | | // æ°å¢ä¾åºå |
| | | export function addSupplierManagement(data) { |
| | | return request({ |
| | | url: '/supplierManagement/delSupplierManagement', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | url: "/supplierManagement/addSupplierManagement", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // ç¼è¾ä¾åºå |
| | | export function updateSupplierManagement(data) { |
| | | return request({ |
| | | url: "/supplierManagement/updateSupplierManagement", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | // å页æ¥è¯¢ä¾æ¹åå½ |
| | | export function selectSupplierManagementByParentId(query) { |
| | | return request({ |
| | | url: "/supplierManagement/selectSupplierManagementByParentId/" + query, |
| | | method: "get", |
| | | // params: query, |
| | | }); |
| | | } |
| | |
| | | return request({ |
| | | url: "/qualitySupervise/exportSuperviseDetaillCorrect", |
| | | method: "get", |
| | | headers: { |
| | | responseType: "blob", |
| | | }, |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="card-container" @click="handleCard"> |
| | | <div class="card-panel" :class="[isActive == index ? 'isActive' : '']"> |
| | | <el-image style="width: 80%; height: 70px" :src="javaApi + '/img/' + data.logo" fit="scale-down" /> |
| | | </div> |
| | | <div class="title"> |
| | | {{ data.supplierName }} |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | data: { |
| | | type: Object, |
| | | default: () => { }, |
| | | }, |
| | | index: { |
| | | type: Number, |
| | | default: -1, |
| | | }, |
| | | isActive: { |
| | | type: Number, |
| | | default: -1, |
| | | }, |
| | | }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods: { |
| | | handleCard() { |
| | | this.$emit("handleCard", this.data, this.index); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .card-container { |
| | | margin: 10px 10px 10px 0; |
| | | text-align: center; |
| | | } |
| | | |
| | | .card-panel { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | width: 90%; |
| | | height: 90px; |
| | | box-shadow: 0px 0px 20px 0px #0000001a; |
| | | cursor: pointer; |
| | | border-radius: 5px; |
| | | border: 1px solid transparent; |
| | | } |
| | | |
| | | .card-panel:hover { |
| | | border: 1px solid #409eff; |
| | | //background: #1D56C50D; |
| | | } |
| | | |
| | | .isActive { |
| | | border: 1px solid #409eff; |
| | | //background: #1D56C50D; |
| | | } |
| | | |
| | | .title { |
| | | margin-top: 15px; |
| | | margin-left: 10px; |
| | | width: 80%; |
| | | height: 30px; |
| | | font-size: 13px; |
| | | white-space: normal; |
| | | word-break: break-all; |
| | | overflow-wrap: break-word; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-row class="card-box"> |
| | | <el-col :span="4" v-for="(item, index) in cardList" :key="index"> |
| | | <CardPanel :isActive="isActive" :data="item" :index="index" @handleCard="handleCard" /> |
| | | </el-col> |
| | | </el-row> |
| | | <TableCard title="ä¾åºåä¿¡æ¯" :showForm="false" style="margin-top: 5px"> |
| | | <template v-slot:table> |
| | | <limsTable style="margin-top: 18px; padding: 0 15px" :height="'150px'" :column="columns" |
| | | :table-data="tableData"> |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button type="text" @click="showDialog(scope)">æ¥ç</el-button> |
| | | </div> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <Edit ref="editRef" @submit="getTableData" /> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import CardPanel from "./CardPanel.vue"; |
| | | import TableCard from "@/components/TableCard/index.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Edit from "./Edit.vue"; |
| | | import { |
| | | selectSupplierManagementByParentId, |
| | | } from "@/api/cnas/resourceDemand/externalService/supplierManage/supplierManage.js"; |
| | | |
| | | export default { |
| | | components: { CardPanel, TableCard, limsTable, Edit }, |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | label: "ä¾åºåç¼å·", |
| | | prop: "supplierRef", |
| | | }, |
| | | { |
| | | label: "ä¾åºååç§°", |
| | | prop: "supplierName", |
| | | }, |
| | | { |
| | | label: "å°å", |
| | | prop: "adress", |
| | | }, |
| | | { |
| | | label: "è系人", |
| | | prop: "contacts", |
| | | }, |
| | | { |
| | | label: "èç³»çµè¯", |
| | | prop: "phone", |
| | | }, |
| | | { |
| | | label: "ä¼ ç", |
| | | prop: "fax", |
| | | }, |
| | | { |
| | | label: "ç½å", |
| | | prop: "website", |
| | | }, |
| | | { |
| | | label: "é®ç®±", |
| | | prop: "email", |
| | | }, |
| | | { |
| | | label: "䏿¬¡æ´æ°æ¶é´", |
| | | prop: "updateTime", |
| | | }, |
| | | { |
| | | fixed: "right", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | label: "æä½", |
| | | }, |
| | | ], |
| | | cardList: [], |
| | | tableData: [], |
| | | isActive: -1, |
| | | }; |
| | | }, |
| | | watch: { |
| | | contentsId(newVal) { |
| | | if (newVal !== 0) { |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getTableData(this.contentsId); |
| | | }, |
| | | methods: { |
| | | // è·åè¡¨æ ¼æ°æ® |
| | | async getTableData() { |
| | | const { code, data } = await selectSupplierManagementByParentId(this.contentsId); |
| | | if (code == 200) { |
| | | this.cardList = data; |
| | | } |
| | | }, |
| | | handleCard(data, index) { |
| | | this.isActive = index; |
| | | this.tableData = [data]; |
| | | }, |
| | | showDialog(row) { |
| | | this.$refs.editRef.openDialog(row); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .card-box { |
| | | width: 100%; |
| | | padding-left: 5px; |
| | | padding-right: 5px; |
| | | height: 45vh; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="parent-class"> |
| | | <div style="display: flex; justify-content: flex-end; margin-right: 20px"> |
| | | <el-button type="primary" @click="addContents" size="small" icon="el-icon-plus">æ·»å åèç¹</el-button> |
| | | <el-button type="danger" @click="deletetContents" size="small" icon="el-icon-delete">å é¤åèç¹</el-button> |
| | | <el-button type="warning" @click="updateContents" size="small" icon="el-icon-edit">æ´æ°åèç¹</el-button> |
| | | </div> |
| | | <el-form label-width="100px"> |
| | | <el-form-item label="èç¹åç§°"> |
| | | <el-input v-model="form.nodeName" style="width: 200px" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="代å·"> |
| | | <el-input v-model="form.code" style="width: 200px" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <!-- æ°å¢å¼¹æ¡ --> |
| | | <el-dialog title="æ·»å èç¹" :visible.sync="dialogVisible" width="40%"> |
| | | <el-form label-width="100px" :model="addForm" ref="addForm" :rules="rules"> |
| | | <el-form-item label="ç¶èç¹åç§°"> |
| | | <el-cascader v-model="addForm.parentId" :options="treeData" |
| | | :props="{ checkStrictly: true, value: 'id', label: 'nodeName' }" clearable></el-cascader> |
| | | </el-form-item> |
| | | <el-form-item label="èç¹åç§°" prop="nodeName"> |
| | | <el-input v-model="addForm.nodeName" style="width: 200px" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="代å·"> |
| | | <el-input v-model="addForm.code" style="width: 200px" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitForm">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import { |
| | | selectSuppliersDirectoryContentsById, |
| | | addSuppliersDirectoryContents, |
| | | updateSuppliersDirectoryContents, |
| | | deleteSuppliersDirectoryContentsById, |
| | | getSuppliersDirectoryContentsNodeNames, |
| | | } from "@/api/cnas/resourceDemand/externalService/supplierManage/supplierManage.js"; |
| | | import { selectUserCondition } from "@/api/system/user"; |
| | | export default { |
| | | props: { |
| | | id: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | treeData: { |
| | | type: Array, |
| | | default: () => [], |
| | | }, |
| | | from: { |
| | | type: String, |
| | | default: "" |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | nodeNames: [], |
| | | users: [], |
| | | dialogVisible: false, |
| | | form: { |
| | | nodeName: "", |
| | | code: "", |
| | | }, |
| | | addForm: { |
| | | nodeName: "", |
| | | code: "", |
| | | parentId: null, |
| | | }, |
| | | rules: { |
| | | nodeName: [ |
| | | { required: true, message: "请è¾å
¥èç¹åç§°", trigger: "blur" }, |
| | | ], |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | if (this.id !== 0) { |
| | | this.getContentsDetail(); |
| | | } |
| | | this.getNodeNames(); |
| | | this.getUserList(); |
| | | }, |
| | | watch: { |
| | | id(newVal, oldVal) { |
| | | if (newVal !== 0) { |
| | | console.log(newVal, oldVal); |
| | | this.getContentsDetail(); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // è·åç®å½è¯¦æ
|
| | | getContentsDetail() { |
| | | selectSuppliersDirectoryContentsById({ id: this.id }).then((res) => { |
| | | if (res.data == null) { |
| | | this.form = { |
| | | nodeName: "", |
| | | code: "", |
| | | }; |
| | | return; |
| | | } |
| | | this.form = res.data; |
| | | }); |
| | | }, |
| | | // æ°å»º |
| | | addContents() { |
| | | this.dialogVisible = true; |
| | | this.resetForm(); |
| | | }, |
| | | resetForm() { |
| | | this.addForm = { |
| | | nodeName: "", |
| | | code: "", |
| | | parentId: null, |
| | | }; |
| | | }, |
| | | submitForm() { |
| | | let flag = true; |
| | | this.$refs.addForm.validate((valid) => { |
| | | if (!valid) { |
| | | flag = false; |
| | | return false; |
| | | } |
| | | }); |
| | | if (this.addForm.parentId) { |
| | | this.addForm.parentId = |
| | | this.addForm.parentId[this.addForm.parentId.length - 1]; |
| | | } |
| | | if (!flag) { |
| | | return; |
| | | } |
| | | |
| | | addSuppliersDirectoryContents(this.addForm).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("æ·»å æå"); |
| | | this.dialogVisible = false; |
| | | this.$emit("contentsUpdate", res.data); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }, |
| | | // æ´æ° |
| | | updateContents() { |
| | | Object.keys(this.form).forEach((key) => { |
| | | if (key == "children") { |
| | | delete this.form[key]; |
| | | } |
| | | }); |
| | | updateSuppliersDirectoryContents(this.form).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("æ´æ°æå"); |
| | | this.$emit("contentsUpdate", this.id); |
| | | this.dialogVisible = false; |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }, |
| | | // å é¤ |
| | | deletetContents() { |
| | | if ( |
| | | this.form.id == null || |
| | | this.form.id == "" || |
| | | this.form.id == undefined |
| | | ) { |
| | | this.$message.error("è¯·éæ©è¦å é¤çèç¹"); |
| | | return; |
| | | } |
| | | this.$confirm("æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | deleteSuppliersDirectoryContentsById({ id: this.form.id }).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.$emit("contentsUpdate", this.form.parentId, true); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | // è·åææç®å½èç¹ |
| | | getNodeNames() { |
| | | getSuppliersDirectoryContentsNodeNames().then((res) => { |
| | | this.nodeNames = res.data; |
| | | }); |
| | | }, |
| | | // è·åææç¨æ· |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.users = res.data; |
| | | }); |
| | | }, |
| | | }, |
| | | created() { }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .parent-class { |
| | | margin-top: 20px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="ä¾åºå详æ
" width="40%" :visible.sync="dialogVisible"> |
| | | <el-form :model="model" label-width="auto"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¾åºå"> |
| | | <el-input v-model="model.supplierName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å·"> |
| | | <el-input v-model="model.supplierRef" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¾åºåç©åæå¡åç§°"> |
| | | <el-input v-model="model.supplierItemServiceName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é®ç¼"> |
| | | <el-input v-model="model.postalCode" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°å"> |
| | | <el-input v-model="model.adress" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="logo"> |
| | | <div class="rows"> |
| | | <el-input placeholder="请è¾å
¥" v-model="model.logo" style="width: 100%" /> |
| | | <el-upload ref="upload" style="float: left; margin: 0 12px 0 20px" :action="action" |
| | | :show-file-list="false" :on-success="onSuccess"> |
| | | <el-button class="uploadFile" slot="trigger" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è系人"> |
| | | <el-input v-model="model.contacts" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»çµè¯"> |
| | | <el-input v-model="model.phone" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ·å"> |
| | | <el-input v-model="model.householdName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼ ç"> |
| | | <el-input v-model="model.fax" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="弿·è¡"> |
| | | <el-input v-model="model.openingName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç½å"> |
| | | <el-input v-model="model.website" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´¦å·"> |
| | | <el-input v-model="model.accountName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="Email"> |
| | | <el-input v-model="model.email" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addSupplierManagement, |
| | | updateSupplierManagement, |
| | | } from "@/api/cnas/resourceDemand/externalService/supplierManage/supplierManage.js"; |
| | | export default { |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | default: 0, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | model: { |
| | | parentId: null, |
| | | supplierManagementId: undefined, |
| | | supplierName: undefined, // ä¾åºå |
| | | supplierRef: undefined, // ç¼å· |
| | | supplierItemServiceName: undefined, // ä¾åºåç©åæå¡åç§° |
| | | postalCode: undefined, // é®ç¼ |
| | | adress: undefined, // å°å |
| | | logo: undefined, // logo |
| | | contacts: undefined, // è系人 |
| | | phone: undefined, // èç³»çµè¯ |
| | | householdName: undefined, // æ·å |
| | | fax: undefined, // ä¼ ç |
| | | openingName: undefined, // 弿·è¡ |
| | | website: undefined, // ç½å |
| | | accountName: undefined, // è´¦å· |
| | | email: undefined, // Email |
| | | }, |
| | | }; |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return `${this.javaApi}/personBasicInfo/saveCNASFile`; |
| | | }, |
| | | }, |
| | | methods: { |
| | | openDialog(form) { |
| | | console.log("12--", this.contentsId); |
| | | if (form) { |
| | | this.model.supplierManagementId = form.row.supplierManagementId; |
| | | this.model.supplierName = form.row.supplierName; |
| | | this.model.supplierRef = form.row.supplierRef; |
| | | this.model.supplierItemServiceName = form.row.supplierItemServiceName; |
| | | this.model.postalCode = form.row.postalCode; |
| | | this.model.adress = form.row.adress; |
| | | this.model.logo = form.row.logo; |
| | | this.model.contacts = form.row.contacts; |
| | | this.model.phone = form.row.phone; |
| | | this.model.householdName = form.row.householdName; |
| | | this.model.fax = form.row.fax; |
| | | this.model.openingName = form.row.openingName; |
| | | this.model.website = form.row.website; |
| | | this.model.accountName = form.row.accountName; |
| | | this.model.email = form.row.email; |
| | | this.model.parentId = form.row.parentId; |
| | | } else { |
| | | this.model = { |
| | | parentId: this.contentsId, |
| | | supplierManagementId: undefined, |
| | | supplierName: undefined, // ä¾åºå |
| | | supplierRef: undefined, // ç¼å· |
| | | supplierItemServiceName: undefined, // ä¾åºåç©åæå¡åç§° |
| | | postalCode: undefined, // é®ç¼ |
| | | adress: undefined, // å°å |
| | | logo: undefined, // logo |
| | | contacts: undefined, // è系人 |
| | | phone: undefined, // èç³»çµè¯ |
| | | householdName: undefined, // æ·å |
| | | fax: undefined, // ä¼ ç |
| | | openingName: undefined, // 弿·è¡ |
| | | website: undefined, // ç½å |
| | | accountName: undefined, // è´¦å· |
| | | email: undefined, // Email |
| | | }; |
| | | } |
| | | // this.model.parentId = this.contentsId; |
| | | this.dialogVisible = true; |
| | | }, |
| | | async submit() { |
| | | if (this.model.supplierManagementId) { |
| | | const { code } = await updateSupplierManagement(this.model); |
| | | if (code == 200) { |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.$emit("submit"); |
| | | this.dialogVisible = false; |
| | | } |
| | | } else { |
| | | const { code } = await addSupplierManagement(this.model); |
| | | if (code == 200) { |
| | | this.$message.success("æ°å¢æå"); |
| | | this.$emit("submit"); |
| | | this.dialogVisible = false; |
| | | } |
| | | } |
| | | }, |
| | | async onSuccess(response) { |
| | | this.$set(this.model, "logo", response.data); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .rows { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template slot="form"> |
| | | <div class="action-box"> |
| | | <div></div> |
| | | <div class="flex"> |
| | | <el-button :disabled="contentsId == 0" icon="el-icon-plus" type="primary" @click="showDialog()"> |
| | | æ°å»º |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" @click="exportExcel"> |
| | | 导åºExcel |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable :column="columns" :height="'calc(100vh - 300px)'" :isSelection="true" :table-data="tableData" |
| | | style="margin-top: 18px; padding: 0 15px;" :page="page" @pagination="pagination"> |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button type="text" @click="showDialog(scope)">ç¼è¾</el-button> |
| | | <el-button type="text" @click="delRow(scope)"> |
| | | <span style="color: #F56C6C">å é¤</span> |
| | | </el-button> |
| | | </div> |
| | | </limsTable> |
| | | </template> |
| | | </TableCard> |
| | | <Edit ref="editRef" :contentsId="contentsId" @submit="getTableData" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from '@/components/TableCard/index.vue'; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Edit from "./Edit.vue" |
| | | import { |
| | | selectQualifiedSupplierManagementPage, |
| | | delSupplierManagement, |
| | | exportSupplierManagement, |
| | | } from "@/api/cnas/resourceDemand/externalService/supplierManage/supplierManage.js"; |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, limsTable, Edit |
| | | }, |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | label: "ä¾åºåç¼å·", |
| | | prop: "supplierRef" |
| | | }, |
| | | { |
| | | label: "ä¾åºå", |
| | | prop: "supplierName" |
| | | }, |
| | | { |
| | | label: "ä¾åºç©å(æå¡)åç§°", |
| | | prop: "supplierItemServiceName" |
| | | }, |
| | | { |
| | | label: "å°å", |
| | | prop: "adress" |
| | | }, |
| | | { |
| | | label: "èç³»çµè¯", |
| | | prop: "phone" |
| | | }, |
| | | { |
| | | fixed: "right", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | label: "æä½" |
| | | } |
| | | ], |
| | | tableData: [], |
| | | page: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | watch: { |
| | | contentsId(newVal) { |
| | | if (newVal !== 0) { |
| | | this.getTableData(); |
| | | } |
| | | }, |
| | | }, |
| | | methods: { |
| | | // è·åè¡¨æ ¼æ°æ® |
| | | async getTableData() { |
| | | const { code, data } = await selectQualifiedSupplierManagementPage({ |
| | | ...this.page, |
| | | parentId: this.contentsId |
| | | }) |
| | | if (code == 200) { |
| | | this.tableData = data.records; |
| | | this.page.total = data.total; |
| | | this.page.current = data.current; |
| | | this.page.size = data.size; |
| | | } |
| | | }, |
| | | showDialog(scope) { |
| | | this.$refs.editRef.openDialog(scope) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.getTableData(); |
| | | }, |
| | | // å 餿°æ® |
| | | delRow(scope) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(async () => { |
| | | const { code } = await delSupplierManagement(scope.row.supplierManagementId) |
| | | if (code == 200) { |
| | | this.$message.success('å 餿å') |
| | | this.getTableData() |
| | | } else { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }) |
| | | }, |
| | | async exportExcel() { |
| | | const res = await exportSupplierManagement(this.contentsId) |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'åæ ¼ä¾åºå.xlsx') |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .flex { |
| | | display: flex; |
| | | } |
| | | |
| | | .action-box { |
| | | width: 100%; |
| | | padding-top: 10px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .pagination { |
| | | padding-top: 15px; |
| | | padding-right: 10px; |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="purchase-page"> |
| | | <div class="purchase-left"> |
| | | <el-input v-model="form.nodeName" placeholder="请è¾å
¥èç¹åç§°" suffix-icon="el-icon-search" size="small" clearable |
| | | @keyup.enter.native="searchFilter(treeData)" @blur="searchFilter(treeData)" @clear="searchFilter(treeData)"> |
| | | </el-input> |
| | | <el-tree ref="tree" highlight-current :data="treeData" :props="defaultProps" @node-click="handleNodeClick" |
| | | :default-expanded-keys="expandedKeys" node-key="id"> |
| | | </el-tree> |
| | | </div> |
| | | <div class="purchase-right"> |
| | | <el-tabs v-model="activeName" @tab-click="handleClick" style="height: 100%"> |
| | | <el-tab-pane label="æ»è§" name="1" style="height: 100%"> |
| | | <ConsumableOverview v-if="activeName == '1'" ref="consumableOverviewRef" :contentsId="contentsId" |
| | | style="height: 100%"></ConsumableOverview> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åæ ¼ä¾æ¹åå½" name="2"> |
| | | <QualifiedSuppliers v-if="activeName == '2'" :contentsId="contentsId"></QualifiedSuppliers> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç®å½ç»´æ¤" name="3"> |
| | | <Contents v-if="activeName == '3'" :id="contentsId" :treeData="treeData" @contentsUpdate="contentsUpdate" |
| | | from="ä¾åºæ "></Contents> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | import Contents from "./component/Contents.vue"; |
| | | import ConsumableOverview from "./component/ConsumableOverview.vue"; |
| | | import QualifiedSuppliers from "./component/QualifiedSuppliers.vue"; |
| | | import { suppliersDirectoryContentsListing } from "@/api/cnas/resourceDemand/externalService/supplierManage/supplierManage.js"; |
| | | export default { |
| | | components: { |
| | | ConsumableOverview, |
| | | QualifiedSuppliers, |
| | | Contents, |
| | | }, |
| | | data() { |
| | | return { |
| | | contentsId: 0, |
| | | activeName: "1", |
| | | form: { |
| | | nodeName: "", |
| | | }, |
| | | treeData: [], |
| | | expandedKeys: [], |
| | | defaultProps: { |
| | | children: "children", |
| | | label: "nodeName", |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getTreeData(); |
| | | }, |
| | | methods: { |
| | | searchFilter() { |
| | | this.treeData = JSON.parse(JSON.stringify(this.treeData)); |
| | | this.expandedKeys = []; |
| | | if (this.form.nodeName == "") { |
| | | return; |
| | | } |
| | | const findNodesWithFiber = (nodes) => { |
| | | nodes.forEach((node) => { |
| | | if (node.nodeName && node.nodeName.includes(this.form.nodeName)) { |
| | | this.expandedKeys.push(node.id); |
| | | } |
| | | if (node.children && node.children.length > 0) { |
| | | findNodesWithFiber(node.children); |
| | | } |
| | | }); |
| | | }; |
| | | findNodesWithFiber(this.treeData); |
| | | }, |
| | | // ç®å½ç»´æ¤æ´æ° |
| | | contentsUpdate(val, flag = false) { |
| | | if (val) { |
| | | this.getTreeData(); |
| | | this.expandedKeys = []; |
| | | if (flag) { |
| | | const findNodesWithFiber = (nodes) => { |
| | | nodes.forEach((item) => { |
| | | if (item.parentId == val) { |
| | | this.expandedKeys.push(item.id); |
| | | } |
| | | if (item.children && item.children.length > 0) { |
| | | findNodesWithFiber(item.children); |
| | | } |
| | | }); |
| | | }; |
| | | findNodesWithFiber(this.treeData); |
| | | this.expandedKeys = this.expandedKeys.filter((item) => item !== val); |
| | | } else { |
| | | this.expandedKeys.push(val); |
| | | } |
| | | } else { |
| | | this.getTreeData(); |
| | | } |
| | | }, |
| | | // æ¥è¯¢ææç®å½ |
| | | getTreeData() { |
| | | suppliersDirectoryContentsListing().then((res) => { |
| | | this.treeData = res.data; |
| | | }); |
| | | }, |
| | | // ç¹å»æ èç¹ |
| | | handleNodeClick(data) { |
| | | this.contentsId = data.id; |
| | | // this.$refs.consumableOverviewRef.getTableData(data.id) |
| | | }, |
| | | handleClick(tab, event) { }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .purchase-left { |
| | | width: 250px; |
| | | height: 100%; |
| | | background: #fff; |
| | | margin-right: 10px; |
| | | border-radius: 16px; |
| | | box-sizing: border-box; |
| | | padding: 10px 16px; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .purchase-right { |
| | | background: #fff; |
| | | width: calc(100% - 15em); |
| | | height: 100%; |
| | | border-radius: 16px; |
| | | box-sizing: border-box; |
| | | padding: 10px 16px; |
| | | } |
| | | |
| | | .purchase-page { |
| | | display: flex; |
| | | padding-top: 10px; |
| | | padding-bottom: 10px; |
| | | box-sizing: border-box; |
| | | width: 100%; |
| | | } |
| | | |
| | | >>>.el-tabs__content { |
| | | height: calc(100% - 40px); |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | // æ¥çæè¯ |
| | | handleLook(row) { |
| | | addProcessComplain({ id: row.id }).then((res) => { |
| | | getProcessComplain({ id: row.id }).then((res) => { |
| | | this.currentInfo = res.data |
| | | this.currentInfo0 = this.HaveJson(res.data) |
| | | this.title = 'æ¥çæè¯' |
| | |
| | | <el-form-item label="ç¸å
³éä»¶" prop="file"> |
| | | <div class="table-between"> |
| | | <el-input v-model="acceptance.file" style="width: 80%;" disabled></el-input> |
| | | <el-upload |
| | | ref="upload" |
| | | style="float: right;" |
| | | :headers="uploadHeader" |
| | | :action="action" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess" |
| | | > |
| | | <el-upload ref="upload" style="float: right;" :headers="uploadHeader" :action="action" |
| | | :show-file-list="false" :on-success="onSuccess"> |
| | | <el-button type="primary"> |
| | | éä»¶ä¸ä¼ |
| | | </el-button> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¸
å" prop="substanceId" |
| | | :rule="[{ required: true, message: 'è¯·éæ©æ¸
å', trigger: 'change' }]"> |
| | | <el-form-item label="æ¸
å" prop="substanceId" :rule="[{ required: true, message: 'è¯·éæ©æ¸
å', trigger: 'change' }]"> |
| | | <el-select v-model="acceptance.substanceId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | <el-option v-for="item in options" :key="item.value" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°è´§æ¥æ" prop="arriveDate"> |
| | | <el-date-picker |
| | | v-model="acceptance.arriveDate" |
| | | align="right" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | <el-date-picker v-model="acceptance.arriveDate" align="right" type="date" placeholder="éæ©æ¥æ" |
| | | style="width: 100%" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | }, |
| | | methods: { |
| | | openDialog(id) { |
| | | if(id) { |
| | | if (id) { |
| | | this.getDetail(id) |
| | | } else { |
| | | this.clearForm() |
| | |
| | | }, |
| | | getDetail(id) { |
| | | this.loading = true |
| | | getAcceptanceDetails({id: id}).then(res => { |
| | | getAcceptanceDetails({ id: id }).then(res => { |
| | | this.acceptance = res.data.acceptance |
| | | this.list = res.data.list |
| | | this.loading = false |
| | |
| | | } |
| | | this.acceptance.list = this.HaveJson(this.list) |
| | | this.submitLoading = true |
| | | if(this.acceptance.id) { |
| | | updateAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | if (this.acceptance.id) { |
| | | updateAcceptance({ acceptance: this.acceptance, list: this.list }).then(res => { |
| | | this.$message.success('ç¼è¾æå') |
| | | this.submitLoading = false |
| | | this.closeDialog() |
| | |
| | | this.submitLoading = false |
| | | }) |
| | | } else { |
| | | addAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | addAcceptance({ acceptance: this.acceptance, list: this.list }).then(res => { |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | |
| | | <table border="1" cellspacing="10" class="tables"> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>å¹è®è®¡åï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | | <el-select v-model="form.personTrainingDetailedId" clearable filterable style="width: 100%" disabled |
| | | placeholder="è¯·éæ©" size="small"> |
| | | <el-option v-for="item in yearTrainingDetailed" :key="item.id" :label="item.trainingObjectives" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td class="td-title"> |
| | | <p>ä¸åæ ¼æå离äºå®çæè¿°ï¼</p> |
| | | </td> |
| | | <td class="td-info" colspan="3"> |
| | |
| | | <script> |
| | | import { |
| | | getSuperviseDetailCorrect, |
| | | getThisYearTrainingDetailed, |
| | | } from '@/api/cnas/systemManagement/correctiveAction.js' |
| | | export default { |
| | | name: 'correctiveInfo', |
| | |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | yearTrainingDetailed: [], |
| | | form: { |
| | | superviseDetailsId: '', |
| | | raiseResult: '', |
| | |
| | | this.formDia = true |
| | | this.searchInfo(row) |
| | | this.form.superviseDetailsId = row.superviseDetailsId |
| | | this.getYearTrainingDetailed() // è·åå¹è®è®¡å |
| | | }, |
| | | // æ¥è¯¢çæ§è®¡å详æ
宿½ä¿¡æ¯ |
| | | searchInfo(row) { |
| | |
| | | this.form = res.data |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | }, |
| | | getYearTrainingDetailed() { |
| | | getThisYearTrainingDetailed().then(res => { |
| | | this.yearTrainingDetailed = res.data |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |