Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function selectPersonnelOverview(query) { |
| | | return request({ |
| | | url: '/user/selectPersonnelOverview', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | 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 |
| | | }) |
| | |
| | | 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" |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <svg width="148" height="21" viewBox="0 0 148 21" fill="none" xmlns="http://www.w3.org/2000/svg"> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M7.00437 5.75531V0.0625L0.772461 5.75531H7.00437Z" fill="#B26F00"/> |
| | | <path fill-rule="evenodd" clip-rule="evenodd" d="M141.709 5.75531V0.0625L147.941 5.75531H141.709Z" fill="#B26F00"/> |
| | | <path d="M6.97192 2.0625C6.97192 0.957931 7.86735 0.0625 8.97192 0.0625H139.676C140.781 0.0625 141.676 0.957931 141.676 2.0625V12.0625C141.676 16.4808 138.095 20.0625 133.676 20.0625H14.9719C10.5537 20.0625 6.97192 16.4808 6.97192 12.0625V2.0625Z" fill="url(#paint0_linear_2026_4)"/> |
| | | <defs> |
| | | <linearGradient id="paint0_linear_2026_4" x1="6.97192" y1="0.0625" x2="6.97192" y2="20.0625" gradientUnits="userSpaceOnUse"> |
| | | <stop stop-color="#F9C76F"/> |
| | | <stop offset="1" stop-color="#FEB42F"/> |
| | | </linearGradient> |
| | | </defs> |
| | | </svg> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="人ååç§°"> |
| | | <el-input v-model="entity.name" clearable></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="refresh">é ç½®</el-button> |
| | | <el-button type="primary" @click="currentPage= 1,list=[],finishLoding = false,keyMap = {},refreshTable()">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table" v-loading="loading"> |
| | | <scroll-pagination @load="refreshTable" :finishLoding="finishLoding" :list="list" v-if="list.length>0||loading"> |
| | | <ul class="card"> |
| | | <li v-for="(m,i) in list" :key="i"> |
| | | <el-image style="width: 80px;height: 112px;" :src="javaApi+'/img/'+m.pictureUrl"> |
| | | <div slot="error" class="image-error" style="width: 79px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <el-image style="width: 195px; |
| | | height: 112px;" :src="javaApi+'/img/'+m.signatureUrl"> |
| | | <div slot="error" class="image-error" style="width: 194px; |
| | | height: 110px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #EEEEEE;"> |
| | | <i class="el-icon-picture-outline" style="font-size:30px;color:#666666;"></i> |
| | | </div> |
| | | </el-image> |
| | | <div class="title">{{ m.name }}</div> |
| | | </li> |
| | | </ul> |
| | | </scroll-pagination> |
| | | <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >ææ æ°æ®</div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import ScrollPagination from '@/components/index/scroll-paging.vue' |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | export default { |
| | | components: { |
| | | ScrollPagination |
| | | }, |
| | | data() { |
| | | return { |
| | | entity:{ |
| | | name: null, |
| | | status: 0, |
| | | }, |
| | | list:[], |
| | | currentPage: 1, // å½å页 |
| | | pageSize: 16, // ä¸é¡µ16æ¡ |
| | | total: '', |
| | | loading: true, // ç»ä»¶loadingçå±ç¤º,é»è®¤ä¸ºtrue |
| | | finishLoding: false, // å è½½å®æï¼æ¾ç¤ºå·²ç»æ²¡ææ´å¤äº |
| | | keyMap: {} |
| | | } |
| | | }, |
| | | created() { |
| | | this.keyMap = {}; |
| | | this.currentPage = 1; |
| | | this.list = []; |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | const key = `_${this.currentPage}` |
| | | const value = this.keyMap[key] |
| | | // 妿valueåå¨ï¼è¡¨ç¤ºç¼åæå¼ï¼é£ä¹é»æ¢è¯·æ± |
| | | if(value) { |
| | | return |
| | | } |
| | | // valueä¸åå¨ï¼è¡¨ç¤ºç¬¬ä¸æ¬¡è¯·æ±,设置å ä½ |
| | | this.keyMap[key] = 'temp' |
| | | if(this.currentPage==1){ |
| | | this.loading = true |
| | | } |
| | | selectUserCondition({...this.entity}).then(res => { |
| | | this.total = res.data.length |
| | | let list = res.data |
| | | if(list.length==0){ |
| | | this.finishLoding = true; |
| | | }else{ |
| | | if(list.length<this.pageSize){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.list = this.list.concat(list) |
| | | if(this.total==this.list.length){ |
| | | this.finishLoding = true; |
| | | } |
| | | this.currentPage++; |
| | | } |
| | | this.loading = false |
| | | }).catch(err => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | refresh() { |
| | | this.keyMap = {}; |
| | | this.currentPage= 1; |
| | | this.list=[]; |
| | | this.finishLoding = false; |
| | | this.entity={ |
| | | name: null, |
| | | state:1, |
| | | orderBy: {field: "id", order: "asc"} |
| | | }; |
| | | this.refreshTable() |
| | | }, |
| | | // æ»å¨è§¦åºå è½½ |
| | | scrollFn() { |
| | | let clientHeight = document.documentElement.clientHeight - 18; //å¯è§åºå |
| | | let scrollHeight = document.body.scrollHeight; // æ»å¨ææ¡£é«åº¦ |
| | | let scrollTop = parseInt(document.documentElement.scrollTop); // å·²æ»å¨çé«åº¦ |
| | | let height = 300; |
| | | if ( |
| | | scrollTop + clientHeight >= scrollHeight - height && |
| | | scrollHeight != 0 |
| | | ) { |
| | | if (!this.finishLoding&&this.currentPage*this.pageSize<this.total) { |
| | | this.currentPage = this.currentPage + 1; |
| | | this.refreshTable(); |
| | | } |
| | | } else { |
| | | return false; |
| | | } |
| | | }, |
| | | throttle(fn, wait) { |
| | | // å°è£
彿°è¿è¡èæµ |
| | | var timer = null; |
| | | return function () { |
| | | var context = this; |
| | | var args = arguments; |
| | | if (!timer) { |
| | | timer = setTimeout(function () { |
| | | fn.apply(context, args); |
| | | timer = null; |
| | | }, wait); |
| | | } |
| | | }; |
| | | }, |
| | | }, |
| | | destroyed() { |
| | | window.removeEventListener("scroll", this.throttle(), false); |
| | | }, |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .table { |
| | | width: 100%; |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .card { |
| | | list-style-type: none; |
| | | display: grid; |
| | | grid-template-columns: repeat(auto-fit, 314px); |
| | | /* justify-content: center; */ |
| | | grid-gap: 16px; |
| | | min-height: 200px; |
| | | padding-left: 0 !important; |
| | | } |
| | | .card li{ |
| | | width: 320px; |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51,51,51,0.04); |
| | | border: 1px solid #EEEEEE; |
| | | margin: 0 !important; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-between; |
| | | box-sizing: border-box; |
| | | padding: 26px 16px 16px; |
| | | font-size: 14px; |
| | | position: relative; |
| | | } |
| | | li .title{ |
| | | width: 147px; |
| | | height: 20px; |
| | | background: url(~@/assets/images/renyuan-title.svg) no-repeat; |
| | | position: absolute; |
| | | top: -6px; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | text-align: center; |
| | | line-height: 20px; |
| | | color: #fff; |
| | | } |
| | | </style> |
| | |
| | | <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-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="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | <el-button @click="closeDialog">å æ¶</el-button> |
| | | <el-button type="primary" :loading="submitLoading" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import Step1 from './Step1.vue' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addAcceptance, getAcceptanceDetails, |
| | | getStandardSubstanceAll, |
| | | updateAcceptance |
| | | } from "@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept"; |
| | | export default { |
| | | components: { |
| | | Step1 |
| | | limsTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | model: { |
| | | loading: false, |
| | | submitLoading: false, |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | list: [], |
| | | }, |
| | | 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: [] |
| | | } |
| | | }, |
| | | watch: { |
| | | model(newVal) { |
| | | this.model = newVal |
| | | } |
| | | mounted() { |
| | | this.getStand() |
| | | }, |
| | | 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 |
| | | 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.model.acceptance.substanceId) { |
| | | if (!this.acceptance.substanceId) { |
| | | this.$message.warning('è¯·éæ©æ¸
å') |
| | | return |
| | | } |
| | | this.$emit('submit', this.model) |
| | | 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> |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | >>>.el-dialog__body { |
| | | height: 580px; |
| | | overflow-y: auto; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | :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" @submit="submit"></AddRecord> |
| | | <AddRecord ref="addRecordRef" v-if="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'; |
| | | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import AddRecord from './component/AddRecord.vue'; |
| | | import { |
| | | getPageAcceptance, |
| | | updateAcceptanc, |
| | | addAcceptance |
| | | getPageAcceptance, getAcceptanceDetails, exportFeStandardSubstanceAcceptance, updateAcceptance, addAcceptance |
| | | } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' |
| | | export default { |
| | | components: { |
| | |
| | | form: { |
| | | search: undefined |
| | | }, |
| | | addRecordRef: false, |
| | | columns: [ |
| | | { |
| | | label: "åºåºç¼å·", |
| | |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | async getTableData() { |
| | | const res = await getPageAcceptance(this.form); |
| | | if (res.code === 200) { |
| | | 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() |
| | | }) |
| | | }, |
| | | async submit(form) { |
| | | |
| | | const { code } = await form.acceptance.id ? updateAcceptanc(this.form) : addAcceptance((this.form)); |
| | | if (code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾' : 'æ·»å '}æå`) |
| | | submit() { |
| | | this.addRecordRef = false; |
| | | this.getTableData() |
| | | } |
| | | }, |
| | | async edit(row) { |
| | | const res = await this.getDetail(row.id) |
| | | this.$refs.addRecordRef.openDialog({ |
| | | acceptance: res.acceptance, |
| | | list: res.list |
| | | edit(row) { |
| | | this.addRecordRef = true; |
| | | this.$nextTick(() => { |
| | | this.$refs.addRecordRef.openDialog(row.id) |
| | | }) |
| | | }, |
| | | 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" |
| | | }) |
| | | exportFeStandardSubstanceAcceptance().then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨éªæ¶.xlsx'); |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |