Merge remote-tracking branch 'origin/dev' into dev
# Conflicts:
# src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
| | |
| | | "jspdf": "^3.0.0", |
| | | "mammoth": "^1.9.0", |
| | | "nprogress": "0.2.0", |
| | | "pako": "^2.1.0", |
| | | "print-js": "^1.6.0", |
| | | "quill": "2.0.2", |
| | | "screenfull": "5.0.2", |
| | |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function deleteProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/deleteProcurementSuppliesList', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function exportProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesList/exportProcurementSuppliesList", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | export function addProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/addProcurementSuppliesList', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function selectEnumByCategory(query) { |
| | | return request({ |
| | | url: '/enum/selectEnumByCategory', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function updateProcurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/updateProcurementSuppliesList', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // æå¡åä¾åºåéè´ |
| | | export function selectSupplierManagementAll(query) { |
| | | return request({ |
| | | url: '/supplierManagement/selectSupplierManagementAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function addProcurementSuppliesExpends(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/addProcurementSuppliesExpends', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | export function deleteProcurementSuppliesExpends(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/deleteProcurementSuppliesExpends', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function procurementSuppliesExpendlist(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesExpends/procurementSuppliesExpendlist/', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function exportProcurementSuppliesStoreExcel(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/exportExcel', |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢èç¹ |
| | | export function addSuppliersDirectoryContents(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/addSuppliersDirectoryContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾èç¹ |
| | | export function updateSuppliersDirectoryContents(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/updateSuppliersDirectoryContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // å é¤èç¹ |
| | | export function deleteSuppliersDirectoryContentsById(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/deleteSuppliersDirectoryContentsById', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½å é¤ |
| | | export function deleteProcurementSuppliesContentById(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/deleteProcurementSuppliesContentById', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢ææèç¹ |
| | | export function getSuppliersDirectoryContentsNodeNames(query) { |
| | | return request({ |
| | | url: '/suppliersDirectoryContents/getSuppliersDirectoryContentsNodeNames', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½è·åèç¹åç§° |
| | | export function getProcurementSuppliesContentsNodeNames(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/getNodeNames', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | //è·åç¨æ·å表 |
| | | export function selectUserCondition(query) { |
| | | return request({ |
| | | url: "/system/newUser/selectUserCondition", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // éè´ç©èµç®å½è¯¦æ
|
| | | export function selectProcurementSuppliesContentById(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesContents/selectProcurementSuppliesContentById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // éè´ç©èµç®å½å表 |
| | | export function directoryListing(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesContents/directoryListing", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºä¿®æ¹ |
| | | export function updateStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/updateStore', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // èæå
¥åºæ°å¢ |
| | | export function addStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/addStore', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | // æ ¹æ®idæ¥è¯¢èæå
¥åº |
| | | export function selectStoreById(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesStore/selectStoreById", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºå表 |
| | | export function storeList(query) { |
| | | return request({ |
| | | url: "/procurementSuppliesStore/storeList", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // èæå
¥åºå é¤ |
| | | export function deleteStore(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesStore/deleteStore', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // éè´ç©èµç®å½æ°å¢ |
| | | export function addProcurementSuppliesContents(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesContents/addProcurementSuppliesContents', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | |
| | | |
| | |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ¥çåå² |
| | | export function pageProcessTotaldeal(query) { |
| | | return request({ |
| | | url: "/processTotaldeal/pageProcessTotaldeal", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | |
| | | return request({ |
| | | url: "/manageDocumentIssueRecycle/addManageDocumentIssueRecycle", |
| | | method: "post", |
| | | responseType: "blob", |
| | | headers: { "Content-Type": "application/x-www-form-urlencoded" }, |
| | | data: data, |
| | | }); |
| | | } |
| | |
| | | |
| | | <script> |
| | | import jsPDF from "jspdf"; |
| | | import file from '@/utils/file.js' |
| | | export default { |
| | | props: ['isUpFile'], |
| | | data() { |
| | |
| | | } |
| | | const pdf = new jsPDF("p", "mm", "a4"); |
| | | for (let i = 0; i < this.contextList.length; i++) { |
| | | console.log(2222, this.contextList.length, this.$refs.pdfCanvas[i]) |
| | | const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 1.0); |
| | | const imgData = this.$refs.pdfCanvas[i].toDataURL('image/jpeg', 0.7); |
| | | const pdfWidth = pdf.internal.pageSize.getWidth(); |
| | | const pdfHeight = (this.$refs.pdfCanvas[i].height * pdfWidth) / this.$refs.pdfCanvas[i].width; |
| | | pdf.addImage(imgData, "JPEG", 0, 0, pdfWidth, pdfHeight); // å°å¾çæ·»å å° PDF |
| | |
| | | import { convertToHtml } from 'mammoth'; |
| | | import Vue from 'vue' |
| | | import { convertToHtml } from "mammoth"; |
| | | import pako from "pako"; |
| | | import Vue from "vue"; |
| | | |
| | | export default { |
| | | async convertFileToHtml(url) { |
| | | var xhr = new XMLHttpRequest(); |
| | | xhr.open('GET', Vue.prototype.javaApi+url, true);//è·åæä»¶æµçæ¥å£ |
| | | xhr.open("GET", Vue.prototype.javaApi + url, true); //è·åæä»¶æµçæ¥å£ |
| | | xhr.send(); |
| | | xhr.responseType = "blob";//ä¸è½æ¼ |
| | | xhr.responseType = "blob"; //ä¸è½æ¼ |
| | | let xhrPromise = new Promise((resolve, reject) => { |
| | | xhr.onload = async function () { |
| | | if (this.status === 200) { |
| | | // è¿åçæä»¶æµï¼è½¬æ¢æblob对象 |
| | | var blob = new Blob([this.response],{ type:'application/vnd.openxmlformats-officedocument.wordprocessingml.document' }); |
| | | var blob = new Blob([this.response], { |
| | | type: "application/vnd.openxmlformats-officedocument.wordprocessingml.document", |
| | | }); |
| | | // 使ç¨mammothå°Word转æ¢ä¸ºHTML |
| | | let reader = new FileReader(); |
| | | reader.readAsArrayBuffer(blob); |
| | | let htmlContentPromise = new Promise((resolve, reject) => { |
| | | reader.onload = async function () { |
| | | var arrayBuffer = xhr.response; //arrayBuffer |
| | | const result = await convertToHtml({ arrayBuffer: arrayBuffer }) |
| | | let html = result.value.replace(/ï/g, '') |
| | | .replace('<h1>', '<h1 style="text-align: center;">') |
| | | .replace(/<table>/g, '<table style="border-collapse: collapse;border: 1px solid #000;">') |
| | | .replace(/<tr>/g, '<tr style="height: 30px;">') |
| | | .replace(/<td>/g, '<td style="border: 1px solid #000;">') |
| | | .replace(/<p>/g, '<p style="text-indent: 2em;">') |
| | | .replace(/<a [^>]*>/g, "") |
| | | .replace(/<\/a>/g, "") |
| | | const result = await convertToHtml({ arrayBuffer: arrayBuffer }); |
| | | let html = result.value |
| | | .replace(/ï/g, "") |
| | | .replace("<h1>", '<h1 style="text-align: center;">') |
| | | .replace( |
| | | /<table>/g, |
| | | '<table style="border-collapse: collapse;border: 1px solid #000;">' |
| | | ) |
| | | .replace(/<tr>/g, '<tr style="height: 30px;">') |
| | | .replace(/<td>/g, '<td style="border: 1px solid #000;">') |
| | | .replace(/<p>/g, '<p style="text-indent: 2em;">') |
| | | .replace(/<a [^>]*>/g, "") |
| | | .replace(/<\/a>/g, ""); |
| | | // .replace(/em/g, "cm"); |
| | | resolve(html) |
| | | resolve(html); |
| | | }; |
| | | }) |
| | | resolve(await htmlContentPromise) |
| | | }); |
| | | resolve(await htmlContentPromise); |
| | | } |
| | | |
| | | } |
| | | }) |
| | | return await xhrPromise |
| | | }; |
| | | }); |
| | | return await xhrPromise; |
| | | }, |
| | | downloadIamge(imgsrc, name) {//ä¸è½½å¾çå°ååå¾çå |
| | | downloadIamge(imgsrc, name) { |
| | | //ä¸è½½å¾çå°ååå¾çå |
| | | var image = new Image(); |
| | | // è§£å³è·¨å Canvas 污æé®é¢ |
| | | image.setAttribute("crossOrigin", "anonymous"); |
| | | image.onload = function() { |
| | | image.onload = function () { |
| | | var canvas = document.createElement("canvas"); |
| | | canvas.width = image.width; |
| | | canvas.height = image.height; |
| | |
| | | a.dispatchEvent(event); // 触åaçåå»äºä»¶ |
| | | }; |
| | | image.src = imgsrc; |
| | | } |
| | | }, |
| | | // å缩blob |
| | | compressBlob(blob) { |
| | | const reader = new FileReader(); |
| | | reader.readAsArrayBuffer(blob); |
| | | return new Promise((resolve) => { |
| | | reader.onload = () => { |
| | | const arrayBuffer = reader.result; |
| | | const uint8Array = new Uint8Array(arrayBuffer); |
| | | const compressedData = pako.deflate(uint8Array); |
| | | const compressedBlob = new Blob([compressedData], { type: blob.type }); |
| | | resolve(compressedBlob); |
| | | }; |
| | | }); |
| | | }, |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | width="60%" |
| | | :visible.sync="dialogVisible" |
| | | > |
| | | <el-form :model="model" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="项ç®åç§°"> |
| | | <el-select |
| | | v-model="model.name" |
| | | placeholder="è¯·éæ©é¡¹ç®åç§°" |
| | | style="width: 100%" |
| | | :disabled="row ? true:false" |
| | | @change="handleSelect" |
| | | > |
| | | <el-option |
| | | v-for="(v, i) in consumableOptions" |
| | | :label="v.consumablesName" |
| | | :value="v" |
| | | :key="i" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¶èæ°é"> |
| | | <el-input-number v-model="model.amount" :min="0" :step="1" placeholder="请è¾å
¥æ¶èæ°é"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="sumbit">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | addProcurementSuppliesExpends, |
| | | procurementSuppliesList |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogTitle: "", |
| | | dialogVisible: false, |
| | | model: { |
| | | listId: undefined, |
| | | name: "" |
| | | }, |
| | | consumableOptions: [], |
| | | row: undefined |
| | | } |
| | | }, |
| | | created() { |
| | | this.fetchConsumableOptions() |
| | | }, |
| | | methods: { |
| | | fetchConsumableOptions() { |
| | | procurementSuppliesList().then(res => { |
| | | if (res.code === 200) { |
| | | this.consumableOptions = res.data.records |
| | | } |
| | | }) |
| | | }, |
| | | openDialog(row) { |
| | | if(row) { |
| | | console.log(row, 'true') |
| | | this.dialogTitle = `${row.consumablesName}æ·»å æ¶è项` |
| | | this.row = row |
| | | this.model.listId = row.id |
| | | this.model.name = row.consumablesName |
| | | } else { |
| | | this.dialogTitle = 'æ·»å æ¶è项' |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | handleSelect(item) { |
| | | console.log(item) |
| | | this.model.listId = item.id |
| | | this.model.name = item.consumablesName |
| | | }, |
| | | sumbit() { |
| | | addProcurementSuppliesExpends(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template slot="form"> |
| | | <div class="action-box"> |
| | | <div></div> |
| | | <div class="flex"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="showDialog(undefined)"> |
| | | æ°å»º |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" size="small" @click="exportExcel"> |
| | | 导åºExcel |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="columns" |
| | | :currentChange="rowClick" |
| | | :height="'25vh'" |
| | | :highlightCurrentRow="true" |
| | | :isSelection="false" |
| | | :rowStyle="tableRowStyle" |
| | | :table-data="tableData" |
| | | rowKey="id" |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | > |
| | | <template v-slot:consumablesTypeSlot="{row}"> |
| | | {{ findType(row.consumablesType) }} |
| | | </template> |
| | | <template v-slot:operation="scope"> |
| | | <el-button size="small" type="text" @click="showDialog(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="handleDelete(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </limsTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleCurrent" |
| | | @size-change="handleSize" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <el-divider></el-divider> |
| | | <div> |
| | | <ConsumableProject ref="consumableProject"></ConsumableProject> |
| | | </div> |
| | | <Edit ref="editRef" :contentsId="contentsId" @submit="fetchData"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from './index.vue'; |
| | | import Edit from "./Edit.vue" |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | deleteProcurementSuppliesList, |
| | | procurementSuppliesList, |
| | | exportProcurementSuppliesList |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | import ConsumableProject from "./ConsumableProject.vue" |
| | | |
| | | export default { |
| | | dicts: ["consumables_type"], |
| | | components: { |
| | | TableCard, limsTable,Edit, ConsumableProject |
| | | }, |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | required: true, |
| | | } |
| | | }, |
| | | watch: { |
| | | contentsId(newVal, oldVal) { |
| | | if (newVal !== 0) { |
| | | this.fetchData() |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | label: "è´§å·", |
| | | prop: "itemNumber" |
| | | }, |
| | | { |
| | | label: "ç±»å«", |
| | | prop: "consumablesType", |
| | | dataType: "slot", |
| | | slot: "consumablesTypeSlot" |
| | | }, |
| | | { |
| | | label: "åç§°", |
| | | prop: "consumablesName" |
| | | }, |
| | | { |
| | | label: "è§æ ¼", |
| | | prop: "specifications" |
| | | }, |
| | | { |
| | | label: "åèä¾åºå", |
| | | prop: "supplierName" |
| | | }, |
| | | { |
| | | label: "åºåä¸é", |
| | | prop: "lowerLimit" |
| | | }, |
| | | { |
| | | label: "å½ååºå", |
| | | prop: "currentAmount" |
| | | }, |
| | | { |
| | | label: "计éåä½", |
| | | prop: "unit" |
| | | }, |
| | | { |
| | | label: "夿³¨", |
| | | prop: "remark" |
| | | }, |
| | | { |
| | | label: "è´è´£äºº", |
| | | prop: "personInChargeName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°äºº", |
| | | prop: "updateUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°æ¥æ", |
| | | prop: "updateTime" |
| | | }, |
| | | { |
| | | fixed: 'right', |
| | | label: "æä½", |
| | | width: 120, |
| | | dataType: "slot", |
| | | slot: "operation" |
| | | } |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | options: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchData() |
| | | this.options = this.dict.type.consumables_type; |
| | | }, |
| | | methods: { |
| | | async fetchData() { |
| | | procurementSuppliesList({ contentId: this.contentsId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | if (this.tableData.length > 0) { |
| | | this.rowClick(this.tableData[0]) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | findType(val) { |
| | | this.$nextTick() |
| | | let res |
| | | const e = this.options.find(item => item.value == val) |
| | | if(e) { |
| | | res = e.label |
| | | } else { |
| | | res = '-' |
| | | } |
| | | return res |
| | | }, |
| | | showDialog(row) { |
| | | this.$refs.editRef.openDialog(row); |
| | | }, |
| | | async exportExcel() { |
| | | exportProcurementSuppliesList({parentId:this.contentsId}).then(res => { |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | this.$download.saveAs(blob, 'èæå表.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | handleCurrent() { |
| | | }, |
| | | handleSize() { |
| | | }, |
| | | handleDelete(row) { |
| | | deleteProcurementSuppliesList({ id:row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.fetchData() |
| | | } |
| | | }) |
| | | }, |
| | | rowClick(row) { |
| | | this.$refs.consumableProject.fetchListId(row) |
| | | }, |
| | | tableRowStyle({row}) { |
| | | if(row.currentAmount <= row.lowerLimit) { |
| | | return { background: '#ffcaca' } |
| | | } else { |
| | | return {} |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </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> |
| | |
| | | import TableCard from './index.vue'; |
| | | import { procurementSuppliesList } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro" |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import axios from "axios"; |
| | | |
| | | export default { |
| | | components: { CardPanel, TableCard, limsTable }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <TableCard :showTitle="false"> |
| | | <template slot="form"> |
| | | <div class="action-box"> |
| | | <div></div> |
| | | <div class="flex"> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="showDialog"> |
| | | æ·»å é¡¹ç® |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" size="small" @click="exportExcel"> |
| | | å¯¼åº |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <template v-slot:table> |
| | | <limsTable |
| | | :column="columns" |
| | | :height="'25vh'" |
| | | :isSelection="true" |
| | | :table-data="tableData" |
| | | style="margin-top: 18px; padding: 0 15px;" |
| | | > |
| | | <template v-slot:operation="scope"> |
| | | <el-button size="small" type="text" @click="deleteData(scope.row)">å é¤</el-button> |
| | | </template> |
| | | </limsTable> |
| | | <div class="pagination"> |
| | | <div></div> |
| | | <el-pagination |
| | | :page-size="pagination.pageSize" |
| | | :page-sizes="[10, 20, 30, 40]" |
| | | :total="pagination.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | @current-change="handleCurrent" |
| | | @size-change="handleSize" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </template> |
| | | </TableCard> |
| | | <AddProject ref="AddProjectRef" @submit="fetchData"/> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import TableCard from './index.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import Edit from "./Edit.vue" |
| | | import AddProject from './AddProject.vue'; |
| | | import { |
| | | deleteProcurementSuppliesExpends, |
| | | procurementSuppliesExpendlist |
| | | } from "@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro"; |
| | | |
| | | export default { |
| | | components: { |
| | | TableCard, limsTable, Edit, AddProject |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | // { |
| | | // label: "ç¼å·" |
| | | // }, |
| | | { |
| | | label: "项ç®åç§°", |
| | | prop: "listName" |
| | | }, |
| | | { |
| | | label: "æ¶èæ°é", |
| | | prop: "amount" |
| | | }, |
| | | { |
| | | label: "å½å
¥äºº", |
| | | prop: "enterUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°äºº", |
| | | prop: "updateUserName" |
| | | }, |
| | | { |
| | | label: "æè¿æ´æ°æ¥æ", |
| | | prop: "updateTime" |
| | | }, |
| | | { |
| | | label: "æä½", |
| | | dataType: "slot", |
| | | slot: "operation" |
| | | } |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | listId: 0, |
| | | row: undefined |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.fetchData() |
| | | }, |
| | | methods: { |
| | | fetchListId(row) { |
| | | if(row) { |
| | | this.listId = row.id |
| | | this.row = row |
| | | } |
| | | this.fetchData() |
| | | }, |
| | | async fetchData() { |
| | | if (this.listId === 0) return |
| | | procurementSuppliesExpendlist({ |
| | | procurementSuppliesListId:this.listId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.tableData = res.data |
| | | } |
| | | }) |
| | | }, |
| | | showDialog() { |
| | | this.$refs.AddProjectRef.openDialog(this.row); |
| | | }, |
| | | deleteData(row) { |
| | | deleteProcurementSuppliesExpends({ expendId:row.expendId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.fetchData() |
| | | } |
| | | }) |
| | | }, |
| | | handleCurrent() { |
| | | }, |
| | | handleSize() { |
| | | }, |
| | | exportExcel() { |
| | | } |
| | | } |
| | | } |
| | | </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> |
| | | <el-dialog |
| | | :visible.sync="dialogVisible" |
| | | title="æ·»å èæé¡¹ç®ä¿¡æ¯" |
| | | width="70%" |
| | | > |
| | | <el-form ref="modelForm" :model="model" :rules="rules" label-width="100px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èæç±»å" prop="consumablesType"> |
| | | <el-select v-model="model.consumablesType" placeholder="è¯·éæ©èæç±»å" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in dict.type.consumables_type" :key="i" :label="v.label" :value="v.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´§å·"> |
| | | <el-input v-model="model.itemNumber" placeholder="请è¾å
¥è´§å·" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èæåç§°"> |
| | | <el-input v-model="model.consumablesName" placeholder="请è¾å
¥èæåç§°" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼"> |
| | | <el-input v-model="model.specifications" placeholder="请è¾å
¥è§æ ¼" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="计éåä½"> |
| | | <el-input v-model="model.unit" placeholder="请è¾å
¥è®¡éåä½" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åèä»·æ ¼"> |
| | | <el-input-number v-model="model.referencePrice" :min="0" :precision="2" :step="0.01" placeholder="请è¾å
¥åèä»·æ ¼" |
| | | size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åæ¾ä½ç½®"> |
| | | <el-select v-model="model.contentId" placeholder="è¯·éæ©åæ¾ä½ç½®" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in procurementSuppliesContentOptions" :key="i" :label="v.nodeName" |
| | | :value="v.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´è´£äºº"> |
| | | <el-select v-model="model.personInCharge" placeholder="è¯·éæ©è´è´£äºº" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in userOptions" :key="i" :label="v.name" :value="v.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåä¸é"> |
| | | <el-input-number v-model="model.upperLimit" :min="0" :step="1" placeholder="请è¾å
¥åºåä¸é" size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåä¸é"> |
| | | <el-input-number v-model="model.lowerLimit" :min="0" :step="1" placeholder="请è¾å
¥åºåä¸é" size="small"></el-input-number> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¾åºå"> |
| | | <el-select v-model="model.supplier" placeholder="è¯·éæ©ä¾åºå" size="small" style="width: 100%"> |
| | | <el-option v-for="(v, i) in supplierOptions" :key="i" :label="v.supplierName" |
| | | :value="v.supplierManagementId"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="èæå¾æ "> |
| | | <div class="rows"> |
| | | <el-input v-model="model.consumablesIcon" placeholder="请è¾å
¥èæå¾æ " size="small" style="width: 90%;"/> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :headers="uploadHeader" |
| | | :on-success="onSuccessIcon" |
| | | :show-file-list="false" |
| | | style="float: left; margin: 0 12px 0 20px;" |
| | | > |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="èæéä»¶"> |
| | | <div class="rows"> |
| | | <el-input v-model="model.attachment" placeholder="请è¾å
¥èæéä»¶" size="small" style="width: 90%;"/> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="action" |
| | | :on-success="onSuccessFile" |
| | | :show-file-list="false" |
| | | :headers="uploadHeader" |
| | | style="float: left; margin: 0 12px 0 20px;" |
| | | > |
| | | <el-button slot="trigger" class="uploadFile" size="small" type="primary">æµè§</el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨"> |
| | | <el-input |
| | | v-model="model.remark" |
| | | :rows="2" |
| | | placeholder="请è¾å
¥å¤æ³¨" |
| | | size="small" |
| | | type="textarea" |
| | | > |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addProcurementSuppliesList, |
| | | updateProcurementSuppliesList, |
| | | selectSupplierManagementAll, |
| | | getProcurementSuppliesContentsNodeNames, |
| | | selectUserCondition |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | export default { |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | model: { |
| | | consumablesType: undefined, |
| | | consumablesIcon: undefined, |
| | | attachment: undefined, |
| | | }, |
| | | procurementSuppliesContentOptions: [], |
| | | userOptions: [], |
| | | supplierOptions: [], |
| | | rules: { |
| | | consumablesType: [{ required: true, message: 'è¯·éæ©èæç±»å', trigger: 'blur' }], |
| | | }, |
| | | } |
| | | }, |
| | | dicts: ["consumables_type"], |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | required: true, |
| | | } |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.findProcurementSuppliesContentOptions() |
| | | this.findUserOptions() |
| | | this.findSupplierOptions() |
| | | }, |
| | | methods: { |
| | | // é置表å |
| | | resetForm() { |
| | | this.$refs.modelForm.resetFields(); |
| | | this.dialogVisible = false |
| | | }, |
| | | openDialog(row) { |
| | | if (row) { |
| | | console.log("row", row) |
| | | this.model = row |
| | | } else { |
| | | this.model = {} |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | findProcurementSuppliesContentOptions() { |
| | | getProcurementSuppliesContentsNodeNames().then(res => { |
| | | if (res.code === 200) { |
| | | this.procurementSuppliesContentOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | findUserOptions() { |
| | | selectUserCondition().then(res => { |
| | | if (res.code === 200) { |
| | | this.userOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | findSupplierOptions() { |
| | | selectSupplierManagementAll().then(res => { |
| | | if (res.code === 200) { |
| | | this.supplierOptions = res.data |
| | | } |
| | | }) |
| | | }, |
| | | async onSuccessIcon(response) { |
| | | this.$set(this.model, "consumablesIcon", response.data) |
| | | }, |
| | | async onSuccessFile(response) { |
| | | this.$set(this.model, "attachment", response.data) |
| | | }, |
| | | submit() { |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | if (this.model.id) { |
| | | updateProcurementSuppliesList(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | | } else { |
| | | addProcurementSuppliesList(this.model).then(res => { |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | this.$emit('submit') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | >>> .el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | .rows { |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | >>>.el-form-item__content { |
| | | line-height: 39px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div style=" |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-right: 20px; |
| | | margin-bottom: 20px; |
| | | "> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="addOrUpdateStore('add')">æ·»å |
| | | </el-button> |
| | | <el-button icon="el-icon-download" size="small" @click="importExcel"> |
| | | 导åºexcel |
| | | </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> |
| | | </div> |
| | | |
| | | <!-- ç¼è¾-æ°å¢å¼¹æ¡ --> |
| | | <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"> |
| | | <span style="margin-left: 10px">å
¥åºå</span> |
| | | </div> |
| | | <el-form ref="formModel" :model="form" label-width="auto"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºåå·"> |
| | | <el-input v-model="form.oddNumbers" placeholder="请è¾å
¥å
¥åºåå·" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºåºå"> |
| | | <el-input v-model="form.inventory" placeholder="请è¾å
¥å
¥åºåºå" size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å
¥åºæ»éé¢"> |
| | | <el-input v-model="form.totalAmount" placeholder="请è¾å
¥å
¥åºæ»éé¢" size="small"></el-input> |
| | | </el-form-item> |
| | | </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-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"> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <!-- å
¥åºæç» --> |
| | | <div> |
| | | <div>å
¥åºæç»</div> |
| | | <div class="input-form"> |
| | | <div> |
| | | <div> |
| | | <span>èæåç§°:</span> |
| | | <el-select v-model="formTwo.id" filterable placeholder="è¯·éæ©èæåç§°" size="small" style="width: 70%"> |
| | | <el-option v-for="(v, i) in consumableOptions" :key="i" :label="v.consumablesName" |
| | | :value="v.id"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>åä»·:</span> |
| | | <el-input v-model="formTwo.unitPrice" placeholder="请è¾å
¥åä»·" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>å
¥åºæ°é:</span> |
| | | <el-input v-model="formTwo.storeNumber" placeholder="请è¾å
¥å
¥åºæ°é" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div> |
| | | <span>æ»ä»·:</span> |
| | | <el-input v-model="formTwo.totalPrice" placeholder="请è¾å
¥æ»ä»·" size="small" style="width: 70%"> |
| | | </el-input> |
| | | </div> |
| | | </div> |
| | | <el-button size="mini" type="primary" |
| | | @click="addTableData">æ·»å |
| | | </el-button> |
| | | </div> |
| | | <el-table :data="consumables" style="margin-top: 10px"> |
| | | <el-table-column label="ç¼å·" type="index" width="120px"></el-table-column> |
| | | <el-table-column label="è´§å·" prop="itemNumber"></el-table-column> |
| | | <el-table-column label="ç±»å«" prop="type"></el-table-column> |
| | | <el-table-column label="åç§°" prop="consumablesName"></el-table-column> |
| | | <el-table-column label="è§æ ¼" prop="specifications"></el-table-column> |
| | | <el-table-column label="åèä¾åºå" prop="supplier"></el-table-column> |
| | | <el-table-column label="计éåä½" prop="unit"></el-table-column> |
| | | <el-table-column label="åä»·" prop="unitPrice"></el-table-column> |
| | | <el-table-column label="å
¥åºæ°é" prop="storeNumber"></el-table-column> |
| | | <el-table-column label="æ»ä»·" prop="totalPrice"></el-table-column> |
| | | <el-table-column label="æä½" width="80px"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" style="color: #f56c6c" type="text" @click="deleteTableData(scope.$index)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="handleClose">å æ¶</el-button> |
| | | <el-button type="primary" :loading="saveLoading" @click="save">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addStore, |
| | | deleteStore, |
| | | exportProcurementSuppliesStoreExcel, |
| | | procurementSuppliesList, |
| | | selectStoreById, |
| | | selectUserCondition, |
| | | storeList, |
| | | updateStore |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | |
| | | export default { |
| | | computed: { |
| | | title() { |
| | | return this.dialogType == "add" ? "æ°å»ºå
¥åº" : "ç¼è¾å
¥åº"; |
| | | }, |
| | | }, |
| | | dicts: ["consumables_type"], |
| | | props: { |
| | | contentsId: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | mutiList: [], |
| | | consumables: [], |
| | | users: [], |
| | | form: { |
| | | oddNumbers: null, |
| | | inventory: null, |
| | | totalAmount: null, |
| | | storageTime: null, |
| | | storageUser: null, |
| | | remark: null, |
| | | }, |
| | | formTwo: { |
| | | consumablesName: null, |
| | | unitPrice: null, |
| | | storeNumber: null, |
| | | totalPrice: null, |
| | | }, |
| | | dialogVisible: false, |
| | | dialogType: "", |
| | | upIndex: 0, |
| | | tableColumn: [ |
| | | { |
| | | label: 'å
¥åºåå·', |
| | | prop: 'oddNumbers', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'èæåç§°', |
| | | prop: 'consumablesName', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºæ°é', |
| | | prop: 'storeNumber', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºæ»ä»·', |
| | | prop: 'totalPrice', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å
¥åºäºº', |
| | | prop: 'storageUserName', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'å
¥åºæ¥æ', |
| | | prop: 'storageTime', |
| | | minWidth: '100' |
| | | }, { |
| | | label: '说æ', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, { |
| | | label: 'ç»è®°äºº', |
| | | prop: 'registrantName', |
| | | minWidth: '160' |
| | | },{ |
| | | label: 'ç»è®°æ¥æ', |
| | | prop: 'registrantTime', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '120', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.addOrUpdateStore('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteStore(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | consumableOptions: [], |
| | | options: [], |
| | | storageTableData: [], |
| | | searchForm: { |
| | | orderBy: { |
| | | field: "id", |
| | | order: "desc", |
| | | }, |
| | | }, |
| | | saveLoading: false, |
| | | }; |
| | | }, |
| | | components: { |
| | | limsTable, |
| | | }, |
| | | mounted() { |
| | | this.searchList(); |
| | | this.getUserList(); |
| | | this.fetchListOptions() |
| | | this.options = this.dict.type.consumables_type |
| | | }, |
| | | methods: { |
| | | // ä¿å |
| | | save() { |
| | | let data = { |
| | | store: this.form, |
| | | consumables: this.consumables, |
| | | }; |
| | | this.saveLoading = true; |
| | | if (this.dialogType === "update") { |
| | | updateStore(data).then((res) => { |
| | | this.saveLoading = false |
| | | if (res.code == 200) { |
| | | this.$message.success("ä¿®æ¹æå"); |
| | | this.handleClose(); |
| | | // this.$refs.selectList() |
| | | this.searchList() |
| | | } |
| | | }).catch((err) => { |
| | | this.saveLoading = false |
| | | }) |
| | | } else { |
| | | addStore(data).then((res) => { |
| | | this.saveLoading = false |
| | | if (res.code == 200) { |
| | | this.$message.success("æ°å¢æå"); |
| | | this.handleClose(); |
| | | // this.$refs.selectList() |
| | | this.searchList() |
| | | } |
| | | }).catch((err) => { |
| | | this.saveLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | findType(val) { |
| | | console.log(val) |
| | | return this.options.find(item => item.value === val).label |
| | | }, |
| | | // æ·»å è¡¨æ ¼æ°æ® |
| | | addTableData() { |
| | | this.$nextTick() |
| | | console.log('this.consumableOptions',this.consumableOptions) |
| | | this.consumableOptions.forEach(item => { |
| | | if (item.id === this.formTwo.id) { |
| | | this.consumables.push({ |
| | | itemNumber: null, |
| | | type: this.findType(item.consumablesType), |
| | | consumablesName: item.consumablesName, |
| | | specifications: item.specifications, |
| | | supplier: item.supplierName, |
| | | unit: item.unit, |
| | | unitPrice: this.formTwo.unitPrice, |
| | | storeNumber: this.formTwo.storeNumber, |
| | | totalPrice: this.formTwo.totalPrice, |
| | | }); |
| | | } |
| | | }) |
| | | }, |
| | | deleteTableData(index) { |
| | | this.consumables.splice(index, 1); |
| | | }, |
| | | // æå¼å¼¹æ¡ |
| | | addOrUpdateStore(type,row) { |
| | | if (type === 'edit') { |
| | | this.dialogType = "update"; |
| | | selectStoreById({id:row.id}).then(res => { |
| | | if (res.code === 201) return |
| | | this.consumables = res.data.consumables |
| | | this.form = {...res.data.store} |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | | } else { |
| | | this.dialogType = "add"; |
| | | } |
| | | this.dialogVisible = true; |
| | | }, |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | this.tableLoading = true |
| | | storeList({...this.page,...this.searchForm}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.storageTableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // 导åºexcel |
| | | async importExcel() { |
| | | exportProcurementSuppliesStoreExcel({parentId:this.contentsId}).then(res => { |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | this.$download.saveAs(blob, 'èæå
¥åº.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.form = { |
| | | oddNumbers: null, |
| | | inventory: null, |
| | | totalAmount: null, |
| | | storageTime: null, |
| | | storageUser: null, |
| | | remark: null, |
| | | }; |
| | | this.formTwo = { |
| | | consumablesName: null, |
| | | unitPrice: null, |
| | | storeNumber: null, |
| | | totalPrice: null, |
| | | }; |
| | | this.consumables = []; |
| | | this.dialogVisible = false; |
| | | }, |
| | | viewIssued(row) { |
| | | console.log(row); |
| | | }, |
| | | // è·åææç¨æ· |
| | | getUserList() { |
| | | selectUserCondition().then((res) => { |
| | | this.users = res.data; |
| | | }); |
| | | }, |
| | | async fetchListOptions() { |
| | | procurementSuppliesList({contentsId: this.contentsId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.consumableOptions = res.data.records |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | // å é¤ |
| | | deleteStore (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | console.log('row>>>>>>>>>>>>>>s',row) |
| | | deleteStore({ |
| | | id:row.id, |
| | | consumablesId:row.consumablesId |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | console.log('err---', err); |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .el-dialog { |
| | | margin: 6vh auto 50px !important; |
| | | } |
| | | .el-dialog__body { |
| | | max-height: 42em; |
| | | overflow-y: auto; |
| | | } |
| | | .input-form { |
| | | display: flex; |
| | | margin: 10px 0; |
| | | } |
| | | </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-item label="æ´æ°äºº"> |
| | | <el-select v-model="form.updateUser"> |
| | | <el-option |
| | | v-for="item in users" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id" |
| | | ></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ´æ°æ¶é´"> |
| | | <el-input |
| | | v-model="form.updateTime" |
| | | 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-select v-model="addForm.parentId"> |
| | | <el-option v-for="(item,index) in nodeNames" :key="index" :label="item.nodeName" :value="item.id"></el-option> |
| | | </el-select> --> |
| | | <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 { |
| | | addSuppliersDirectoryContents, |
| | | updateSuppliersDirectoryContents, |
| | | deleteSuppliersDirectoryContentsById, |
| | | getSuppliersDirectoryContentsNodeNames, |
| | | selectUserCondition, |
| | | selectProcurementSuppliesContentById, |
| | | getProcurementSuppliesContentsNodeNames, |
| | | addProcurementSuppliesContents, deleteProcurementSuppliesContentById |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | 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: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | }, |
| | | addForm: { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | 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() { |
| | | selectProcurementSuppliesContentById({id:this.id}) |
| | | .then((res) => { |
| | | if (res.data == null) { |
| | | this.form = { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | }; |
| | | return; |
| | | } |
| | | this.form = res.data; |
| | | }); |
| | | }, |
| | | // æ°å»º |
| | | addContents() { |
| | | this.dialogVisible = true; |
| | | this.resetForm(); |
| | | }, |
| | | resetForm() { |
| | | this.addForm = { |
| | | nodeName: "", |
| | | code: "", |
| | | updateUser: "", |
| | | updateTime: "", |
| | | parentId: null, |
| | | }; |
| | | }, |
| | | async 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; |
| | | } |
| | | try { |
| | | let res = null |
| | | console.log('this.from',this.from) |
| | | if(this.from == 'èææ ' ){ |
| | | console.log('111') |
| | | res = await addProcurementSuppliesContents(this.addForm) |
| | | }else { |
| | | console.log('222') |
| | | res = await addSuppliersDirectoryContents(this.addForm) |
| | | } |
| | | if (res.code === 200) { |
| | | this.$message.success("æ·»å æå"); |
| | | this.dialogVisible = false; |
| | | this.$emit("contentsUpdate", res.data); |
| | | this.getContentsDetail(); |
| | | } |
| | | }catch (error){ |
| | | this.$message.error("æ·»å 失败"); |
| | | } |
| | | }, |
| | | // æ´æ° |
| | | 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(() => { |
| | | if(this.from == 'èææ '){ |
| | | deleteProcurementSuppliesContentById({id:this.form.id}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.$emit("contentsUpdate", this.form.parentId, true); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | }else { |
| | | deleteSuppliersDirectoryContentsById({id:this.form.id}).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("å 餿å"); |
| | | this.$emit("contentsUpdate", this.form.parentId, true); |
| | | this.getContentsDetail(); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | }, |
| | | // è·åææç®å½èç¹ |
| | | getNodeNames() { |
| | | if(this.from == 'èææ '){ |
| | | getProcurementSuppliesContentsNodeNames().then(res => { |
| | | this.nodeNames = res.data; |
| | | }) |
| | | }else { |
| | | 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> |
| | |
| | | <el-tab-pane label="èææ»è§" name="first" :lazy="true"> |
| | | <ConsumableOverview v-if="activeName == 'first'" :contentsId="contentsId"></ConsumableOverview> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="èæå表" name="second" :lazy="true">--> |
| | | <!-- <ConsumableList v-if="activeName == 'second'" :contentsId="contentsId"></ConsumableList>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="èæå
¥åº" name="third" :lazy="true">--> |
| | | <!-- <Store v-if="activeName == 'third'" :contentsId="contentsId"></Store>--> |
| | | <!-- </el-tab-pane>--> |
| | | <!-- <el-tab-pane label="ç®å½ç»´æ¤" name="fourth" :lazy="true">--> |
| | | <!-- <Contents--> |
| | | <!-- v-if="activeName == 'fourth'"--> |
| | | <!-- :id="contentsId"--> |
| | | <!-- @contentsUpdate="contentsUpdate"--> |
| | | <!-- :treeData="treeData"--> |
| | | <!-- from="èææ "--> |
| | | <!-- ></Contents>--> |
| | | <!-- </el-tab-pane>--> |
| | | <el-tab-pane label="èæå表" name="second" :lazy="true"> |
| | | <ConsumableList v-if="activeName == 'second'" :contentsId="contentsId"></ConsumableList> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="èæå
¥åº" name="third" :lazy="true"> |
| | | <Store v-if="activeName == 'third'" :contentsId="contentsId"></Store> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="ç®å½ç»´æ¤" name="fourth" :lazy="true"> |
| | | <Contents |
| | | v-if="activeName == 'fourth'" |
| | | :id="contentsId" |
| | | @contentsUpdate="contentsUpdate" |
| | | :treeData="treeData" |
| | | from="èææ " |
| | | ></Contents> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script> |
| | | // import Contents from "@/tabs/do/a6.service-and-supply-purchase/contents.vue"; |
| | | // import Store from "@/tabs/do/a6.service-and-supply-purchase/store.vue"; |
| | | import ConsumableOverview from "../serviceAndSupplyPro/component/ConsumableOverview.vue"; |
| | | // import ConsumableList from "@/tabs/do/a6.service-and-supply-purchase/ConsumableList.vue" |
| | | import Contents from "./component/contents.vue"; |
| | | import Store from "./component/Store.vue"; |
| | | import ConsumableOverview from "./component/ConsumableOverview.vue"; |
| | | import ConsumableList from "./component/ConsumableList.vue" |
| | | import { |
| | | directoryListing |
| | | } from '@/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro' |
| | | |
| | | export default { |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | components: { |
| | | // Contents, |
| | | // Store, |
| | | ConsumableOverview |
| | | // ConsumableList |
| | | Contents, |
| | | Store, |
| | | ConsumableOverview, |
| | | ConsumableList |
| | | }, |
| | | watch: { |
| | | contentsId(newVal, oldVal) { |
| | |
| | | }, |
| | | // æ¥è¯¢ææç®å½ |
| | | getTreeData() { |
| | | this.$axios |
| | | .get(this.$api.procurementSuppliesContents.directoryListing) |
| | | .then((res) => { |
| | | directoryListing().then((res) => { |
| | | this.treeData = res.data; |
| | | }); |
| | | }, |
| | |
| | | <template> |
| | | <div class="sample-disposal"> |
| | | <el-row class="title"> |
| | | <el-col :span="20" style="padding-left: 20px;text-align: left;">æ£æµææ ¡åç©åçå¤ç½®</el-col> |
| | | <el-col :span="4" style="text-align: right;"> |
| | | <!-- <el-button size="medium" type="primary" @click="handleDown" v-loading="outLoading" style="margin-right: 16px;">导åº</el-button> --> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tabs type="border-card" v-model="activeName" style="height: 100%;" @tab-click="queryParams.totaldealId = ''"> |
| | | <el-tab-pane label="å¡«å" name="å¡«å" style="height: 100%;" :key="1"> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;" |
| | | v-if="addPower">æ°å¢</el-button> |
| | | <el-button size="small" type="primary" @click="handleAdd0" style="margin-left: 20px;">æ°å¢</el-button> |
| | | <div class="table" style="height: calc(100% - 200px)" v-if="activeName == 'å¡«å'"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 290px)'" :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable0" :url="$api.processTotaldeal.pageProcessDeal" :componentData="componentData0" |
| | | :key="upIndex0" :delUrl="$api.processTotaldeal.delProcessDeal" /> --> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åå²è®°å½" name="åå²è®°å½" style="height: 100%;" :key="2"> |
| | |
| | | <div class="search_thing"> |
| | | <div class="search_label">å¹´æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="componentData.entity.month" type="month" placeholder="éæ©æ" format="yyyy-MM" |
| | | <el-date-picker v-model="queryParams0.month" type="month" placeholder="éæ©æ" format="yyyy-MM" |
| | | value-format="yyyy-MM" size="small" @change="refreshTable()"> |
| | | </el-date-picker> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.processTotaldeal.pageProcessTotaldeal" :componentData="componentData" |
| | | :key="upIndex" /> --> |
| | | <lims-table :tableData="tableData0" :column="column0" :tableLoading="tableLoading" |
| | | :height="'calc(100vh - 300px)'" :page="page0" @pagination="pagination0"></lims-table> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | checkProcessTotaldeal, |
| | | ratifyProcessTotaldeal, |
| | | delProcessDeal, |
| | | pageProcessTotaldeal, |
| | | } from "@/api/cnas/process/sampleDisposal"; |
| | | export default { |
| | | components: { |
| | |
| | | noCheckLoading: false, |
| | | checkLoading: false, |
| | | // åå²å表 |
| | | componentData: { |
| | | entity: { |
| | | month: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleLook', |
| | | font: 'æ¥ç', |
| | | type: 'text', |
| | | method: 'handleLook', |
| | | }, { |
| | | id: 'handleDown0', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown0', |
| | | disabFun: (row, index) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | // { |
| | | // id: 'handleAdd', |
| | | // font: 'å¡«å', |
| | | // type: 'text', |
| | | // method: 'handleAdd', |
| | | // disabFun: (row, index) => { |
| | | // return row.submitState=='å·²æäº¤' |
| | | // } |
| | | // }, |
| | | { |
| | | id: 'handleSubmit', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handleSubmit', |
| | | disabFun: (row, index) => { |
| | | return !!row.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, { |
| | | id: 'handleCheck', |
| | | font: 'å®¡æ ¸', |
| | | type: 'text', |
| | | method: 'handleCheck', |
| | | disabFun: (row, index) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, { |
| | | id: 'handleApproval', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApproval', |
| | | disabFun: (row, index) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | // æ ·åå表 |
| | | componentData0: { |
| | | entity: { |
| | | totaldealId: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | do: [{ |
| | | id: 'handleAdd0', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleAdd0' |
| | | }, { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | }], |
| | | tagField: {}, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | upIndex0: 100, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | addInfo: {},//æ°å¢æ ·å |
| | | customPageList: [], |
| | | currentInfo: { |
| | |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | queryParams0: {}, |
| | | tableData0: [], |
| | | column0: [ |
| | | { label: "æä»½", prop: "month" }, |
| | | { label: "æ»æ°é", prop: "totalNum" }, |
| | | { label: "æäº¤äºº", prop: "submitUserName" }, |
| | | { label: "å®¡æ ¸äºº", prop: "examineUserName" }, |
| | | { label: "æ¹å人", prop: "ratifyUserName" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ¥ç", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: "ä¸è½½", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDown0(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !row.url |
| | | } |
| | | }, |
| | | { |
| | | name: "æäº¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleSubmit(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return !!row.submitState && row.submitState != 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "å®¡æ ¸", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleCheck(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.examineState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | { |
| | | name: "æ¹å", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleApproval(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.ratifyState == 'éè¿' || row.submitState == 'å¾
æäº¤' |
| | | } |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page0: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | this.getCustomPageList() |
| | | // this.getPower() |
| | | this.getList() |
| | | this.getList0() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | |
| | | this.getList(); |
| | | }, |
| | | refresh() { |
| | | this.queryParams = {}; |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | this.queryParams0 = {}; |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | refreshTable() { |
| | | this.page.current = 1; |
| | | this.getList(); |
| | | this.page0.current = 1; |
| | | this.getList0(); |
| | | }, |
| | | getList0() { |
| | | this.tableLoading = true; |
| | | let param = { ...this.queryParams0, ...this.page }; |
| | | delete param.total; |
| | | pageProcessTotaldeal({ ...param }) |
| | | .then((res) => { |
| | | this.tableLoading = false; |
| | | if (res.code === 200) { |
| | | this.tableData0 = res.data.records; |
| | | this.page0.total = res.data.total; |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.tableLoading = false; |
| | | }); |
| | | }, |
| | | pagination0({ page, limit }) { |
| | | this.page0.current = page; |
| | | this.page0.size = limit; |
| | | this.getList0(); |
| | | }, |
| | | // å¡«å |
| | | // handleAdd(row){ |
| | |
| | | type: 'success', |
| | | message: 'ç¼è¾æå!' |
| | | }); |
| | | this.$refs.ValueTable0.selectList() |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }).catch(err => { }); |
| | | } else { |
| | | // æ°å¢ |
| | |
| | | type: 'success', |
| | | message: 'æ°å¢æå!' |
| | | }); |
| | | this.$refs.ValueTable0.selectList() |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }).catch(err => { }); |
| | | } |
| | | }, |
| | |
| | | type: 'success', |
| | | message: 'æäº¤æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.refreshTable() |
| | | }).catch(err => { }); |
| | | }) |
| | | }, |
| | |
| | | this.activeName = 'å¡«å' |
| | | this.queryParams.totaldealId = row.id |
| | | this.$nextTick(() => { |
| | | this.$refs['ValueTable0'].selectList() |
| | | this.page.current = 0; |
| | | this.getList(); |
| | | }) |
| | | }, |
| | | commonFun(row, callbanck) { |
| | |
| | | current: -1, |
| | | size: -1, ...this.queryParams |
| | | }).then(res => { |
| | | this.currentInfo.arr = res.data.body.records |
| | | this.lookDialogVisible = true |
| | | this.currentInfo.arr = res.data.records |
| | | if (callbanck) { |
| | | callbanck() |
| | | } |
| | |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.refreshTable() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | } else if (this.title0 == 'æ¹å') { |
| | |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.$refs['ValueTable'].selectList() |
| | | this.refreshTable() |
| | | this.lookDialogVisible = false |
| | | }).catch(err => { }); |
| | | } |
| | |
| | | |
| | | .table { |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 140px); |
| | | padding: 20px; |
| | | } |
| | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .tables td { |
| | |
| | | page: { |
| | | size: 20, |
| | | current: 1, |
| | | total: 0, |
| | | }, |
| | | total: 0, |
| | | correctiveInfo: false, |
| | | viewTestRecordDialog: false, |
| | | }; |
| | |
| | | this.tableLoading = false |
| | | if (res.code === 201) return |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.tableLoading = false |
| | |
| | | formData.append('state', this.type); // æä»¶ååæ®µ |
| | | formData.append('writer', this.currentInfo.writer); // æä»¶ååæ®µ |
| | | |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'æä½æå', type: 'success' }); |
| | | this.checkDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'æä½å¤±è´¥', type: 'error' }); |
| | | return false |
| | | try { |
| | | let res = await checkManageDocumentControlled(formData) |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'æä½æå', type: 'success' }); |
| | | this.checkDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'æä½å¤±è´¥', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.checkLoading = false |
| | | this.noCheckLoading = false |
| | | } |
| | | |
| | | |
| | | }, |
| | | handleCheckSub(type) { |
| | | this.type = type |
| | |
| | | formData.append('file', pdfBlob, fileName); // æä»¶å段 |
| | | formData.append('id', this.currentInfo.id); // æä»¶ååæ®µ |
| | | |
| | | let res = await uploadFileManageDocumentList(formData) |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'ä¸ä¼ æå', type: 'success' }); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'ä¸ä¼ 失败', type: 'error' }); |
| | | return false |
| | | try { |
| | | let res = await uploadFileManageDocumentList(formData) |
| | | this.addLoading = false |
| | | if (res.code == 200) { |
| | | this.$message({ message: 'ä¸ä¼ æå', type: 'success' }); |
| | | this.addDialogVisible = false; |
| | | this.refreshTable() |
| | | return true |
| | | } else { |
| | | this.$message({ message: 'ä¸ä¼ 失败', type: 'error' }); |
| | | return false |
| | | } |
| | | } catch (e) { |
| | | this.addLoading = false |
| | | } |
| | | |
| | | }, |
| | | handleDelete(row) { |
| | | this.$confirm("æ¯å¦å é¤è¯¥æ¡æ°æ®?", "æç¤º", { |
| | |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)"> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table1"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (page.current - 1) * page.size + scope.$index + 1 }}</span> |
| | |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | current: 1, |
| | | }, |
| | | tableData: [], |
| | | loading: false |
| | |
| | | <el-button size="small" @click="openDownloadDia">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)"> |
| | | <el-table :data="tableData" style="width: 100%" height="calc(100vh - 18em)" key="table0"> |
| | | <el-table-column type="index" label="åºå·" width="120"> |
| | | <template v-slot="scope"> |
| | | <span>{{ (search.current - 1) * search.size + scope.$index + 1 }}</span> |
| | |
| | | prop: "insResult", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.insResultList.find((m) => m.value == params).label; |
| | | let obj = this.insResultList.find((m) => m.value == params) |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).label; |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | return this.insResultList.find((m) => m.value == params).type; |
| | | let obj = this.insResultList.find((m) => m.value == params) |
| | | if (obj) { |
| | | return this.insResultList.find((m) => m.value == params).type; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | |
| | | } |
| | | }, |
| | | getUsers() { |
| | | selectUserCondition().then((res) => { |
| | | selectUserCondition({ type: 1 }).then((res) => { |
| | | if (res.code === 201) { |
| | | return; |
| | | } |