| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function getPageSubstanceRecord(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/getPageSubstanceRecord', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // è·åå®éªå®¤åç§° |
| | | export function getPageStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/getPageStandardSubstance', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
åæ°å¢ç¼è¾ |
| | | export function addStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/addStandardSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | //å 餿 åç©è´¨æ¸
å |
| | | export function removeStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/removeStandardSubstance', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æä»¶åæ´-å¯¼åº |
| | | export function exportOfStandardSubstanceList(query) { |
| | | return request({ |
| | | url: "/feStandardSubstance/exportOfStandardSubstanceList", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
ååç¨ |
| | | export function borrowSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/borrowSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
åå½è¿ |
| | | export function returnSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/returnSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getPageAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/getPageAcceptance', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function updateAcceptanc(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/updateAcceptanc', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ°å¢éªæ¶ |
| | | export function addAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/addAcceptance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // ä¿®æ¹éªæ¶ |
| | | export function updateAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/updateAcceptance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | /** |
| | | * @desc æ åç©è´¨æ¸
å |
| | | */ |
| | | export function getStandardSubstanceAll(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/getStandardSubstanceAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ åç©è´¨éªæ¶æ¥ç详æ
|
| | | export function getAcceptanceDetails(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/getAcceptanceDetails', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ åç©è´¨éªæ¶å¯¼åº |
| | | export function exportFeStandardSubstanceAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/exportFeStandardSubstanceAcceptance', |
| | | method: 'get', |
| | | params: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.name" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼åå·" prop="model"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.model" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | getPageSubstanceRecord |
| | | } from '@/api/cnas/resourceDemand/standardMaterailRequistion/standardMaterailRequistion' |
| | | |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | // TableCard, |
| | | // ZTTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | model: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ åç©è´¨åç§°', |
| | | prop: 'name', |
| | | minWidth: '120' |
| | | }, |
| | | { |
| | | label: 'è§æ ¼åå·', |
| | | prop: 'model', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°é', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¢ç¨äºº', |
| | | prop: 'borrowUser', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¢ç¨æ¥æ', |
| | | prop: 'borrowDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿äºº', |
| | | prop: 'returnIntegrity', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿æ¥æ', |
| | | prop: 'returnDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿æ¶ç¶æ', |
| | | prop: 'returnIntegrity', |
| | | minWidth: '100' |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | total: 0, |
| | | formDia: false, |
| | | borrowDia: false, |
| | | returnDia: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | methods: { |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | this.tableLoading = true |
| | | getPageSubstanceRecord({ |
| | | ...this.page, |
| | | ...this.searchForm |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.name = ''; |
| | | this.searchForm.model = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .capacity-scope { |
| | | padding: 20px !important; |
| | | } |
| | | |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨åç¨" |
| | | width="80%" @close="closeBorrowDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°"> |
| | | <el-input v-model="form.name" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·"> |
| | | <el-input v-model="form.model" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®å¥½æ§" prop="integrity"> |
| | | <el-input v-model="form.integrity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨äºº" prop="borrowUser"> |
| | | <el-input v-model="form.borrowUser" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»æ¹å¼" prop="phone"> |
| | | <el-input v-model="form.phone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååºæ¥æ" prop="borrowDate"> |
| | | <el-date-picker |
| | | v-model="form.borrowDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="约å®å½è¿æ¥æ" prop="borrowReturnDate"> |
| | | <el-date-picker |
| | | v-model="form.borrowReturnDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååºäºº" prop="lender"> |
| | | <el-input v-model="form.lender" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeBorrowDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | borrowSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'borrowDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | integrity: '', |
| | | borrowUser: '', |
| | | phone: '', |
| | | borrowDate: '', |
| | | borrowReturnDate: '', |
| | | lender: '', |
| | | substanceId: '' |
| | | }, |
| | | rules: { |
| | | integrity: [{required: true, message: '请填åå®å¥½æ§',trigger: 'blur'}], |
| | | borrowUser: [{required: true, message: '请填ååç¨äºº',trigger: 'blur'}], |
| | | phone: [{required: true, message: '请填åèç³»æ¹å¼',trigger: 'blur'}], |
| | | borrowDate: [{required: true, message: 'è¯·éæ©ååºæ¥æ',trigger: 'change'}], |
| | | borrowReturnDate: [{required: true, message: 'è¯·éæ©çº¦å®å½è¿æ¥æ',trigger: 'change'}], |
| | | lender: [{required: true, message: 'è¯·éæ©lender',trigger: 'blur'}], |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.form.name = row.name |
| | | this.form.model = row.model |
| | | this.form.substanceId = row.id |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | this.form.status = '0'; |
| | | borrowSubstance(this.form).then(res =>{ |
| | | this.loading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æä½æå') |
| | | this.closeBorrowDia() |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeBorrowDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeBorrowDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨" |
| | | width="80%" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input v-model="form.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·" prop="model"> |
| | | <el-input v-model="form.model" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç产åå®¶" prop="factoryManufacturer"> |
| | | <el-input v-model="form.factoryManufacturer" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåç¼å·" prop="factoryNum"> |
| | | <el-input v-model="form.factoryNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="管çç¼å·" prop="manageNum"> |
| | | <el-input v-model="form.manageNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¡®å®åº¦" prop="uncertainty"> |
| | | <el-input v-model="form.uncertainty" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ°é" prop="quantity"> |
| | | <el-input v-model="form.quantity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´ç½®æ¥æ" prop="acquisitionDate"> |
| | | <el-date-picker |
| | | v-model="form.acquisitionDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æææ" prop="effectiveDate"> |
| | | <el-date-picker |
| | | v-model="form.effectiveDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¡£æ¡ç¼å·" prop="fileNum"> |
| | | <el-input v-model="form.fileNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åæ¾ä½ç½®" prop="position"> |
| | | <el-input v-model="form.position" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | addStandardSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'formDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | factoryManufacturer: '', |
| | | factoryNum: '', |
| | | manageNum: '', |
| | | uncertainty: '', |
| | | quantity: '', |
| | | acquisitionDate: '', |
| | | effectiveDate: '', |
| | | fileNum: '', |
| | | position: '', |
| | | remark: '', |
| | | id: '', |
| | | }, |
| | | rules: { |
| | | name: [{required: true, message: 'è¯·å¡«åæ åç©è´¨åç§°',trigger: 'blur'}], |
| | | model: [{required: true, message: '请填åè§æ ¼åå·',trigger: 'blur'}], |
| | | factoryManufacturer: [{required: true, message: '请填åç产åå®¶',trigger: 'blur'}], |
| | | factoryNum: [{required: true, message: '请填ååºåç¼å·',trigger: 'blur'}], |
| | | manageNum: [{required: true, message: '请填å管çç¼å·',trigger: 'blur'}], |
| | | uncertainty: [{required: true, message: '请填åä¸ç¡®å®åº¦',trigger: 'blur'}], |
| | | quantity: [{required: true, message: 'è¯·å¡«åæ°é',trigger: 'blur'}], |
| | | acquisitionDate: [{required: true, message: 'è¯·éæ©è´ç½®æ¥æ',trigger: 'change'}], |
| | | effectiveDate: [{required: true, message: 'è¯·éæ©æææ',trigger: 'change'}], |
| | | fileNum: [{required: true, message: 'è¯·å¡«åæ¡£æ¡ç¼å·',trigger: 'blur'}], |
| | | position: [{required: true, message: '请填ååæ¾ä½ç½®',trigger: 'blur'}], |
| | | }, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.form = row |
| | | } |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | addStandardSubstance(this.form).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeYearDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨å½è¿" |
| | | width="80%" @close="closeReturnDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input v-model="form.name" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·" prop="model"> |
| | | <el-input v-model="form.model" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿æ¥æ" prop="returnDate"> |
| | | <el-date-picker |
| | | v-model="form.returnDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿äºº" prop="returnedPerson"> |
| | | <el-input v-model="form.returnedPerson" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®å¥½æ§" prop="returnIntegrity"> |
| | | <el-input v-model="form.returnIntegrity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æ¥äºº" prop="rummager"> |
| | | <el-input v-model="form.rummager" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeReturnDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | returnSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'returnDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | returnedPerson: '', |
| | | returnDate: '', |
| | | returnIntegrity: '', |
| | | rummager: '', |
| | | }, |
| | | rules: { |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.form.name = row.name |
| | | this.form.model = row.model |
| | | this.form.substanceId = row.id |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | this.form.status = '1'; |
| | | returnSubstance(this.form).then(res => { |
| | | this.loading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æä½æå') |
| | | this.closeReturnDia() |
| | | } |
| | | }) |
| | | let internalReport = this.HaveJson(this.form) |
| | | |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeReturnDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeReturnDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.name" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå®¶" prop="factoryManufacturer"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.factoryManufacturer" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" @click="exportFun">导 åº</el-button> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <form-dia v-if="formDia" ref="formDia" @closeYearDia="closeYearDia"></form-dia> |
| | | <borrow-dia v-if="borrowDia" ref="borrowDia" @closeYearDia="closeBorrowDia"></borrow-dia> |
| | | <return-dia v-if="returnDia" ref="returnDia" @closeYearDia="closeReturnDia"></return-dia> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | getPageStandardSubstance, |
| | | removeStandardSubstance, |
| | | exportOfStandardSubstanceList |
| | | } from '@/api/cnas/resourceDemand/standardMaterial/standardMaterial' |
| | | import FormDia from '../standardMaterial/component/formDia.vue'; |
| | | import BorrowDia from '../standardMaterial/component/borrowDia.vue'; |
| | | import ReturnDia from '../standardMaterial/component/returnDia.vue'; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | FormDia, |
| | | BorrowDia, |
| | | ReturnDia |
| | | }, |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | factoryManufacturer: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ åç©è´¨åç§°', |
| | | prop: 'name', |
| | | minWidth: '120' |
| | | }, |
| | | { |
| | | label: 'è§æ ¼åå·', |
| | | prop: 'model', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç产åå®¶', |
| | | prop: 'factoryManufacturer', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '管çç¼å·', |
| | | prop: 'manageNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¸ç¡®å®åº¦', |
| | | prop: 'uncertainty', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°é', |
| | | prop: 'quantity', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è´ç½®æ¥æ', |
| | | prop: 'acquisitionDate', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | label: 'æææ', |
| | | prop: 'effectiveDate', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | label: 'æ¡£æ¡ç¼å·', |
| | | prop: 'fileNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åæ¾ä½ç½®', |
| | | prop: 'position', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '180', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'åç¨', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.borrow(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å½è¿', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.return(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | total: 0, |
| | | formDia: false, |
| | | borrowDia: false, |
| | | returnDia: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | methods: { |
| | | exportFun() { |
| | | this.outLoading = true |
| | | exportOfStandardSubstanceList(this.searchForm).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }, false); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨æ¸
å.xlsx') |
| | | }) |
| | | }, |
| | | // æ¥è¯¢å表 |
| | | searchList() { |
| | | this.tableLoading = true |
| | | getPageStandardSubstance({ |
| | | ...this.page, |
| | | ...this.searchForm |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan(row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | removeStandardSubstance({ id: row.id }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia(type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeYearDia() { |
| | | this.formDia = false |
| | | this.searchList() |
| | | }, |
| | | // åç¨ |
| | | borrow(row) { |
| | | this.borrowDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.borrowDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeBorrowDia() { |
| | | this.borrowDia = false |
| | | this.searchList() |
| | | }, |
| | | // å½è¿ |
| | | return(row) { |
| | | this.returnDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.returnDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeReturnDia() { |
| | | this.returnDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm() { |
| | | this.searchForm.name = ''; |
| | | this.searchForm.factoryManufacturer = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | // å页 |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .capacity-scope { |
| | | padding: 20px !important; |
| | | } |
| | | |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="72%" v-loading="loading"> |
| | | <el-form :model="acceptance" ref="acceptance" label-width="140px" size="small"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å家代表" prop="producer"> |
| | | <el-input v-model="acceptance.producer"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¸å
³éä»¶" prop="file"> |
| | | <div class="table-between"> |
| | | <el-input v-model="acceptance.file" style="width: 80%;" disabled></el-input> |
| | | <el-upload |
| | | ref="upload" |
| | | style="float: right;" |
| | | :headers="uploadHeader" |
| | | :action="action" |
| | | :show-file-list="false" |
| | | :on-success="onSuccess" |
| | | > |
| | | <el-button type="primary"> |
| | | éä»¶ä¸ä¼ |
| | | </el-button> |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥æ¶äºº" prop="recipient"> |
| | | <el-input v-model="acceptance.recipient"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¥åç¾å" prop="signature"> |
| | | <el-input v-model="acceptance.signature"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="éªæ¶æ
åµ" prop="situation"> |
| | | <el-input v-model="acceptance.situation"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®è£
è°è¯æ
åµ" prop="installation"> |
| | | <el-input v-model="acceptance.installation"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¸
å" prop="substanceId" |
| | | :rule="[{ required: true, message: 'è¯·éæ©æ¸
å', trigger: 'change' }]"> |
| | | <el-select v-model="acceptance.substanceId" placeholder="è¯·éæ©" style="width: 100%"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°è´§æ¥æ" prop="arriveDate"> |
| | | <el-date-picker |
| | | v-model="acceptance.arriveDate" |
| | | align="right" |
| | | type="date" |
| | | placeholder="éæ©æ¥æ" |
| | | style="width: 100%" |
| | | value-format="yyyy-MM-dd" |
| | | > |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç»´ä¿®åä½" prop="maintenanceUnit"> |
| | | <el-input v-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"> |
| | | <lims-table :tableData="list" :column="spareColumns" height="300"> |
| | | <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-col> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeDialog">å æ¶</el-button> |
| | | <el-button type="primary" :loading="submitLoading" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addAcceptance, getAcceptanceDetails, |
| | | getStandardSubstanceAll, |
| | | updateAcceptance |
| | | } from "@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | loading: false, |
| | | submitLoading: false, |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | | file: undefined, // ç¸å
³éä»¶ |
| | | recipient: undefined, // æ¥æ¶äºº |
| | | signature: undefined, // æ¥åç¾å |
| | | situation: undefined, // éªæ¶æ
åµ |
| | | installation: undefined, // å®è£
è°è¯æ
åµ |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | list: [], |
| | | }, |
| | | list: [], |
| | | 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: [] |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getStand() |
| | | }, |
| | | methods: { |
| | | openDialog(id) { |
| | | if(id) { |
| | | this.getDetail(id) |
| | | } else { |
| | | this.clearForm() |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | getDetail(id) { |
| | | this.loading = true |
| | | getAcceptanceDetails({id: id}).then(res => { |
| | | this.acceptance = res.data.acceptance |
| | | this.list = res.data.list |
| | | this.loading = false |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | getStand() { |
| | | getStandardSubstanceAll().then(res => { |
| | | this.options = res.data |
| | | }) |
| | | }, |
| | | addSpareTable() { |
| | | this.list.push({ |
| | | acceptanceId: this.acceptance.id, |
| | | name: '', |
| | | number: '', |
| | | isEdit: true |
| | | }) |
| | | }, |
| | | onSuccess(response) { |
| | | this.acceptance.file = response.data |
| | | }, |
| | | save(index) { |
| | | this.$set(this.list[index], 'isEdit', false) |
| | | }, |
| | | edit(index) { |
| | | this.$set(this.list[index], 'isEdit', true) |
| | | }, |
| | | clearForm() { |
| | | this.list = [] |
| | | this.resetForm('acceptance') |
| | | }, |
| | | closeDialog() { |
| | | this.clearForm() |
| | | this.resetForm('acceptance') |
| | | this.dialogVisible = false |
| | | }, |
| | | submit() { |
| | | if (!this.acceptance.substanceId) { |
| | | this.$message.warning('è¯·éæ©æ¸
å') |
| | | return |
| | | } |
| | | this.acceptance.list = this.HaveJson(this.list) |
| | | this.submitLoading = true |
| | | if(this.acceptance.id) { |
| | | updateAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | this.$message.success('ç¼è¾æå') |
| | | this.submitLoading = false |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | }).catch((e) => { |
| | | this.submitLoading = false |
| | | }) |
| | | } else { |
| | | addAcceptance({acceptance: this.acceptance, list: this.list}).then(res => { |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDialog() |
| | | this.$emit('submit') |
| | | }).catch((e) => { |
| | | this.submitLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | }, |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/personBasicInfo/saveCNASFile' |
| | | } |
| | | }, |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-dialog__body { |
| | | height: 580px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="form" ref="form" size="small" :inline="true"> |
| | | <el-form-item label="ç©è´¨åç§°"> |
| | | <el-input v-model="form.name"></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> |
| | | <div> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="openDialog">æ·»å éªæ¶</el-button> |
| | | <el-button size="small" type="primary" @click="exportExcel">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"> |
| | | <template slot="action" slot-scope="{ row }"> |
| | | <el-button type="text" @click="edit(row)">ç¼è¾</el-button> |
| | | </template> |
| | | </lims-table> |
| | | </div> |
| | | <AddRecord ref="addRecordRef" v-if="addRecordRef" @submit="submit"></AddRecord> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import AddRecord from './component/AddRecord.vue'; |
| | | import { |
| | | getPageAcceptance, getAcceptanceDetails, exportFeStandardSubstanceAcceptance, updateAcceptance, addAcceptance |
| | | } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | AddRecord |
| | | }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | name: undefined |
| | | }, |
| | | addRecordRef: false, |
| | | 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: [], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | getTableData() { |
| | | getPageAcceptance(this.form).then(res => { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | }) |
| | | }, |
| | | openDialog() { |
| | | this.addRecordRef = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addRecordRef.openDialog() |
| | | }) |
| | | }, |
| | | submit() { |
| | | this.addRecordRef = false; |
| | | this.getTableData() |
| | | }, |
| | | edit(row) { |
| | | this.addRecordRef = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addRecordRef.openDialog(row.id) |
| | | }) |
| | | }, |
| | | reset() { |
| | | this.form.name = undefined |
| | | this.getTableData() |
| | | }, |
| | | async exportExcel() { |
| | | exportFeStandardSubstanceAcceptance().then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨éªæ¶.xlsx'); |
| | | }) |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.getTableData() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .capacity-scope { |
| | | padding: 20px !important; |
| | | } |
| | | |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |