src/api/cnas/externalService/serviceAndSupplyPro/serviceAndSupplyPro.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,10 @@ import request from '@/utils/request' // æå¡åä¾åºåéè´ export function procurementSuppliesList(query) { return request({ url: '/procurementSuppliesList/procurementSuppliesList', method: 'get', params: query }) } src/api/cnas/process/demand/demand.js
@@ -6,55 +6,67 @@ import request from "@/utils/request"; // 姿忣éªå页æ¥è¯¢ export const getInspectionOrder = (params) => { return request({ url: "/inspectionOrder/pageInspectionOrder", method: "get", params: params }) export function pageInspectionOrder(query) { return request({ url: '/inspectionOrder/pageInspectionOrder', method: 'get', params: query }) } // å§æåæ¥è¯¢æå订å export function getInsOrderOnInspection(query) { return request({ url: '/inspectionOrder/getInsOrderOnInspection', method: 'get', params: query }) } // å§æåæ£éªæ°å¢ export function addInspectionOrder(query) { return request({ url: '/inspectionOrder/addInspectionOrder', method: 'post', data: query }) } // 姿忣éªä¿®æ¹ export function updateInspectionOrder(query) { return request({ url: '/inspectionOrder/updateInspectionOrder', method: 'post', data: query }) } // æ°å¢æ¶æ ¹æ®æåè®¢åæ¥è¯¢å§æå详æ export const getInspectionOrderByInsOderId = (params) => { return request({ url: "/inspectionOrder/getInspectionOrderByInsOderId", method: "get", params: params }) export function getInspectionOrderByInsOderId(query) { return request({ url: '/inspectionOrder/getInspectionOrderByInsOderId', method: 'get', params: query }) } // æ¥è¯¢å¯æ°å¢çæ£éªå export const getInsOrderOnInspection = (data) => { return request({ url: "/inspectionOrder/getInsOrderOnInspection", method: "post", data: data }) // å§æåæ£éªæ¥ç详æ export function getInspectionOrderOne(query) { return request({ url: '/inspectionOrder/getInspectionOrderOne', method: 'get', params: query }) } // æ¥çå§æå详æ export const getInspectionOrderOne = (params) => { return request({ url: "/inspectionOrder/getInspectionOrderOne", method: "get", params: params }) // 姿忣éªå é¤ export function delInspectionOrder(query) { return request({ url: '/inspectionOrder/delInspectionOrder', method: 'get', params: query }) } // æ°å¢æ£éªå export const addInspectionOrder = (data) => { return request({ url: "/inspectionOrder/addInspectionOrder", method: "post", data: data }) // 姿忣éªå é¤ export function exportInspectionOrder(query) { return request({ url: '/inspectionOrder/exportInspectionOrder', method: 'get', params: query, responseType: 'blob' }) } // ç¼è¾æ£éªå export const editInspectionOrder = (data) => { return request({ url: "/inspectionOrder/editInspectionOrder", method: "post", data: data }) } src/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept.js
@@ -24,6 +24,18 @@ }) } /** * @desc æ åç©è´¨æ¸ å */ export function getStandardSubstanceAll(query) { return request({ url: '/feStandardSubstance/getStandardSubstanceAll', method: 'get', params: query }) } src/views/CNAS/externalService/serviceAndSupplyPro/component/CardPanel.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,74 @@ <template> <div class="card-container" @click="handleCard"> <div class="card-panel" :class="[isActive == index ? 'isActive' : '']"> <el-image style="width: 80%; height: 140px" :src="javaApi + '/img/' + data.logo" fit="fill" /> </div> <div class="title"> {{ data.supplierRef }} </div> </div> </template> <script> export default { props: { data: { type: Object, default: () => {} }, index: { type: Number, default: -1 }, isActive: { type: Number, default: -1 } }, data(){ return { } }, mounted() { // console.log(1111,this.data) }, 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: 180px; 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; } </style> src/views/CNAS/externalService/serviceAndSupplyPro/component/ConsumableOverview.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,121 @@ <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-col :span="24" v-if="cardList.length==0" style="color: #909399;font-size: 14px;text-align: center;margin-top: 20px;">ææ æ°æ®</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="'20vh'" :column="columns" :table-data="tableData" > </limsTable> </template> </TableCard> </div> </template> <script> import CardPanel from './CardPanel.vue'; 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 }, props: { contentsId: { type: Number, default: 0 } }, data() { return { isActive: -1, columns: [ { label: "èæç¼å·", prop: "itemNumber" }, { label: "èæåç§°", prop: "consumablesName" }, { label: "èæç±»å", prop: "consumablesType" }, { label: "è§æ ¼", prop: "specifications" }, { label: "åä½", prop: "unit" }, { label: "åä»·", prop: "referencePrice" }, { label: "å½ååºå", prop: "currentAmount" }, { label: "è´è´£äºº", prop: "personInChargeName" }, { label: "䏿¬¡æ´æ°æ¶é´", prop: "updateTime" } ], cardList: [], tableData: [] } }, watch: { contentsId(newVal, oldVal) { this.getTableData(newVal) } }, mounted() { this.getTableData(this.contentsId) }, methods: { handleCard(data, index) { this.isActive = index this.tableData = [data] }, async getTableData(id) { procurementSuppliesList({contentsId: id}).then(res => { if(res.code == 200) { this.cardList = res.data.records.map(m=>{ m.logo = m.consumablesIcon return m }) } }) } } } </script> <style scoped> .card-box { width: 100%; padding-left: 5px; padding-right: 5px; height: 30vh; overflow-y: auto; } </style> src/views/CNAS/externalService/serviceAndSupplyPro/component/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,71 @@ <template> <div class="table_card"> <div v-if="showTitle" class="title"> <span style="font-weight: bold">{{ title }}</span> </div> <div> <slot name="tab"></slot> </div> <div v-if="showForm" class="table_card_form"> <slot name="form"></slot> </div> <div> <slot name="table"></slot> </div> </div> </template> <script> export default { props: { title: { type: String, default: 'æ é¢' }, showTitle: { type: Boolean, default: true }, showForm: { type: Boolean, default: true } }, data() { return {}; } }; </script> <style scoped> .table_card { text-align: left; } .title { position: relative; font-size: 18px; color: #333; font-weight: 400; padding-left: 10px; margin-left: 15px; } .title::before { position: absolute; left: 0; top: 4px; content: ''; width: 4px; height: 18px; background-color: #3A7BFA; border-radius: 2px; } .table_card_form { display: flex; justify-content: space-between; height: 34px; padding: 0 15px; margin-bottom: 10px; } </style> src/views/CNAS/externalService/serviceAndSupplyPro/index.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,178 @@ <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" :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"> <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-tabs> </div> </div> </template> <script> // import Contents from "@/components/do/a6.service-and-supply-purchase/contents.vue"; // import Store from "@/components/do/a6.service-and-supply-purchase/store.vue"; import ConsumableOverview from "../serviceAndSupplyPro/component/ConsumableOverview.vue"; // import ConsumableList from "@/components/do/a6.service-and-supply-purchase/ConsumableList.vue" export default { data() { return { tabsKey: 0, contentsId: 0, activeName: "first", form: { nodeName: "", }, treeData: [], expandedKeys: [], defaultProps: { children: "children", label: "nodeName", }, }; }, components: { // Contents, // Store, ConsumableOverview // ConsumableList }, watch: { contentsId(newVal, oldVal) { if(newVal != oldVal) { this.tabsKey = Math.random(); } } }, 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() { this.$axios .get(this.$api.procurementSuppliesContents.directoryListing) .then((res) => { this.treeData = res.data; }); }, // ç¹å»æ èç¹ handleNodeClick(data) { this.contentsId = data.id; }, handleClick(tab, event) { console.log(tab, event); }, }, created() { this.getTreeData(); }, }; </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%; } </style> src/views/CNAS/process/demand/AddContracts.vue
ÎļþÒÑɾ³ý src/views/CNAS/process/demand/Edit.vue
ÎļþÒÑɾ³ý src/views/CNAS/process/demand/index.vue
@@ -1,163 +1,737 @@ <style lang="scss" scoped> .standard_method { padding: 20px; } .search { background-color: #fff; height: 80px; display: flex; align-items: center; } .search_thing { // width: 350px; display: flex; align-items: center; } .search_label { width: 110px; font-size: 14px; text-align: right; } .search_input { width: calc(100% - 110px); } .table { margin-top: 10px; background-color: #fff; width: calc(100% - 40px); height: calc(100% - 60px - 80px - 10px - 40px); padding: 20px; } </style> <template> <div class="standard_method"> <el-form :model="model" :inline="true" label-width="auto"> <el-form-item label="è¯æ ·åç§°ï¼"> <el-input size="small" placeholder="请è¾å ¥" clearable @change="refreshTable()" /> </el-form-item> <el-form-item label="å§æåä½ï¼"> <el-input size="small" placeholder="请è¾å ¥" clearable @change="refreshTable()" /> </el-form-item> <el-form-item label="ç产åä½ï¼"> <el-input size="small" placeholder="请è¾å ¥" clearable @change="refreshTable()" /> </el-form-item> <el-form-item label="å§æäººï¼"> <el-input size="small" placeholder="请è¾å ¥" clearable @change="refreshTable()" /> </el-form-item> <el-form-item> <el-button size="small"> é ç½® </el-button> <el-button size="small" type="primary"> æ¥ è¯¢ </el-button> </el-form-item> </el-form> <div style="margin-bottom: 10px"> <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog('add')"> æ° å¢ </el-button> </div> <lims-table :column="column" :tableData="tableData" :height="'calc(100vh - 250px)'" :page="page" /> <Edit ref="editRef" /> <div class="app-container"> <div style="display: flex;justify-content: space-between;"> <el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true"> <el-form-item label="è¯æ ·åç§°" prop="sampleName"> <el-input size="small" placeholder="请è¾å ¥" clearable v-model="entitySearch.sampleName" @keyup.enter.native="refreshTable"></el-input> </el-form-item> <el-form-item label="å§æåä½" prop="commissionUnit"> <el-input v-model="entitySearch.commissionUnit" clearable placeholder="请è¾å ¥" size="small" @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="ç产åä½" prop="production"> <el-input v-model="entitySearch.production" clearable placeholder="请è¾å ¥" size="small" @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item label="å§æäºº" prop="commissionUser"> <el-input v-model="entitySearch.commissionUser" clearable placeholder="请è¾å ¥" size="small" @keyup.enter.native="refreshTable()"></el-input> </el-form-item> <el-form-item> <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">æ¥ è¯¢</el-button> </el-form-item> </el-form> </div> <div style="text-align: right; margin-bottom: 20px"> <el-button size="medium" type="primary" @click="goAdd">æ°å¢</el-button> </div> <div class="table"> <el-table v-loading="tableListLoading" :data="tableList" height="530" style="width: 100%"> <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> <el-table-column label="è¯æ ·åç§°" prop="sampleName" show-overflow-tooltip width="120"></el-table-column> <el-table-column label="å§æç¼å·" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column> <el-table-column label="å§ææ¶é´" prop="commissionDate" width="120"></el-table-column> <el-table-column label="åå·" prop="modelNo"></el-table-column> <el-table-column label="å§æåä½" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column> <el-table-column label="ç产åä½" prop="production" show-overflow-tooltip width="120"></el-table-column> <el-table-column label="å§æäºº" prop="commissionUser"></el-table-column> <el-table-column label="æ ·åæ°é" prop="quantity"></el-table-column> <el-table-column label="æ ·åç¶æ" prop="sampleStatus"></el-table-column> <el-table-column label="æ¯å¦çæ ·" prop="isLeave"> <template slot-scope="scope"> <span v-if="scope.row.isLeave === 1">æ¯</span> <span v-if="scope.row.isLeave === 0">å¦</span> </template> </el-table-column> <el-table-column label="æ ·åå¤çæ¹å¼" prop="processing"> <template slot-scope="scope"> <span v-if="scope.row.processing === 1">å®éªå®¤å¤ç</span> <span v-if="scope.row.processing === 0">å§æåä½åå</span> </template> </el-table-column> <el-table-column align="center" label="æä½" width="240" fixed="right"> <template slot-scope="scope"> <el-button size="mini" type="text" @click="goUpdate(scope.row)">ç¼è¾</el-button> <el-button size="mini" type="text" @click="handleLook(scope.row)">æ¥ç</el-button> <el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">å é¤</el-button> <el-button size="mini" type="text" @click="openDownloadDia(scope.row)">ä¸è½½</el-button> <el-upload ref='upload' :action="action" :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader" :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' name="file" style="background: transparent;display: inline;margin-left: 4px"> <span style="color: #409EFF">ä¸ä¼ </span> </el-upload> </template> </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total1" layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> </el-pagination> </div> <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="orderRowsVisible" title="æ°å¢æ£éªä»»å¡å" width="1000px"> <div style="display: flex; align-items: center;margin-bottom: 10px"> <span style="width: 80px">å§æç¼å·ï¼</span> <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input> <el-button size="small" type="primary" @click="searchTableData">æ¥è¯¢</el-button> <el-button size="small" @click="refreshTableData">é ç½®</el-button> </div> <el-table v-loading="tableLoading" :data="tableData" height="550" style="width: 100%"> <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> <el-table-column label="å§æç¼å·" prop="entrustCode"></el-table-column> <el-table-column label="æ ·ååç§°" prop="sample"></el-table-column> <el-table-column align="center" label="æä½"> <template slot-scope="scope"> <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">æ°å¢å§æå</el-button> </template> </el-table-column> </el-table> <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" :total="total" layout="->,total, sizes, prev, pager, next" style="margin-top: 10px" background @size-change="handleSizeChange" @current-change="handleCurrentChange"> </el-pagination> </el-dialog> <el-dialog :class="{downPdf:title=='ä¸è½½'}" :close-on-click-modal="false" :close-on-press-escape="false" :modal="title!='ä¸è½½'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px"> <div style="max-height: 75vh;overflow-y: auto;"> <div id="dialogBody"> <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;"> <tr> <td rowspan="2"> <img alt="" src="@/assets/logo/ZTTlogo.png" style="width: 80%;"> </td> <td> <p>è®°å½åç§°ï¼æ£éªå§æå</p> </td> <td> <p>ä¿åæéï¼6å¹´</p> </td> </tr> <tr> <td> <p>è®°å½ç¼å·ï¼ ZTT/QR-16-04-a</p> </td> <td> <p>彿¡£é¨é¨ï¼ç»¼å室</p> </td> </tr> </table> <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> <span style="font-size: 28px;">æ£ éª å§ æ å</span> </h4> <p v-if="operationType !== 'view'" style="margin-left: 560px;display: flex;align-items: center"> <span style="width: 100px">å§æç¼å·ï¼</span> <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input> </p> <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">å§æç¼å·ï¼{{ currentInfo.entrustCode }}</p> <table border="1" cellpadding="10" class="tables"> <tr> <td colspan="2"> <p>è¯æ ·åç§°</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td> <td> <p>å§ææ¶é´</p> </td> <td v-if="operationType !== 'view'"> <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> </tr> <tr> <td colspan="2"> <p>å å·</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td> <td> <p>å§æåä½</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td> </tr> <tr> <td colspan="2"> <p>ç产åä½</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.production }}</td> <td> <p>å§æäºº</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td> </tr> <tr> <td colspan="2"> <p>æ ·åæ°é</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td> <td> <p>æ ·åç¶æ</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td> </tr> <tr> <td colspan="2"> <p>æ¯å¦çæ ·</p> </td> <td v-if="operationType !== 'view'"> <el-radio-group v-model="currentInfo.isLeave" v-removeAriaHidden> <el-radio :label="1">æ¯</el-radio> <el-radio :label="0">å¦</el-radio> </el-radio-group> </td> <td v-if="operationType === 'view'"> <span v-if="currentInfo.isLeave==1">æ¯</span> <span v-else>å¦</span> </td> <td> <p>æ ·åå¤çæ¹å¼</p> </td> <td v-if="operationType !== 'view'"> <el-radio-group v-model="currentInfo.processing" v-removeAriaHidden> <el-radio :label="0">å§æåä½åå</el-radio> <el-radio :label="1">å®éªå®¤å¤ç</el-radio> </el-radio-group> </td> <td v-if="operationType === 'view'"> <span v-if="currentInfo.processing==0">å§æåä½åå</span> <span v-else>å®éªå®¤å¤ç</span> </td> </tr> <tr> <td colspan="2"> <p>约å®å®ææ¶é´(æ¥åæ¥æ)</p> </td> <td v-if="operationType !== 'view'"> <el-date-picker v-model="currentInfo.appointed" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td> <td> <p>æ¥ååéæ¹å¼</p> </td> <td v-if="operationType !== 'view'"> <el-radio-group v-model="currentInfo.send" v-removeAriaHidden> <el-radio :label="1">èªå</el-radio> <el-radio :label="0">å ¶ä»</el-radio> </el-radio-group> </td> <td v-if="operationType === 'view'"> <span v-if="currentInfo.send==1">èªå</span> <span v-else>å ¶ä»</span> </td> </tr> <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">æ·»å </el-button> <tr> <td> <p>åºå·</p> </td> <td> <p>æ ·åç¼å·</p> </td> <td> <p>è¯éªé¡¹ç®</p> </td> <td> <p>æ£éªä¾æ®</p> </td> <td> <p>夿³¨</p> </td> </tr> <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" > <td>{{ index+1 }}</td> <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td> <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ item.testItem }}</td> <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ item.testStandard }}</td> <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ item.remark }}</td> </tr> <tr> <td colspan="2"> <p>å¤å®è§å</p> </td> <td v-if="operationType !== 'view'" colspan="3"> <el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden> <el-radio :label="0">ä¸èèä¸ç¡®å®åº¦</el-radio> <el-radio :label="1">èèä¸ç¡®å®åº¦</el-radio> </el-radio-group> <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span> </td> <td v-if="operationType === 'view'" colspan="3"> <span v-if="currentInfo.criterionRule===0">ä¸èèä¸ç¡®å®åº¦</span> <span v-if="currentInfo.criterionRule===1">èèä¸ç¡®å®åº¦</span> <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span> </td> </tr> <tr> <td colspan="2"> <p>å§æäººç¾å</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> <td v-if="operationType === 'view'"> {{currentInfo.commissionUser}} </td> <td> <p>å§ææ¥æ</p> </td> <td v-if="operationType !== 'view'"> <el-date-picker v-model="currentInfo.commissionDate" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> </tr> <tr> <td colspan="2"> <p>å§æäººèç³»çµè¯</p> </td> <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td> <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td> </tr> <tr> <td colspan="2"> <p>综å室ç¾å</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td> <td> <p>æ¥æ¶æ¥æ</p> </td> <td v-if="operationType !== 'view'"> <el-date-picker v-model="currentInfo.receiptData" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td> </tr> <tr> <td colspan="2"> <p>颿 ·åç¾å</p> </td> <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td> <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td> <td> <p>颿 ·æ¥æ</p> </td> <td v-if="operationType !== 'view'"> <el-date-picker v-model="currentInfo.sampleData" clearable format="yyyy-MM-dd" placeholder="éæ©æ¥æ" size="small" style="width: 100%" type="date" value-format="yyyy-MM-dd"> </el-date-picker> </td> <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td> </tr> <tr> <td colspan="2" rowspan="3"> <p>æ£æµæºæä¿¡æ¯</p> </td> <td colspan="3"> <p>æ±èä¸å¤©ç§æè¡ä»½æéå ¬å¸æ£æµä¸å¿</p> </td> </tr> <tr> <td colspan="3"> <p>å°åï¼æ±èçåéå¸ç»æµææ¯å¼ååºæ°å¼åè·¯ 19 å·</p> </td> </tr> <tr> <td colspan="3"> <p>çµè¯ï¼0513-89059043</p> </td> </tr> </table> <p style="margin-top: 10px;margin-left: 20px;">æ³¨ï¼æ¬æ£éªå§æåä¸å¼äºä»½ï¼ä¸ä»½ç»¼å室彿¡£ï¼ä¸ä»½å§æåä½çåã</p> </div> </div> <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> <el-button @click="detailDialogVisible = false">å æ¶</el-button> <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">ç¡® å®</el-button> </span> </el-dialog> <el-dialog :visible.sync="downloadDialog" title="ä¸è½½" width="600px"> <span> <el-button :loading="outLoading" plain type="primary" @click="orderReportDown">ä¸è½½å§æå</el-button> <el-button :loading="outLoading" plain type="primary" @click="orderFormDown">ä¸è½½å§ææ¥å</el-button> </span> <span slot="footer" class="dialog-footer"> <el-button @click="downloadDialog = false">å æ¶</el-button> </span> </el-dialog> </div> </template> <script> import { addInspectionOrder, delInspectionOrder, exportInspectionOrder, getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne, pageInspectionOrder, updateInspectionOrder } from "@/api/cnas/process/demand/demand"; import limsTable from "@/components/Table/lims-table.vue"; import Edit from './Edit.vue' import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js" import {selectUserCondition} from "@/api/business/inspectionTask"; export default { name: 'Demand', components: { limsTable, Edit }, data() { return { queryParams: { code: '' }, model: {}, column: [ { label: 'åºå·', minWidth: '100px' }, { label: 'è¯æ ·åç§°', minWidth: '100px' }, { label: 'å§æç¼å·' }, { label: 'å§ææ¶é´' }, { label: 'åå·' }, { label: 'å§æåä½' }, { label: 'ç产åä½' }, { label: 'å§æäºº' }, { label: 'æ ·åæ°é' }, { label: 'æ ·åç¶æ' }, { label: 'æ¯å¦çæ ·' }, { label: 'æ ·åå¤çæ¹å¼' }, { dataType: "action", fixed: "right", label: "æä½", operation: [ { name: "ç¼ è¾", type: "text", clickFun: (row) => { this.$refs.editRef.openAddContracts(row) } } ], }, ], tableData: [], // è¡¨æ ¼æ°æ® page: { total: 0, size: 10, current: 1, }, } }, mounted() { this.refreshTable() }, methods: { /** * @desc å·æ°è¡¨æ ¼ */ async refreshTable() { await getInspectionOrder({ ...this.page }) name: "a7-Inspection-Order-Form", components: {limsTable}, data() { return { title:'æ£éªå§æå', detailDialogVisible:false, addLoading:false, outLoading:false, currentInfo:{ orderDetailList: [] }, personList:[], insStateList:[ { label: 'å¾ å®¡æ ¸', value: 0 }, { label: 'å¾ æ£éª', value: 1 }, /** * @desc æå¼æ¨¡ææ¡ */ openDialog(type) { this.$refs.editRef.open(type) } { label: 'å·²æ£éª', value: 4 }, { label: 'éå', value: 2 }, { label: 'æ¤é', value: 3 }, ], operationType: '', orderRowsVisible: false, tableList: [], tableListLoading: false, pages: { current: 1, size: 20, }, tableData: [], tableLoading: false, tableSearch: { current: 1, size: 20, }, total: 0, total1: 0, entity: { entrustCode: '' }, entitySearch: { sampleName: '', commissionUnit: '', production: '', commissionUser: '', }, buttonLoading: false, downloadDialog: false, download: {}, }; }, mounted() { // this.getPower() this.getAuthorizedPerson() this.refreshTable() }, computed: { action() { return this.javaApi + '/inspectionOrder/uploadInspectionOrderFile' } }, methods: { addOrderDetailList () { if (this.currentInfo.orderDetailList == null) { this.currentInfo.orderDetailList = [] } this.currentInfo.orderDetailList.push({ sampleNumber: '', testItem: '', testStandard: '', standardMethodList: '', remark: '', }) }, // æ¥è¯¢å表 refreshTable() { this.tableListLoading = true pageInspectionOrder({ ...this.pages, ...this.entitySearch }).then(res => { this.tableListLoading = false this.tableList = res.data.records this.total1 = res.data.total }).catch(err => { this.tableListLoading = false }) }, // éç½® refresh() { this.entitySearch = { sampleName: '', commissionUnit: '', production: '', commissionUser: '', } this.pages = { current: 1, size: 20, } this.refreshTable() }, // æå¼æ°å¢å¼¹æ¡ goAdd () { this.operationType = 'add' this.title = 'æ°å¢æ£éªå§æå'; this.orderRowsVisible = true this.searchTableData() }, // æ¥è¯¢å¯æ°å¢çæ£éªå searchTableData () { this.tableLoading = true getInsOrderOnInspection({ ...this.tableSearch, ...this.entity }).then(res => { this.tableLoading = false this.tableData = res.data.records this.total = res.data.total }).catch(err => { this.tableLoading = false }) }, // éç½®æ£éªåå表 refreshTableData () { this.entity = { entrustCode: '' } this.tableSearch = { current: 1, size: 20, } this.searchTableData() }, // æ£éªåå表å页 handleSizeChange(val) { this.tableSearch.size = val this.searchTableData(); }, handleCurrentChange(val) { this.tableSearch.current = val this.searchTableData(); }, // å表å页 handleSizeChange1(val) { this.pages.size = val this.refreshTable(); }, handleCurrentChange1(val) { this.pages.current = val this.refreshTable(); }, // æäº¤æ°å¢ handleAdd () { this.buttonLoading = true addInspectionOrder(this.currentInfo).then(res => { this.buttonLoading = false this.$message.success('æ°å¢æå') this.detailDialogVisible = false this.orderRowsVisible = false this.refreshTable() }).catch(err => { this.buttonLoading = false }) }, // æäº¤ä¿®æ¹ handleEdit () { this.buttonLoading = true updateInspectionOrder(this.currentInfo).then(res => { this.buttonLoading = false if (res.code === 201) return this.$message.success('æ°å¢æå') this.detailDialogVisible = false this.orderRowsVisible = false this.refreshTable() }).catch(err => { this.buttonLoading = false }) }, // æ¥è¯¢éè¦æ°å¢çå§æå详æ goAddOrder (row) { getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => { this.currentInfo = res.data this.title = 'æ°å¢æ£éªå§æå'; this.detailDialogVisible = true }).catch(err => { console.log('err----', err) }) }, // æå¼ç¼è¾å¼¹æ¡ goUpdate (row) { this.operationType = 'edit' getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { this.currentInfo = res.data this.title = 'ç¼è¾æ£éªå§æå'; this.detailDialogVisible = true }).catch(err => { console.log('err----', err) }) }, // æ¥ç handleLook(row){ this.operationType = 'view' getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { this.currentInfo = res.data this.title = 'æ¥çæ£éªå§æå'; this.detailDialogVisible = true }).catch(err => { console.log('err----', err) }) }, // å é¤ deleteOrder (row) { this.$confirm('æ¤æä½å°æ°¸ä¹ å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { confirmButtonText: 'ç¡®å®', cancelButtonText: 'åæ¶', type: 'warning' }).then(() => { delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => { this.$message.success('å 餿åï¼'); this.refreshTable(); }); }).catch(() => { this.$message({ type: 'info', message: '已忶å é¤' }); }); }, // æå¼ä¸è½½å¼¹æ¡ openDownloadDia (row) { this.downloadDialog = true this.download = row }, // å§æåä¸è½½ orderFormDown () { let url = this.download.fileUrl; const link = document.createElement('a'); link.href = this.javaApi + url; link.target = '_blank'; document.body.appendChild(link); link.click(); }, // å§ææ¥åä¸è½½ orderReportDown () { this.outLoading = true; exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => { this.outLoading = false; const blob = new Blob([res], { type: 'application/octet-stream' }); this.$download.saveAs(blob, 'æ£éªå§æå.docx') this.$message.success('å¯¼åºæå'); }).catch(err => { this.outLoading = false; }) }, // ä¸ä¼ handleSuccessUp(response, ) { if (response.code == 200) { this.$message.success('ä¸ä¼ æå'); this.refreshTable() } }, beforeUpload(file) { if (file.size > 1024 * 1024 * 10) { this.$message.error('ä¸ä¼ æä»¶ä¸è¶ è¿10M'); this.$refs.upload.clearFiles() return false; } else { return true; } }, onError(err, file, fileList) { this.$message.error('ä¸ä¼ 失败') this.$refs.upload.clearFiles() }, // 人åå表 getAuthorizedPerson() { selectUserCondition().then(res => { let data = [] res.data.forEach(a => { data.push({ label: a.name, value: a.id }) }) this.personList = data }) }, }, } </script> </script> <style scoped> </style> src/views/CNAS/resourceDemand/standardMaterialAccept/component/AddRecord.vue
@@ -1,12 +1,12 @@ <template> <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="70%"> <!-- <el-steps :active="currentStep" finish-status="success"> <el-steps :active="currentStep" finish-status="success"> <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item"> </el-step> </el-steps> --> <!-- <el-form :model="model" label-width="140px" size="small">--> <!-- <Step1 :model.sync="model"></Step1>--> <!-- </el-form>--> </el-steps> <el-form :model="model" label-width="140px" size="small"> <Step1 :model.sync="model"></Step1> </el-form> <span slot="footer" class="dialog-footer"> <el-button @click="dialogVisible = false">å æ¶</el-button> <el-button type="primary" @click="submit">ä¿ å</el-button> @@ -15,16 +15,16 @@ </template> <script> // import Step1 from './Step/Step1.vue' import Step1 from './Step1.vue' export default { components: { // Step1 Step1 }, data() { return { dialogVisible: false, currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ // steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£ éªæ¶æ£æ¥', 'å®è£ éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£ éªæ¶æ£æ¥', 'å®è£ éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], model: { acceptance: { id: undefined, src/views/CNAS/resourceDemand/standardMaterialAccept/component/Step1.vue
@@ -1,201 +1,198 @@ <!--<template>--> <!-- <el-card class="card">--> <!-- <el-col :span="12">--> <!-- <el-form-item label="å家代表">--> <!-- <el-input v-model="model.acceptance.producer"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="ç¸å ³éä»¶">--> <!-- <div class="table-between">--> <!-- <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input>--> <!-- <el-upload--> <!-- ref="upload"--> <!-- style="float: left; margin: 0 12px 0 20px;"--> <!-- :action="action"--> <!-- :show-file-list="false"--> <!-- :on-success="onSuccess"--> <!-- >--> <!-- <el-button type="primary">--> <!-- éä»¶ä¸ä¼ --> <!-- </el-button>--> <!-- </el-upload>--> <!-- </div>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="æ¥æ¶äºº">--> <!-- <el-input v-model="model.acceptance.recipient"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="æ¥åç¾å">--> <!-- <el-input v-model="model.acceptance.signature"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="éªæ¶æ åµ">--> <!-- <el-input v-model="model.acceptance.situation"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="å®è£ è°è¯æ åµ">--> <!-- <el-input v-model="model.acceptance.installation"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="æ¸ å" prop="substanceId" required>--> <!-- <el-select v-model="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>--> <!-- </el-select>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="å°è´§æ¥æ">--> <!-- <el-date-picker--> <!-- v-model="model.acceptance.arriveDate"--> <!-- align="right"--> <!-- type="date"--> <!-- placeholder="éæ©æ¥æ"--> <!-- style="width: 100%"--> <!-- value-format="yyyy-MM-dd"--> <!-- >--> <!-- </el-date-picker>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="12">--> <!-- <el-form-item label="ç»´ä¿®åä½">--> <!-- <el-input v-model="model.acceptance.maintenanceUnit"></el-input>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="24">--> <!-- <el-form-item label="å¤ä»¶ç¡®è®¤">--> <!-- <el-button type="primary" style="float: right;" @click="addSpareTable">å¢å è¡</el-button>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- <el-col :span="24">--> <!-- <el-form-item>--> <!-- <ZTTable--> <!-- style="margin-bottom: 20px;"--> <!-- :column="spareColumns"--> <!-- :table-data="model.list"--> <!-- >--> <!-- <template slot="name" slot-scope="{ row, index }">--> <!-- <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>--> <!-- <span v-else>{{ row.name }}</span>--> <!-- </template>--> <!-- <template slot="number" slot-scope="{ row, index }">--> <!-- <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>--> <!-- <span v-else>{{ row.number }}</span>--> <!-- </template>--> <!-- <template slot="action" slot-scope="{ row, index }">--> <!-- <div v-if="row.isEdit">--> <!-- <el-button type="text" @click="save(index)">ä¿å</el-button>--> <!-- <el-button type="text">åæ¶</el-button>--> <!-- </div>--> <!-- <div v-else>--> <!-- <el-button type="text" @click="edit(index)">ä¿®æ¹</el-button>--> <!-- </div>--> <!-- </template>--> <!-- </ZTTable>--> <!-- </el-form-item>--> <!-- </el-col>--> <!-- </el-card>--> <!--</template>--> <template> <el-card class="card"> <el-col :span="12"> <el-form-item label="å家代表"> <el-input v-model="model.acceptance.producer"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="ç¸å ³éä»¶"> <div class="table-between"> <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input> <el-upload ref="upload" style="float: left; margin: 0 12px 0 20px;" :action="action" :show-file-list="false" :on-success="onSuccess" > <el-button type="primary"> éä»¶ä¸ä¼ </el-button> </el-upload> </div> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="æ¥æ¶äºº"> <el-input v-model="model.acceptance.recipient"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="æ¥åç¾å"> <el-input v-model="model.acceptance.signature"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="éªæ¶æ åµ"> <el-input v-model="model.acceptance.situation"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="å®è£ è°è¯æ åµ"> <el-input v-model="model.acceptance.installation"></el-input> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="æ¸ å" prop="substanceId" required> <el-select v-model="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> </el-select> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="å°è´§æ¥æ"> <el-date-picker v-model="model.acceptance.arriveDate" align="right" type="date" placeholder="éæ©æ¥æ" style="width: 100%" value-format="yyyy-MM-dd" > </el-date-picker> </el-form-item> </el-col> <el-col :span="12"> <el-form-item label="ç»´ä¿®åä½"> <el-input v-model="model.acceptance.maintenanceUnit"></el-input> </el-form-item> </el-col> <el-col :span="24"> <el-form-item label="å¤ä»¶ç¡®è®¤"> <el-button type="primary" style="float: right;" @click="addSpareTable">å¢å è¡</el-button> </el-form-item> </el-col> <el-col :span="24"> <el-form-item> <lims-table :tableData="model.list" :column="spareColumns" :height="'calc(100vh - 250px)'"> <template slot="name" slot-scope="{ row, index }"> <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input> <span v-else>{{ row.name }}</span> </template> <template slot="number" slot-scope="{ row, index }"> <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input> <span v-else>{{ row.number }}</span> </template> <template slot="action" slot-scope="{ row, index }"> <div v-if="row.isEdit"> <el-button type="text" @click="save(index)">ä¿å</el-button> <el-button type="text">åæ¶</el-button> </div> <div v-else> <el-button type="text" @click="edit(index)">ä¿®æ¹</el-button> </div> </template> </lims-table> </el-form-item> </el-col> </el-card> </template> <!--<script>--> <!--import ZTTable from '@/components/caorui/ZTTable/index.vue';--> <!--import { getStandardSubstanceAll } from "@/assets/api/api";--> <!--import axios from 'axios';--> <script> // import { getStandardSubstanceAll } from "@/assets/api/api"; import axios from 'axios'; import limsTable from '@/components/Table/lims-table.vue' import { getStandardSubstanceAll } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' <!--export default {--> <!-- components: {--> <!-- ZTTable--> <!-- },--> <!-- props: {--> <!-- model: {--> <!-- type: Object,--> <!-- default: () => {}--> <!-- }--> <!-- },--> <!-- data() {--> <!-- return {--> <!-- spareColumns: [--> <!-- {--> <!-- label: "åç§°",--> <!-- prop: "name",--> <!-- align: "center",--> <!-- dataType: "slot",--> <!-- slot: "name",--> <!-- }, {--> <!-- label: "æ°é",--> <!-- prop: "number",--> <!-- align: "center",--> <!-- dataType: "slot",--> <!-- slot: "number",--> <!-- }, {--> <!-- label: "æä½",--> <!-- align: "center",--> <!-- dataType: "slot",--> <!-- slot: "action",--> <!-- width: 150--> <!-- }--> <!-- ],--> <!-- options: []--> <!-- }--> <!-- },--> <!-- computed: {--> <!-- action() {--> <!-- return `${this.javaApi}/${this.$api.personnel.saveCNASFile}`--> <!-- }--> <!-- },--> <!-- mounted() {--> <!-- this.getStand()--> <!-- },--> <!-- methods: {--> <!-- async getStand() {--> <!-- const { code, data } = await axios({--> <!-- url: getStandardSubstanceAll,--> <!-- method: 'get'--> <!-- })--> <!-- this.options = data--> <!-- },--> <!-- addSpareTable() {--> <!-- this.model.list.push({--> <!-- acceptanceId: this.model.acceptance.id,--> <!-- name: '',--> <!-- number: '',--> <!-- isEdit: true--> <!-- })--> <!-- },--> <!-- onSuccess(response) {--> <!-- this.model.acceptance.file = response.data--> <!-- this.$emit('update:model', this.model)--> <!-- },--> <!-- save(index) {--> <!-- this.model.list[index].isEdit = false--> <!-- this.$emit('update:model', this.model)--> <!-- },--> <!-- edit(index) {--> <!-- this.model.list[index].isEdit = true--> <!-- }--> <!-- }--> <!--}--> <!--</script>--> export default { components: { limsTable }, props: { model: { type: Object, default: () => {} } }, data() { return { spareColumns: [ { label: "åç§°", prop: "name", align: "center", dataType: "slot", slot: "name", }, { label: "æ°é", prop: "number", align: "center", dataType: "slot", slot: "number", }, { label: "æä½", align: "center", dataType: "slot", slot: "action", width: 150 } ], options: [] } }, computed: { action() { return `${this.javaApi}/personBasicInfo/saveCNASFile` } }, mounted() { this.getStand() }, methods: { async getStand() { getStandardSubstanceAll().then(res => { this.options = res.data }) }, addSpareTable() { this.model.list.push({ acceptanceId: this.model.acceptance.id, name: '', number: '', isEdit: true }) }, onSuccess(response) { this.model.acceptance.file = response.data this.$emit('update:model', this.model) }, save(index) { this.model.list[index].isEdit = false this.$emit('update:model', this.model) }, edit(index) { this.model.list[index].isEdit = true } } } </script> <!--<style scoped>--> <!--.card {--> <!-- margin-top: 1em;--> <!-- height: 56vh;--> <!-- overflow-y: scroll;--> <!--}--> <!--.table-between {--> <!-- display: flex;--> <!-- justify-content: space-between;--> <!--}--> <!--</style>--> <style scoped> .card { margin-top: 1em; height: 56vh; overflow-y: scroll; } .table-between { display: flex; justify-content: space-between; } </style> src/views/CNAS/resourceDemand/standardMaterialAccept/index.vue
@@ -23,30 +23,6 @@ </div> <AddRecord ref="addRecordRef" @submit="submit"></AddRecord> </div> <!-- <div class="tables">--> <!-- <ZTTable--> <!-- :column="columns"--> <!-- :table-data="tableData"--> <!-- >--> <!-- <template slot="action" slot-scope="{ row }">--> <!-- <el-button type="text" @click="edit(row)">ç¼è¾</el-button>--> <!-- </template>--> <!-- </ZTTable>--> <!-- <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>--> <!-- </div>--> <!-- <AddRecord ref="addRecordRef" @submit="submit"></AddRecord>--> </template> <script> @@ -56,6 +32,7 @@ // import AddRecord from './components/AddRecord.vue'; import limsTable from '@/components/Table/lims-table.vue' import AddRecord from './component/AddRecord.vue'; import { getPageAcceptance, updateAcceptanc, @@ -63,8 +40,8 @@ } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' export default { components: { limsTable limsTable, AddRecord }, data() { return {