¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // æå¡åä¾åºåéè´ |
| | | export function procurementSuppliesList(query) { |
| | | return request({ |
| | | url: '/procurementSuppliesList/procurementSuppliesList', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @desc æ åç©è´¨æ¸
å |
| | | */ |
| | | export function getStandardSubstanceAll(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/getStandardSubstanceAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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> |
| | |
| | | <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> |
| | |
| | | </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, |
| | |
| | | <!--<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> |
| | |
| | | </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> |
| | |
| | | // import AddRecord from './components/AddRecord.vue'; |
| | | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import AddRecord from './component/AddRecord.vue'; |
| | | import { |
| | | getPageAcceptance, |
| | | updateAcceptanc, |
| | |
| | | } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | |
| | | limsTable, |
| | | AddRecord |
| | | }, |
| | | data() { |
| | | return { |