| | |
| | | // 6.2 人å |
| | | const personnel = { |
| | | selectCNSAPersonTree: '/personBasicInfo/selectCNSAPersonTree', // æ¥è¯¢CNAS人åä¾§è¾¹æ |
| | | saveCNASFile: '/personBasicInfo/saveCNASFile', // å
Œ
±æä»¶ä¿åæ¥å£ |
| | | } |
| | | |
| | | // 8.3 å®¢æ·æ»¡æåº¦è°æ¥ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="70%"> |
| | | <!-- <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> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import Step1 from './Step/Step1.vue' |
| | | export default { |
| | | components: { |
| | | Step1 |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | // steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | model: { |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | | file: undefined, // ç¸å
³éä»¶ |
| | | recipient: undefined, // æ¥æ¶äºº |
| | | signature: undefined, // æ¥åç¾å |
| | | situation: undefined, // éªæ¶æ
åµ |
| | | installation: undefined, // å®è£
è°è¯æ
åµ |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | }, |
| | | list: [] |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | model(newVal) { |
| | | this.model = newVal |
| | | } |
| | | }, |
| | | methods: { |
| | | clearForm() { |
| | | this.model.acceptance.id = undefined |
| | | this.model.acceptance.producer = undefined |
| | | this.model.acceptance.file = undefined |
| | | this.model.acceptance.recipient = undefined |
| | | this.model.acceptance.signature = undefined |
| | | this.model.acceptance.situation = undefined |
| | | this.model.acceptance.installation = undefined |
| | | this.model.acceptance.substanceId = undefined |
| | | this.model.acceptance.arriveDate = undefined |
| | | this.model.acceptance.maintenanceUnit = undefined |
| | | this.model.list = [] |
| | | }, |
| | | openDialog(form) { |
| | | console.log(form) |
| | | if(form) { |
| | | this.model.acceptance.id = form.acceptance.id |
| | | this.model.acceptance.producer = form.acceptance.producer |
| | | this.model.acceptance.file = form.acceptance.file |
| | | this.model.acceptance.recipient = form.acceptance.recipient |
| | | this.model.acceptance.signature = form.acceptance.signature |
| | | this.model.acceptance.situation = form.acceptance.situation |
| | | this.model.acceptance.installation = form.acceptance.installation |
| | | this.model.acceptance.substanceId = form.acceptance.substanceId |
| | | this.model.acceptance.arriveDate = form.acceptance.arriveDate |
| | | this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit |
| | | this.model.list = form.list |
| | | } else { |
| | | this.clearForm() |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | submit() { |
| | | this.$emit('submit', this.model) |
| | | this.closeDialog() |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="æ¸
å"> |
| | | <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> |
| | | |
| | | <script> |
| | | import ZTTable from '@/components/caorui/ZTTable/index.vue'; |
| | | import { getStandardSubstanceAll } from "@/assets/api/api"; |
| | | import axios from 'axios'; |
| | | |
| | | 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> |
| | | |
| | | <style scoped> |
| | | .card { |
| | | margin-top: 1em; |
| | | height: 56vh; |
| | | overflow-y: scroll; |
| | | } |
| | | .table-between { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="view-title"> |
| | | <span>æ åç©è´¨éªæ¶</span> |
| | | </div> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="form" size="small"> |
| | | <el-form-item label="ç©è´¨åç§°"> |
| | | <el-input v-model="form.search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="reset">é ç½®</el-button> |
| | | <el-button type="primary" @click="getTableData">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button type="primary" icon="el-icon-plus" size="small" @click="openDialog"> |
| | | æ·»å éªæ¶ |
| | | </el-button> |
| | | <el-button type="primary" size="small" @click="exportExcel">导åº</el-button> |
| | | </div> |
| | | </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-sizes="[10, 20, 30, 40]" |
| | | :page-size="pagination.pageSize" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="pagination.total" |
| | | @current-change="handleCurrent" |
| | | @size-change="handleSize" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <AddRecord ref="addRecordRef" @submit="submit"></AddRecord> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import axios from "axios"; |
| | | import { getPageAcceptance, addAcceptance, updateAcceptance, getAcceptanceDetails, exportAcceptance } from "@/assets/api/api"; |
| | | import ZTTable from '@/components/caorui/ZTTable/index.vue'; |
| | | import AddRecord from './components/AddRecord.vue'; |
| | | |
| | | export default { |
| | | components: { |
| | | ZTTable, AddRecord |
| | | }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | search: undefined |
| | | }, |
| | | columns: [ |
| | | { |
| | | label: "åºåºç¼å·", |
| | | prop: "factoryNum" |
| | | }, |
| | | { |
| | | label: "æææ", |
| | | prop: "effectiveDate" |
| | | }, |
| | | { |
| | | label: "ç产åå®¶", |
| | | prop: "factoryManufacturer" |
| | | }, |
| | | { |
| | | label: "ææ¡£ç¼å·", |
| | | prop: "fileNum" |
| | | }, |
| | | { |
| | | label: "æ åç©è´¨åç§°", |
| | | prop: "name" |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "model" |
| | | }, |
| | | { |
| | | label: "管çç¼å·", |
| | | prop: "manageNum" |
| | | }, |
| | | { |
| | | label: "åæ¾ä½ç½®", |
| | | prop: "position" |
| | | }, |
| | | // { |
| | | // label: "åºåå·", |
| | | // prop: "manageNum" |
| | | // }, |
| | | { |
| | | label: "æäº¤æ¥æ", |
| | | prop: "acquisitionDate" |
| | | }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "quantity" |
| | | }, |
| | | { |
| | | fixed: "right", |
| | | label: "æä½", |
| | | align: "center", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | pagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | async getTableData() { |
| | | const { code, data } = await axios({ |
| | | method: 'get', |
| | | url: getPageAcceptance, |
| | | params: { |
| | | name: this.form.search |
| | | } |
| | | }) |
| | | if(code == 200) { |
| | | this.tableData = data.records; |
| | | } |
| | | }, |
| | | handleCurrent(val) { |
| | | this.pagination.current = val; |
| | | this.getTableData() |
| | | }, |
| | | handleSize(size) { |
| | | this.pagination.pageSize = size; |
| | | this.getTableData() |
| | | }, |
| | | openDialog() { |
| | | this.$refs.addRecordRef.openDialog() |
| | | }, |
| | | async submit(form) { |
| | | const {code} = await axios({ |
| | | method: 'post', |
| | | url: form.acceptance.id ? updateAcceptance:addAcceptance, |
| | | data: form, |
| | | noQs: true |
| | | }) |
| | | if(code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾':'æ·»å '}æå`) |
| | | this.getTableData() |
| | | } |
| | | }, |
| | | async edit(row) { |
| | | const res = await this.getDetail(row.id) |
| | | this.$refs.addRecordRef.openDialog({ |
| | | acceptance: res.acceptance, |
| | | list: res.list |
| | | }) |
| | | }, |
| | | async getDetail(id) { |
| | | const { code, data } = await axios({ |
| | | method: 'get', |
| | | url: getAcceptanceDetails, |
| | | params: { id } |
| | | }) |
| | | if(code == 200) { |
| | | return data; |
| | | } |
| | | }, |
| | | reset() { |
| | | this.form.search = undefined |
| | | this.getTableData() |
| | | }, |
| | | async exportExcel() { |
| | | const res = await axios({ |
| | | method: "get", |
| | | url: `${exportAcceptance}`, |
| | | responseType: "blob" |
| | | }) |
| | | this.$message.success('å¯¼åºæå') |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æ åç©è´¨éªæ¶.xlsx'; |
| | | link.click(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .view-title { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | height: 60px; |
| | | padding-left: 20px; |
| | | } |
| | | .search { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | padding: 20px 20px 0 20px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | } |
| | | .tables { |
| | | margin-top: 20px; |
| | | padding: 18px; |
| | | background: #fff; |
| | | border-radius: 5px; |
| | | } |
| | | .pagination { |
| | | padding-top: 15px; |
| | | padding-right: 10px; |
| | | display: flex; |
| | | justify-content: space-between |
| | | } |
| | | </style> |
| | |
| | | exportFun() { |
| | | this.outLoading = true |
| | | this.$axios.post(this.$api.feCalibrationSchedule.exportOfValueTraceabilityPlan, { |
| | | instrumentName: this.searchForm.instrumentName |
| | | instrumentName: this.searchForm.instrumentName, |
| | | managementNumber:this.searchForm.managementNumber, |
| | | }, {responseType: "blob"}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <StandMaterialAccept></StandMaterialAccept> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import StandMaterialAccept from "@/components/do/a6-standard-material-accep"; |
| | | export default { |
| | | components: { |
| | | StandMaterialAccept |
| | | }, |
| | | data(){ |
| | | return { |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | methods:{ |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .container { |
| | | padding-top: 10px; |
| | | } |
| | | </style> |