Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | return request({ |
| | | url: '/rawMaterialOrder/rawAllExport', |
| | | method: 'post', |
| | | data: query |
| | | data: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | |
| | | return request({ |
| | | url: '/insOrder/rawAllInsOrderExport', |
| | | method: 'post', |
| | | data: query |
| | | data: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | // å°å¾
æ£éªççæ¤éè¿è¡æ´æ¹ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ½æ ·ä¿¡æ¯è¯¦æ
页é¢ç¸å
³æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // æ½æ ·ä¿¡æ¯-å£åº¦æ¥è¯¢ |
| | | export function getQuarterPage(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/getQuarterPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ½æ ·ä¿¡æ¯-年度æ¥è¯¢ |
| | | export function getSpotCheckYearPage(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/getSpotCheckYearPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // å é¤å£åº¦æ½æ£ |
| | | export function deleteQuarter(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/deleteQuarter', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | // çæå£åº¦æ¥å |
| | | export function finalReportQuarter(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/finalReportQuarter', |
| | | method: 'get', |
| | | params: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | // çæå¹´åº¦æ¥å |
| | | export function finalReportSpotCheckYear(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/finalReportSpotCheckYear', |
| | | method: 'get', |
| | | params: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | // å é¤å¹´åº¦æ½æ£ |
| | | export function deleteSpotCheckYear(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/deleteSpotCheckYear', |
| | | method: 'delete', |
| | | params: query, |
| | | }) |
| | | } |
| | | // å¹´åº¦æ½æ£æ¥ç详æ
|
| | | export function getSpotCheckYear(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/getSpotCheckYear', |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | | // æäº¤å¹´åº¦æ½æ · |
| | | export function addSpotCheckYear(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/addSpotCheckYear', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | // ç¼è¾å¹´åº¦æ½æ · |
| | | export function updateSpotCheckYear(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/updateSpotCheckYear', |
| | | method: 'post', |
| | | data: query, |
| | | }) |
| | | } |
| | | // å£åº¦æ½æ£æ¥ç详æ
|
| | | export function getQuarter(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/getQuarter', |
| | | method: 'get', |
| | | params: query, |
| | | }) |
| | | } |
| | | // æäº¤å£åº¦æ½æ · |
| | | export function addQuarter(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/addQuarter', |
| | | method: 'post', |
| | | data : query, |
| | | }) |
| | | } |
| | | // ç¼è¾å£åº¦æ£éª |
| | | export function updateQuarterOnOrder(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/updateQuarterOnOrder', |
| | | method: 'post', |
| | | data : query, |
| | | }) |
| | | } |
| | |
| | | data: query |
| | | }) |
| | | } |
| | | // åææä¸ååºåæ¤é |
| | | // åæææ¥æ£å
¨é¨å¯¼åº |
| | | export function rawAllExport(query) { |
| | | return request({ |
| | | url: '/rawMaterialOrder/rawAllExport', |
| | | method: 'post', |
| | | data: query |
| | | data: query, |
| | | responseType: "blob" |
| | | }) |
| | | } |
| | | // åææä¸ååºåæ¤é |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ¥åç»æç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //8æ¥åç»æ-å¯¼åº |
| | | export function exportProcessReport(query) { |
| | | return request({ |
| | | url: "/processReport/exportProcessReport", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // 8æ¥åç»æ-æ°å¢ |
| | | export function addProcessReport(data) { |
| | | return request({ |
| | | url: "/processReport/addProcessReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
| | | |
| | | // 8æ¥åç»æ-ä¿®æ¹ |
| | | export function doProcessReport(data) { |
| | | return request({ |
| | | url: "/processReport/doProcessReport", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="report-results"> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æ¥åç»æ</el-col> |
| | | <el-col :span="12" style="text-align: right;"> |
| | | <el-button size="medium" type="primary" @click="handleDown" :loading="outLoading" v-if="outPower">导åº</el-button> |
| | | <el-button size="medium" type="primary" @click="openAdd" v-if="addPower">æ°å¢</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ£éªæ¥åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="queryParams.insReportCode" |
| | | @keyup.enter.native="refreshTable()"></el-input></div> |
| | | </div> |
| | | <div class="search_thing" style="padding-left: 30px;"> |
| | | <el-button size="small" @click="refresh()">é ç½®</el-button> |
| | | <el-button size="small" type="primary" @click="refreshTable()">æ¥ è¯¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :tableLoading="tableLoading" :height="'calc(100vh - 290px)'" |
| | | :page="page" @pagination="pagination"></lims-table> |
| | | <!-- <ValueTable ref="ValueTable" :url="$api.processReport.pageProcessReport" |
| | | :delUrl="$api.processReport.delProcessReport" :componentData="componentData" :key="upIndex" /> --> |
| | | </div> |
| | | <el-dialog :title="title" :visible.sync="addDialogVisible" width="400px" top="6vh"> |
| | | <el-row> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ£éªæ¥åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.insReportCode"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">页æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.pages"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åé份æ°ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.number"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åå¾ä½å¤ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.send"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åéæ¹å¼ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="addInfo.method"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å鿥æï¼</div> |
| | | <div class="search_input"> |
| | | <el-date-picker v-model="addInfo.sendTime" type="date" size="small" placeholder="éæ©æ¥æ" format="yyyy-MM-dd" |
| | | value-format="yyyy-MM-dd" style="width: 100%;"> |
| | | </el-date-picker> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åé人ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.sendUser" placeholder="è¯·éæ©" size="small" style="width: 100%;"> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¾æ¶äººï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="addInfo.signatory" placeholder="è¯·éæ©" size="small" style="width: 100%;" multiple> |
| | | <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="24" style="margin-bottom: 16px;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">夿³¨ï¼</div> |
| | | <div class="search_input"><el-input size="small" placeholder="请è¾å
¥" clearable v-model="addInfo.remark" |
| | | type="textarea" :rows="2"></el-input></div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="addDialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="handleAdd" :loading="addLoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | exportProcessReport, |
| | | doProcessReport, |
| | | addProcessReport |
| | | } from '@/api/cnas/process/reportResults.js' |
| | | import { |
| | | selectUserCondition, |
| | | } from "@/api/business/inspectionTask.js"; |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | }, |
| | | data() { |
| | | return { |
| | | outLoading: false, |
| | | addPower: true, |
| | | outPower: true, |
| | | componentData: { |
| | | entity: { |
| | | insReportCode: null, |
| | | // sendUserName: null, |
| | | orderBy: { |
| | | field: 'createTime', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | selectMethod: 'handleChangeTask', |
| | | do: [ |
| | | { |
| | | id: 'handleWork', |
| | | font: 'ä¿®æ¹', |
| | | type: 'text', |
| | | method: 'handleWork' |
| | | }, |
| | | { |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy' |
| | | } |
| | | ], |
| | | tagField: {}, |
| | | selectField: { |
| | | sendUser: { |
| | | select: [] |
| | | }, |
| | | signatory: { |
| | | select: [] |
| | | }, |
| | | }, |
| | | // addUpload:['signatoryUrl'], |
| | | requiredAdd: [], |
| | | requiredUp: [], |
| | | needSort: [], |
| | | inputType: '' |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | personList: [], |
| | | title: 'æ°å¢', |
| | | addDialogVisible: false, |
| | | addInfo: { |
| | | signatory: [] |
| | | }, |
| | | addLoading: false, |
| | | mutilSelect: [], |
| | | queryParams: {}, |
| | | tableData: [], |
| | | column: [ |
| | | { label: "ç¼å·", prop: "number" }, |
| | | { label: "è¾
å©é¡¹ç®åç§°", prop: "auxiliaryProject", width: "120px" }, |
| | | { |
| | | label: "å®éªå®¤", |
| | | prop: "laboratory", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.laboratoryList.find((m) => m.value == params).label; |
| | | }, |
| | | }, |
| | | { label: "åä½", prop: "unit" }, |
| | | { label: "æ ¸åå·¥æ¶", prop: "approvedWorkingHour" }, |
| | | { label: "é¨é¨", prop: "department" }, |
| | | { label: "夿³¨", prop: "remarks" }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.openAdd("ç¼è¾", row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "performance:manHour:workTimeConfig:edit", |
| | | ]); |
| | | }, |
| | | }, |
| | | { |
| | | name: "å é¤", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleDelete(row); |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "performance:manHour:workTimeConfig:del", |
| | | ]); |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 0, |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | // this.entityCopy = this.HaveJson(this.componentData.entity); |
| | | // this.getPower() |
| | | this.getAuthorizedPerson() |
| | | }, |
| | | methods: { |
| | | getPower() { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let up = false |
| | | let del = false |
| | | let add = false |
| | | let out = false |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'doProcessReport') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'addProcessReport') { |
| | | add = true |
| | | } |
| | | if (power[i].menuMethod == 'delProcessReport') { |
| | | del = true |
| | | } |
| | | if (power[i].menuMethod == 'exportProcessReport') { |
| | | out = true |
| | | } |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.outPower = out |
| | | this.addPower = add |
| | | }, |
| | | handleDown() { |
| | | if (this.mutilSelect.length == 0) { |
| | | this.$message.warning('è¯·éæ©è¦å¯¼åºçæ°æ®') |
| | | return |
| | | } |
| | | // html导åºä¸ºwordï¼æ ·å太ä¸äºï¼ä»£ç å
æ¾çå§ |
| | | // exportHtmlToWord(this.$refs.content,'æ£éªæ¥ååæ¾ç»è®°è¡¨') |
| | | this.outLoading = true |
| | | exportProcessReport({ ids: this.mutilSelect.map(m => m.id) }).then(res => { |
| | | this.outLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('å¯¼åºæå') |
| | | const url = this.javaApi + '/word/' + res.message; |
| | | this.$download.saveAs(url, "æ¥åç»æ"); |
| | | }) |
| | | }, |
| | | openAdd() { |
| | | this.title = 'æ°å¢' |
| | | this.addInfo = { |
| | | signatory: [] |
| | | } |
| | | this.addDialogVisible = true; |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.upIndex++ |
| | | this.refreshTable() |
| | | }, |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | handleAdd() { |
| | | this.addLoading = true |
| | | delete this.addInfo.createTime |
| | | delete this.addInfo.createUser |
| | | delete this.addInfo.updateTime |
| | | delete this.addInfo.signatoryUrl |
| | | delete this.addInfo.updateUserer |
| | | delete this.addInfo.sendUserName |
| | | let addInfo = this.HaveJson(this.addInfo) |
| | | addInfo.signatory = addInfo.signatory.join(',') |
| | | if (this.title == 'æ°å¢') { |
| | | addProcessReport(addInfo).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } else { |
| | | doProcessReport(addInfo).then(res => { |
| | | this.addLoading = false |
| | | if (res.code == 201) { |
| | | return |
| | | } |
| | | this.addDialogVisible = false |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æä½æå!' |
| | | }); |
| | | this.refreshTable() |
| | | }).catch(err => { }) |
| | | } |
| | | }, |
| | | handleWork(row) { |
| | | this.title = 'ä¿®æ¹' |
| | | this.addInfo = row |
| | | console.log(this.addInfo) |
| | | this.addInfo.signatory = this.addInfo.signatory ? this.addInfo.signatory.split(',').map(m => Number(m)) : [] |
| | | this.addDialogVisible = true; |
| | | }, |
| | | handleChangeTask(list) { |
| | | this.mutilSelect = list |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_thing { |
| | | width: 350px; |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 110px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 110px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | } |
| | | |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | .tables td { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | } |
| | | |
| | | .en { |
| | | font-size: 12px; |
| | | word-break: break-word; |
| | | /* èªå¨æè¡ */ |
| | | overflow-wrap: break-word; |
| | | /* 鲿¢æº¢åº */ |
| | | white-space: normal; |
| | | /* é»è®¤æ¢è¡ */ |
| | | } |
| | | </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"></lims-table> |
| | | </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>--> |
| | | <!-- <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> |
| | |
| | | }, |
| | | methods: { |
| | | async getTableData() { |
| | | const res = await getPageAcceptance(this.form); |
| | | if(res.code === 200){ |
| | | const res = await getPageAcceptance(this.form); |
| | | if (res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | |
| | | }, |
| | | async submit(form) { |
| | | |
| | | const {code} = await form.acceptance.id ? updateAcceptanc(this.form):addAcceptance((this.form)); |
| | | if(code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾':'æ·»å '}æå`) |
| | | const { code } = await form.acceptance.id ? updateAcceptanc(this.form) : addAcceptance((this.form)); |
| | | if (code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾' : 'æ·»å '}æå`) |
| | | this.getTableData() |
| | | } |
| | | }, |
| | |
| | | url: getAcceptanceDetails, |
| | | params: { id } |
| | | }) |
| | | if(code == 200) { |
| | | if (code == 200) { |
| | | return data; |
| | | } |
| | | }, |
| | |
| | | url: `${exportAcceptance}`, |
| | | responseType: "blob" |
| | | }) |
| | | const blob = new Blob([res], {type: 'application/octet-stream'}); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æ åç©è´¨éªæ¶.xlsx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'æ åç©è´¨éªæ¶.xlsx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨éªæ¶.xlsx'); |
| | | }, |
| | | |
| | | // å页忢 |
| | |
| | | let url = ''; |
| | | if (row.type == 1) { |
| | | url = this.javaApi + '/img/' + row.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | } else { |
| | | url = this.javaApi + '/word/' + row.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | }, |
| | | // å é¤å®¢æ·åæéä»¶ |
| | |
| | | exportManageDocumentIssueRecycle(this.queryParams).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | // this.$download.saveAs(blob, 'åæ¾åæ¶è®°å½.xlsx') |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'åæ¾åæ¶è®°å½.xlsx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'åæ¾åæ¶è®°å½.xlsx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, 'åæ¾åæ¶è®°å½.xlsx'); |
| | | }) |
| | | }, |
| | | changeFileList(e) { |
| | |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è¯å®¡è®¡å.docx'; |
| | | link.click(); |
| | | this.$download.saveAs(blob, name) |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è¯å®¡è®¡å.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, 'è¯å®¡è®¡å.docx'); |
| | | }) |
| | | }, |
| | | lookFile(url, name) { |
| | |
| | | handleDown0(url, name) { |
| | | if (!url) return this.$message.warning('æä»¶æªä¸ä¼ ') |
| | | let url0 = this.javaApi + '/word/' + url |
| | | const link = document.createElement('a'); |
| | | link.href = url0; |
| | | link.target = '_blank'; |
| | | link.click(); |
| | | this.$download.saveAs(url0, name); |
| | | } |
| | | } |
| | | }; |
| | |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä¼è®®è®°å½.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'ä¼è®®è®°å½.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, 'ä¼è®®è®°å½.docx'); |
| | | }) |
| | | }, |
| | | } |
| | |
| | | return |
| | | } |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | //å°Blob å¯¹è±¡è½¬æ¢æå符串 |
| | | let reader = new FileReader(); |
| | | reader.readAsText(blob, 'utf-8'); |
| | | reader.onload = () => { |
| | | try { |
| | | let result = JSON.parse(reader.result); |
| | | if (result.message) { |
| | | this.$message.error(result.message); |
| | | } else { |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è¯å®¡æ¥å.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } catch (err) { |
| | | console.log(err); |
| | | const url = URL.createObjectURL(blob); |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = 'è¯å®¡æ¥å.docx'; |
| | | link.click(); |
| | | this.$message.success('å¯¼åºæå') |
| | | } |
| | | } |
| | | this.$download.saveAs(blob, 'è¯å®¡æ¥å.docx'); |
| | | }) |
| | | }, |
| | | submit(type, row) { |
| | |
| | | }, |
| | | // ä¸è½½æ¥å |
| | | download(row) { |
| | | let url = (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | let url = this.javaApi+'/word/' + (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | this.$download.saveAs(url, row.fileName); |
| | | }, |
| | | // è¿åæä½ |
| | | handleRestore(row) { |
| | |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | |
| | | let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, } |
| | | delete entity.orderBy |
| | | this.outLoading = true |
| | | rawAllExport({ |
| | | entity: entity |
| | | }, { responseType: "blob" }).then(res => { |
| | | rawAllExport({entity: entity}).then(res => { |
| | | this.outLoading = false |
| | | 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(); |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, 'åæææ£æµä¿¡æ¯å¯¼åº.xlsx'); |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹å§æç¼å·ä¿¡æ¯ |
| | |
| | | methods: { |
| | | // è¿åæ£éªæ¥åä¸è½½ |
| | | downLoad0 () { |
| | | let url = this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | } |
| | | let url = this.javaApi+'/word/' + this.downLoadInfo.enterUrlS ? this.downLoadInfo.enterUrlS : this.downLoadInfo.enterUrl |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | }, |
| | | // å£åº¦æ£éªæ¥åä¸è½½ |
| | | downLoad1 () { |
| | | let url = this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | } |
| | | let url = this.javaApi+'/word/' + this.downLoadInfo.quarterUrlS ? this.downLoadInfo.quarterUrlS : this.downLoadInfo.quarterUrl |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | } |
| | | }, |
| | | } |
| | |
| | | let url = ''; |
| | | if (res.data.type == 1) { |
| | | url = this.javaApi + '/img/' + res.data.fileUrl |
| | | file.downloadIamge(url, row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | } else { |
| | | url = this.javaApi + '/word/' + res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | |
| | | }, |
| | | // 导åºè®°å½ |
| | | downLoad () { |
| | | rawAllInsOrderExport({...this.entity, responseType: "blob"}).then(res => { |
| | | rawAllInsOrderExport({...this.entity}).then(res => { |
| | | 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(); |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, 'å§ææ£æµä¿¡æ¯å¯¼åº.xlsx'); |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | }) |
| | |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | |
| | | }, |
| | | // ä¸è½½æ¥å |
| | | download(row) { |
| | | let url = row.urlS?row.urlS:row.url; |
| | | let url = this.javaApi+'/word/' + row.urlS?row.urlS:row.url; |
| | | if(url){ |
| | | url = url.split('.')[0]+'.pdf' |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | this.$download.saveAs(url, this.downLoadInfo.fileName); |
| | | } |
| | | }, |
| | | // æ¤é |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="quarterSampleDia" title="å£åº¦æ½æ ·" width="90%" @close="quarterSampleDia = false"> |
| | | <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> |
| | | <div style="width: 30%;display: flex;align-items: center;" > |
| | | <span style="width: 50px">ç¼å·ï¼</span> |
| | | <el-input v-model="quarterSampleForm.quarterNo" :disabled="operationType !== 'add'" size="small"></el-input> |
| | | </div> |
| | | <div v-if="operationType === 'add'"> |
| | | <el-button size="small" type="primary" @click="addQuarter">æ·»å </el-button> |
| | | <el-button size="small" type="danger" @click="clearTable">æ¸
空</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-table v-loading="tableLoading" :data="quarterItems" border height="400" style="width: 100%"> |
| | | <el-table-column label="产åç±»å" prop="productType" width="200"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.productType" size="small"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="责任人" prop="dutyUser" width="100"></el-table-column> |
| | | <el-table-column label="åå·" prop="productModel" width="120"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.productModel" size="small" :disabled="operationType === 'view'"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ½æ ·æ°é" min-width="340" prop="spotCheckNumber"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.spotCheckNumber" size="small" :disabled="operationType === 'view'"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType === 'add'" label="æ°é" min-width="120" prop="number"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.number" size="small" :disabled="operationType === 'view'"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'add'" label="æ½æ ·æ¶é´" prop="spotCheckTime" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-date-picker v-model="row.spotCheckTime" |
| | | format="yyyy-MM-dd" |
| | | :disabled="operationType === 'view'" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | clearable |
| | | style="width:100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'add'" label="è¯æ ·ç»è®º" prop="result" width="130"> |
| | | <template v-slot="scope"> |
| | | <el-select v-model="scope.row.result" placeholder="è¯·éæ©" size="small" clearable :disabled="operationType === 'view'"> |
| | | <el-option label="åæ ¼" value="åæ ¼"></el-option> |
| | | <el-option label="ä¸åæ ¼" value="ä¸åæ ¼"></el-option> |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'add'" label="åæ ·äººå" prop="samplingUser" width="120"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.samplingUser" size="small" :disabled="operationType === 'view'"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="夿³¨" prop="itemRemark" width="200"> |
| | | <template slot-scope="{row}"> |
| | | <template> |
| | | <el-input v-model="row.itemRemark" size="small" :disabled="operationType === 'view'"/> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'view'" fixed="right" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="deleteScope(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin: 10px 0"> |
| | | <span style="width: 70px">夿³¨ï¼</span> |
| | | <el-input v-model="quarterSampleForm.remark" :disabled="operationType === 'view'" size="small" style="width: 43%" type="textarea"></el-input> |
| | | </div> |
| | | <div v-if="operationType !== 'add'"> |
| | | <el-form ref="form" :model="editForm" label-width="70px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å¶äººï¼"> |
| | | <el-select v-model="editForm.writeUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼ç¾äººï¼"> |
| | | <el-select v-model="editForm.countersignUser" :disabled="operationType !=='edit'" multiple placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸äººï¼"> |
| | | <el-select v-model="editForm.examineUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¹å人ï¼"> |
| | | <el-select v-model="editForm.ratifyUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="quarterSampleDia = false">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'add'" @click="quarterSampleDia = false">ä¿ å</el-button> |
| | | <el-button v-if="operationType !== 'add' && operationType !== 'view'" type="primary" @click="handleSample">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {addQuarter, getQuarter, updateQuarterOnOrder} from "@/api/business/productSamplingInfo"; |
| | | import {selectUserCondition} from "@/api/performance/class"; |
| | | |
| | | export default { |
| | | name: "addQuarterItem", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | tableLoading: false, |
| | | quarterSampleDia: false, // å£åº¦æ½æ ·å¼¹æ¡ |
| | | quarterSampleForm: { |
| | | quarterNo: '', // ç¼å· |
| | | }, |
| | | quarterItems: [], |
| | | quarterTemItems: [], |
| | | operationType: '', |
| | | editForm: { |
| | | quarterId: '', |
| | | writeUser: '', // ç¼å¶äºº |
| | | countersignUser: [], // ä¼ç¾äºº |
| | | examineUser: '', // å®¡æ ¸äºº |
| | | ratifyUser: '', // æ¹å人 |
| | | }, |
| | | userList: [], |
| | | quarterRow: {}, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getUserList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDia (quarterTemItems, type) { |
| | | this.quarterSampleDia = true |
| | | this.operationType = type |
| | | if (type === 'add') { |
| | | if (quarterTemItems.length > 0) { |
| | | this.quarterItems = quarterTemItems |
| | | } |
| | | this.quarterSampleForm.quarterNo = getCurrentMonthTwoDigits() |
| | | } else { |
| | | this.tableLoading = true |
| | | this.quarterRow = quarterTemItems |
| | | getQuarter({quarterId: quarterTemItems.quarterId}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.quarterItems = res.data.quarterItems |
| | | this.quarterSampleForm.quarterNo = res.data.quarterNo |
| | | this.quarterSampleForm.remark = res.data.remark |
| | | this.editForm.quarterId = res.data.quarterId |
| | | this.editForm.writeUser = res.data.writeUser |
| | | this.editForm.examineUser = res.data.examineUser |
| | | this.editForm.ratifyUser = res.data.ratifyUser |
| | | if (res.data.countersignUser) { |
| | | this.editForm.countersignUser = res.data.countersignUser.split(",").map(Number) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | // æå¨æ·»å |
| | | addQuarter () { |
| | | this.quarterItems.push({ |
| | | productType: '', |
| | | dutyUser: JSON.parse(localStorage.getItem("user")).name, |
| | | productModel: '', |
| | | spotCheckNumber: '', |
| | | number: '', |
| | | spotCheckTime: '', |
| | | result: '', |
| | | samplingUser: '', |
| | | itemRemark: '', |
| | | }) |
| | | }, |
| | | // æäº¤å£åº¦æ½æ · |
| | | handleSample () { |
| | | this.$confirm('æ¯å¦æäº¤è¯¥æ°æ®', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | if (this.operationType === 'add') { |
| | | this.quarterSampleForm.quarterItems = JSON.parse(JSON.stringify(this.quarterItems)) |
| | | this.quarterSampleForm.quarterItems.forEach(item => { |
| | | item.spotCheckNumber = item.spotCheckNumber + ' ' + (item.number == null ? "" : item.number) |
| | | }) |
| | | addQuarter(this.quarterSampleForm).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.quarterItems = [] |
| | | this.$parent.quarterTemItems = [] |
| | | this.closeQuarterSampleDia() |
| | | } |
| | | }) |
| | | } else { |
| | | const params = {...this.editForm} |
| | | if (params.countersignUser.length > 0) { |
| | | params.countersignUser = params.countersignUser.join(',') |
| | | } else { |
| | | params.countersignUser = '' |
| | | } |
| | | params.quarterItems = JSON.parse(JSON.stringify(this.quarterItems)) |
| | | updateQuarterOnOrder(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.quarterItems = [] |
| | | this.closeQuarterSampleDia() |
| | | } |
| | | }) |
| | | } |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶' |
| | | }); |
| | | }); |
| | | |
| | | }, |
| | | // æ¸
ç©ºæ½æ ·è®¡å |
| | | clearTable () { |
| | | this.quarterItems = [] |
| | | this.$parent.quarterTemItems = [] |
| | | }, |
| | | // æå¨å é¤ |
| | | deleteScope (index) { |
| | | this.quarterItems.splice(index, 1) |
| | | }, |
| | | // å
³éå£åº¦æ½æ ·å¼¹æ¡ |
| | | closeQuarterSampleDia () { |
| | | this.quarterSampleDia = false |
| | | if (this.operationType === 'add') { |
| | | this.$parent.handleStockList() |
| | | } else { |
| | | this.$parent.refreshTable() |
| | | } |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | function getCurrentMonthTwoDigits() { |
| | | const currentDate = new Date(); |
| | | const year = currentDate.getFullYear(); |
| | | const currentMonth = currentDate.getMonth() + 1; |
| | | return year + currentMonth.toString().padStart(2, '0'); |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="ç¼å·" prop="quarterNo" v-show="tabIndex === 0"> |
| | | <el-input v-model="entity.quarterNo" clearable placeholder="请è¾å
¥" |
| | | size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button v-if="tabIndex === 1" size="small" type="primary" @click="yearSample('add')">å¹´åº¦æ½æ ·</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <div class="table"> |
| | | <ul class="tab"> |
| | | <li v-for="(m,i) in tabList" :key="i" :class="{active:i===tabIndex}" @click="handleTab(m,i)">{{m.label}}</li> |
| | | </ul> |
| | | <!--å£åº¦--> |
| | | <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" |
| | | @pagination="pagination" :height="'calc(100vh - 290px)'" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <!--年度--> |
| | | <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" |
| | | @pagination="pagination1" :height="'calc(100vh - 290px)'" |
| | | key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> |
| | | </div> |
| | | </div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" :visible.sync="yearSampleDia" title="å¹´åº¦æ½æ ·" width="70%" |
| | | @close="closeYearSampleDia"> |
| | | <div style="display: flex;align-items: center;justify-content: space-between;margin-bottom: 10px"> |
| | | <div style="width: 30%;display: flex;align-items: center;" > |
| | | <el-input v-if="operationType !=='view'" v-model="currentYear" size="small"/> |
| | | <span v-if="operationType ==='view'" style="width: 160px;font-size: 18px;font-weight: 600">{{currentYear}}</span> |
| | | </div> |
| | | <div v-if="operationType !== 'view'"> |
| | | <el-button size="small" type="primary" @click="addQuarter">æ·»å </el-button> |
| | | <el-button size="small" type="danger" @click="clearTable">æ¸
空</el-button> |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <el-table :data="yearItems" border height="450" style="width: 100%"> |
| | | <el-table-column label="ç±»å«" prop="yearType" width="240"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.yearType" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.yearType}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="1" prop="january" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.january" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.january}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="2" prop="february" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.february" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.february}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="3" prop="march" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.march" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.march}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="4" prop="april" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.april" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.april}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="5" prop="may" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.may" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.may}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="6" prop="june" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.june" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.june}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="7" prop="july" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.july" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.july}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="8" prop="august" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.august" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.august}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="9" prop="september" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.september" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.september}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="10" prop="october" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.october" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.october}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="11" prop="november" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.november" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.november}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column header-align="center" label="12" prop="december" width="160"> |
| | | <template slot-scope="{row}"> |
| | | <template v-if="operationType !== 'view'"> |
| | | <el-input v-model="row.december" size="small" type="textarea" :rows="4"/> |
| | | </template> |
| | | <template v-else> |
| | | <span size="small">{{row.december}}</span> |
| | | </template> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="operationType !== 'view'" fixed="right" label="æä½" width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" style="color: #f56c6c" type="text" @click="deleteScope(scope.$index)">å é¤</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin-top: 10px"> |
| | | <span style="width: 70px">注æäºé¡¹ï¼</span> |
| | | <el-input v-model="yearSampleForm.tableRemark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> |
| | | </div> |
| | | <div style="display: flex;align-items: center;margin-top: 10px"> |
| | | <span style="width: 70px">夿³¨ï¼</span> |
| | | <el-input v-model="yearSampleForm.remark" :disabled="operationType === 'view'" size="small" style="width: 50%" type="textarea"></el-input> |
| | | </div> |
| | | <div v-if="operationType !== 'add'"> |
| | | <el-form ref="form" :model="editYearFormRow" label-width="70px"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å¶äººï¼"> |
| | | <el-select v-model="editYearFormRow.writeUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼ç¾äººï¼"> |
| | | <el-select v-model="editYearFormRow.countersignUser" :disabled="operationType !=='edit'" multiple placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®¡æ ¸äººï¼"> |
| | | <el-select v-model="editYearFormRow.examineUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¹å人ï¼"> |
| | | <el-select v-model="editYearFormRow.ratifyUser" :disabled="operationType !=='edit'" placeholder="è¯·éæ©" size="small" style="width: 100%"> |
| | | <el-option v-for="item in userList" :key="item.id" :label="item.name" :value="item.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearSampleDia">å æ¶</el-button> |
| | | <el-button v-if="operationType !== 'view'" type="primary" @click="handleSample">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <add-quarter-item ref="addQuarterItem"></add-quarter-item> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import AddQuarterItem from "./components/addQuarterItem.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | addSpotCheckYear, |
| | | deleteQuarter, deleteSpotCheckYear, |
| | | finalReportQuarter, |
| | | finalReportSpotCheckYear, |
| | | getQuarterPage, getSpotCheckYear, getSpotCheckYearPage, updateSpotCheckYear |
| | | } from "@/api/business/productSamplingInfo"; |
| | | import {selectUserCondition} from "@/api/performance/class"; |
| | | |
| | | export default { |
| | | name: "b1-product-sampling-info", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {limsTable, AddQuarterItem}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | upIndex: 0, |
| | | tabIndex: 0, |
| | | tabList: [ |
| | | { |
| | | label: 'å£åº¦', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: '年度', |
| | | value: 1 |
| | | }, |
| | | ], |
| | | entity: { |
| | | quarterNo: null, |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | {label: 'ç¼å·', prop: 'quarterNo'}, |
| | | {label: '夿³¨', prop: 'remark'}, |
| | | {label: 'å建人', prop: 'createUserName'}, |
| | | {label: 'å建æ¶é´', prop: 'createTime'}, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editForm(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewQuarterInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.deleteQuarterInfo(row); |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total:0, |
| | | size:10, |
| | | current:1 |
| | | }, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | { label: 'åç§°', prop: 'yearHead' }, |
| | | { label: 'å建人', prop: 'createUserName' }, |
| | | { label: 'å建æ¶é´', prop: 'createTime' }, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.editYearForm(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewYearInfo(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.download(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.deleteYearInfo(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page1: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | yearSampleDia: false, // å¹´åº¦æ½æ · |
| | | yearSampleForm: { |
| | | tableRemark: '', |
| | | remark: '' |
| | | }, |
| | | yearItems: [], |
| | | currentYear: '', |
| | | operationType: '', |
| | | userList: [], |
| | | yearRow: {}, |
| | | editYearFormRow: { |
| | | yearId: '', |
| | | writeUser: '', // ç¼å¶äºº |
| | | countersignUser: null, // ä¼ç¾äºº |
| | | examineUser: '', // å®¡æ ¸äºº |
| | | ratifyUser: '', // æ¹å人 |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æ¥è¯¢åè° |
| | | refreshTable(e) { |
| | | if (this.tabIndex === 0) { |
| | | this.getQuarterPageList() |
| | | } else if (this.tabIndex === 1) { |
| | | this.getSpotCheckYearPageList() |
| | | } |
| | | }, |
| | | getQuarterPageList () { |
| | | this.tableLoading = true |
| | | getQuarterPage({ |
| | | ...this.page,...this.entity |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | this.page.total = res.data.total |
| | | this.tableData = res.data.records |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | getSpotCheckYearPageList () { |
| | | this.tableLoading1 = true |
| | | getSpotCheckYearPage({ |
| | | ...this.page1 |
| | | }).then(res => { |
| | | this.tableLoading1 = false |
| | | this.page1.total = res.data.total |
| | | this.tableData1 = res.data.records |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable() |
| | | }, |
| | | pagination (page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination1 (page) { |
| | | this.page1.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | // ç¼è¾å£åº¦æ½æ · |
| | | editForm (row) { |
| | | this.$refs.addQuarterItem.openDia(row, 'edit') |
| | | }, |
| | | // æ¥çå£åº¦æ½æ · |
| | | viewQuarterInfo (row) { |
| | | this.$refs.addQuarterItem.openDia(row, 'view') |
| | | }, |
| | | // å é¤å£åº¦æ½æ · |
| | | deleteQuarterInfo (row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteQuarter({quarterId: row.quarterId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // å¯¼åº |
| | | handleDown (row) { |
| | | let randomNum = Math.random(); |
| | | finalReportQuarter({quarterId: row.quarterId, random: randomNum}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'å£åº¦æ½æ ·ä¿¡æ¯å¯¼åº.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // 年度ä¸è½½ |
| | | download(row) { |
| | | finalReportSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, row.yearHead + '.docx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // å é¤å¹´åº¦æ½æ · |
| | | deleteYearInfo (row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | deleteSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | }).catch(() => {}) |
| | | }, |
| | | // æ¥ç年度详æ
|
| | | viewYearInfo (row) { |
| | | this.operationType = 'view' |
| | | this.getUserList() |
| | | this.yearSampleDia = true |
| | | this.yearRow = row |
| | | getSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.currentYear = res.data.yearHead |
| | | this.yearItems = res.data.yearItems |
| | | this.yearSampleForm.tableRemark = res.data.tableRemark |
| | | this.yearSampleForm.remark = res.data.remark |
| | | this.editYearFormRow.yearId = res.data.yearId |
| | | this.editYearFormRow.writeUser = res.data.writeUser |
| | | this.editYearFormRow.examineUser = res.data.examineUser |
| | | this.editYearFormRow.ratifyUser = res.data.ratifyUser |
| | | if (res.data.countersignUser) { |
| | | this.editYearFormRow.countersignUser = res.data.countersignUser.split(",").map(Number) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // ç¼è¾å¹´åº¦æ½æ · |
| | | editYearForm (row) { |
| | | this.operationType = 'edit' |
| | | this.getUserList() |
| | | this.yearSampleDia = true |
| | | getSpotCheckYear({yearId: row.yearId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.currentYear = res.data.yearHead |
| | | this.yearItems = res.data.yearItems |
| | | this.yearSampleForm.tableRemark = res.data.tableRemark |
| | | this.yearSampleForm.remark = res.data.remark |
| | | this.editYearFormRow.yearId = res.data.yearId |
| | | this.editYearFormRow.writeUser = res.data.writeUser |
| | | this.editYearFormRow.examineUser = res.data.examineUser |
| | | this.editYearFormRow.ratifyUser = res.data.ratifyUser |
| | | if (res.data.countersignUser) { |
| | | this.editYearFormRow.countersignUser = res.data.countersignUser.split(",").map(Number) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // æäº¤å¹´åº¦è®¡å |
| | | handleSample () { |
| | | if (this.operationType === 'add') { |
| | | this.yearSampleForm.yearItems = JSON.parse(JSON.stringify(this.yearItems)) |
| | | this.yearSampleForm.yearHead = this.currentYear |
| | | addSpotCheckYear(this.yearSampleForm).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('æäº¤æå') |
| | | this.yearSampleForm = {} |
| | | this.yearItems = [] |
| | | this.closeYearSampleDia() |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } else { |
| | | const params = {...this.editYearFormRow} |
| | | if (params.countersignUser != null) { |
| | | params.countersignUser = params.countersignUser.join(',') |
| | | } |
| | | params.yearItems = JSON.parse(JSON.stringify(this.yearItems)) |
| | | params.tableRemark = this.yearSampleForm.tableRemark |
| | | params.remark = this.yearSampleForm.remark |
| | | updateSpotCheckYear(params).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.yearSampleForm = {} |
| | | this.editYearFormRow = { |
| | | yearId: '', |
| | | writeUser: '', // ç¼å¶äºº |
| | | countersignUser: [], // ä¼ç¾äºº |
| | | examineUser: '', // å®¡æ ¸äºº |
| | | ratifyUser: '', // æ¹å人 |
| | | } |
| | | this.yearItems = [] |
| | | this.closeYearSampleDia() |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | yearSample (type) { |
| | | this.operationType = type |
| | | const currentDate = new Date(); |
| | | this.yearSampleDia = true |
| | | this.currentYear = currentDate.getFullYear() + 'å¹´å¹´åº¦æ½æ£è®¡å' |
| | | }, |
| | | // æ·»å 年度计å |
| | | addQuarter () { |
| | | this.yearItems.push({}) |
| | | }, |
| | | // æ¸
ç©ºæ½æ ·è®¡å |
| | | clearTable () { |
| | | this.yearItems = [] |
| | | }, |
| | | // æå¨å é¤ |
| | | deleteScope (index) { |
| | | this.yearItems.splice(index, 1) |
| | | }, |
| | | // 忢ä¸åtabè¡¨æ ¼ |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | if (this.tabIndex === 0) { |
| | | this.componentData.entity.quarterNo = this.entity.quarterNo |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | closeYearSampleDia () { |
| | | this.yearSampleForm = { |
| | | tableRemark: '', |
| | | remark: '' |
| | | } |
| | | this.yearItems = [] |
| | | this.yearSampleDia = false |
| | | }, |
| | | getStyle(){ |
| | | return 'height: calc(100% - '+'44'+'px)' |
| | | }, |
| | | getUserList(){ |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | this.userList = res.data; |
| | | }) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | margin-top: 0; |
| | | padding-left: 0; |
| | | } |
| | | |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #EEEEEE; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(2) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3A7BFA; |
| | | color: #3A7BFA; |
| | | } |
| | | </style> |
| | |
| | | this.outLoading = true |
| | | rawAllExport({ |
| | | entity:entity |
| | | },{ |
| | | responseType: "blob"}).then(res => { |
| | | }).then(res => { |
| | | this.outLoading = false |
| | | 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(); |
| | | let url = this.javaApi + '/word/' + res.data |
| | | this.$download.saveAs(url, "åæææ£æµä¿¡æ¯å¯¼åº.xlsx"); |
| | | }) |
| | | }, |
| | | clear() { |
| | |
| | | :on-success="handleSuccessUp1" |
| | | :show-file-list="false" |
| | | accept='.doc,.docx'> |
| | | <el-button size="small" type="text" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName">ä¸ä¼ </el-button> |
| | | <el-button size="small" type="text" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName">ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handleRestore(scope.row)">è¿å</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">éåä»»å¡</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || userName !== scope.row.writeUserName" @click="handle(scope.row)">æäº¤</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || userName !== scope.row.examineUser" @click="handleIssued(scope.row)">å®¡æ ¸</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || userName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">æ¹å</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handleRestore(scope.row)">è¿å</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="sendBackTask(scope.row)">éåä»»å¡</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state != 0 || nickName !== scope.row.writeUserName" @click="handle(scope.row)">æäº¤</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 ||scope.row.isExamine == 1 || nickName !== scope.row.examineUser" @click="handleIssued(scope.row)">å®¡æ ¸</el-button> |
| | | <el-button type="text" size="small" :disabled="scope.row.state == null || scope.row.state == 0 || scope.row.isExamine == 0 || scope.row.isExamine == null || scope.row.isRatify == 1 || nickName !== scope.row.ratifyUser" @click="handleApprove(scope.row)">æ¹å</el-button> |
| | | <el-popover placement="bottom" trigger="hover" style="margin-left: 6px"> |
| | | <template #reference> |
| | | <el-button link type="text" size="small">æ´å¤</el-button> |
| | |
| | | let url = ''; |
| | | if(res.data.type==1){ |
| | | url = this.javaApi+'/img/'+res.data.fileUrl |
| | | file.downloadIamge(url,row.fileName) |
| | | this.$download.saveAs(url, row.fileName); |
| | | }else{ |
| | | url = this.javaApi+'/word/'+res.data.fileUrl |
| | | const link = document.createElement('a'); |
| | | link.href = url; |
| | | link.download = row.fileName; |
| | | link.click(); |
| | | this.$download.saveAs(url, row.fileName); |
| | | } |
| | | } |
| | | }).catch(error => { |
| | |
| | | downAll({ids: str}).then(res => { |
| | | this.outLoading = false |
| | | 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 = 'æ¥å.zip'; |
| | | // link.click(); |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + res.message; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | this.$download.saveAs(this.javaApi + res.message, row.fileName); |
| | | }) |
| | | }, |
| | | beforeUpload(file){ |
| | |
| | | } |
| | | }, |
| | | download(row) { |
| | | let url = row.urlS ? row.urlS : row.url; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | let url = this.javaApi+'/word/' + row.urlS ? row.urlS : row.url; |
| | | this.$download.saveAs(url, row.fileName); |
| | | }, |
| | | // è¿åæä½ |
| | | handleRestore(row) { |
| | |
| | | <div> |
| | | <el-form :model="queryParams" ref="queryForm" size="small" :inline="true"> |
| | | <el-form-item label="èµè´¨åç§°" prop="name"> |
| | | <el-select |
| | | v-model="queryParams.name" |
| | | placeholder="éæ©èµè´¨åç§°" |
| | | size="small" |
| | | @change="refreshTable()" |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.cnas_method_qualification" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | > |
| | | <el-select v-model="queryParams.name" placeholder="éæ©èµè´¨åç§°" size="small" @change="refreshTable()"> |
| | | <el-option v-for="dict in dict.type.cnas_method_qualification" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | {{ dict.label }} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | icon="el-icon-search" |
| | | size="mini" |
| | | @click="refreshTable" |
| | | >æ¥ è¯¢</el-button |
| | | > |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh" |
| | | >é ç½®</el-button |
| | | > |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="refreshTable">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="refresh">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="text-align: left"> |
| | | <el-radio-group |
| | | v-model="radio" |
| | | @input="selectorSwitch" |
| | | size="medium" |
| | | fill="#409EFF" |
| | | > |
| | | <el-radio-group v-model="radio" @input="selectorSwitch" size="medium" fill="#409EFF"> |
| | | <el-radio-button :label="0">èµè´¨æç»</el-radio-button> |
| | | <el-radio-button :label="1">èµè´¨æ»è§</el-radio-button> |
| | | </el-radio-group> |
| | | </el-col> |
| | | <el-col :span="12" style="text-align: right" v-if="radio === 0"> |
| | | <el-button size="small" type="primary" @click="openAdd" |
| | | >èµè´¨æ´æ°</el-button |
| | | > |
| | | <el-button size="small" icon="el-icon-delete" @click="handleDel" |
| | | >å é¤</el-button |
| | | > |
| | | <el-button size="small" type="primary" @click="openAdd">èµè´¨æ´æ°</el-button> |
| | | <el-button size="small" icon="el-icon-delete" @click="handleDel">å é¤</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div v-if="radio === 0"> |
| | | <lims-table |
| | | :tableData="tableData" |
| | | :column="column" |
| | | :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" |
| | | @pagination="pagination" |
| | | :height="'calc(100vh - 300px)'" |
| | | :page="page" |
| | | :tableLoading="tableLoading" |
| | | ></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" :isSelection="true" |
| | | :handleSelectionChange="handleSelectionChange" @pagination="pagination" :height="'calc(100vh - 300px)'" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <div |
| | | class="table" |
| | | v-if="radio === 1" |
| | | v-loading="pageLoading" |
| | | @scroll="scrollFn" |
| | | > |
| | | <div class="table" v-if="radio === 1" v-loading="pageLoading" @scroll="scrollFn"> |
| | | <el-row :gutter="16"> |
| | | <el-col |
| | | :span="8" |
| | | v-for="(m, i) in list" |
| | | :key="i" |
| | | :xs="24" |
| | | :sm="12" |
| | | :md="8" |
| | | :lg="8" |
| | | :xl="6" |
| | | style="margin-bottom: 16px" |
| | | > |
| | | <el-col :span="8" v-for="(m, i) in list" :key="i" :xs="24" :sm="12" :md="8" :lg="8" :xl="6" |
| | | style="margin-bottom: 16px"> |
| | | <div class="table-item"> |
| | | <el-image |
| | | style=" |
| | | <el-image style=" |
| | | width: 102px; |
| | | height: 102px; |
| | | margin-right: 20px; |
| | | border-radius: 16px; |
| | | " |
| | | :src="javaApi + '/img/' + m.imageUrl" |
| | | > |
| | | <div |
| | | slot="error" |
| | | class="image-error" |
| | | style=" |
| | | " :src="javaApi + '/img/' + m.imageUrl"> |
| | | <div slot="error" class="image-error" style=" |
| | | width: 100px; |
| | | height: 100px; |
| | | border-radius: 16px; |
| | |
| | | align-items: center; |
| | | justify-content: center; |
| | | border: 1px solid #eeeeee; |
| | | " |
| | | > |
| | | <i |
| | | class="el-icon-picture-outline" |
| | | style="font-size: 30px; color: #666666" |
| | | ></i> |
| | | "> |
| | | <i class="el-icon-picture-outline" style="font-size: 30px; color: #666666"></i> |
| | | </div> |
| | | </el-image> |
| | | <div |
| | | class="table-item-right" |
| | | style="flex: 1; font-size: 12px; color: #666666" |
| | | > |
| | | <div class="table-item-right" style="flex: 1; font-size: 12px; color: #666666"> |
| | | <p style="line-height: 26px"> |
| | | èµè´¨åç§°ï¼<span style="color: #3a7bfa">{{ m.name }}</span> |
| | | </p> |
| | |
| | | <p style="line-height: 26px">å°ææ¶é´ï¼{{ m.expireTime }}</p> |
| | | <p> |
| | | <span>ç¶æï¼</span> |
| | | <el-tag |
| | | :type="m.state === 0 ? 'danger' : 'success'" |
| | | size="small" |
| | | >{{ m.state === 0 ? "失æ" : "ææ" }}</el-tag |
| | | > |
| | | <el-tag :type="m.state === 0 ? 'danger' : 'success'" size="small">{{ m.state === 0 ? "失æ" : "ææ" |
| | | }}</el-tag> |
| | | </p> |
| | | </div> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <div |
| | | v-if="list.length < 1 && !pageLoading && !isLoding" |
| | | style=" |
| | | <div v-if="list.length < 1 && !pageLoading && !isLoding" style=" |
| | | color: #909399; |
| | | font-size: 14px; |
| | | text-align: center; |
| | | margin-top: 200px; |
| | | " |
| | | > |
| | | "> |
| | | ææ æ°æ® |
| | | </div> |
| | | <div v-if="list.length > 0"> |
| | | <el-button |
| | | v-if="isLoding" |
| | | type="text" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | > |
| | | <el-button v-if="isLoding" type="text" style="display: flex; margin: 0 auto; color: #909399"> |
| | | <i class="el-icon-loading" style="font-size: 20px"></i> |
| | | </el-button> |
| | | <el-button |
| | | type="text" |
| | | v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399" |
| | | >å·²ç»æ²¡ææ´å¤å¦~</el-button |
| | | > |
| | | <el-button type="text" v-if="finishLoding" |
| | | style="display: flex; margin: 0 auto; color: #909399">å·²ç»æ²¡ææ´å¤å¦~</el-button> |
| | | </div> |
| | | </div> |
| | | <el-dialog |
| | | title="èµè´¨æ´æ°" |
| | | :visible.sync="qualificationsConnectVisible" |
| | | width="400px" |
| | | > |
| | | <el-form |
| | | ref="formDataRef" |
| | | :model="formData" |
| | | label-position="right" |
| | | :rules="formDataRules" |
| | | label-width="78px" |
| | | > |
| | | <el-dialog title="èµè´¨æ´æ°" :visible.sync="qualificationsConnectVisible" width="400px"> |
| | | <el-form ref="formDataRef" :model="formData" label-position="right" :rules="formDataRules" label-width="78px"> |
| | | <el-form-item label="èµè´¨åç§°" prop="name"> |
| | | <el-select |
| | | v-model="formData.name" |
| | | placeholder="è¯·éæ©" |
| | | style="width: 100%" |
| | | size="small" |
| | | clearable |
| | | > |
| | | <el-option |
| | | v-for="dict in dict.type.cnas_method_qualification" |
| | | :key="dict.value" |
| | | :label="dict.label" |
| | | :value="dict.value" |
| | | > |
| | | <el-select v-model="formData.name" placeholder="è¯·éæ©" style="width: 100%" size="small" clearable> |
| | | <el-option v-for="dict in dict.type.cnas_method_qualification" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | {{ dict.label }} |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨ç¼ç " prop="code"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.code" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="formData.code"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¢åæºæ" prop="organization"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.organization" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="formData.organization"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨è¯´æ" prop="explanation"> |
| | | <el-input |
| | | size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | v-model="formData.explanation" |
| | | ></el-input> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="formData.explanation"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¢åæ¶é´" prop="dateOfIssuance"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData.dateOfIssuance" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | <el-date-picker style="width: 100%" v-model="formData.dateOfIssuance" type="datetime" size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" clearable placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="å°ææ¶é´" prop="expireTime"> |
| | | <el-date-picker |
| | | style="width: 100%" |
| | | v-model="formData.expireTime" |
| | | type="datetime" |
| | | size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" |
| | | value-format="yyyy-MM-dd HH:mm:ss" |
| | | clearable |
| | | placeholder="éæ©æ¥æ" |
| | | > |
| | | <el-date-picker style="width: 100%" v-model="formData.expireTime" type="datetime" size="small" |
| | | format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" clearable placeholder="éæ©æ¥æ"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨å¾ç"> |
| | | <el-upload |
| | | ref="upload" |
| | | :action="uploadAction" |
| | | :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')" |
| | | accept="image/jpg,image/jpeg,image/png" |
| | | :multiple="false" |
| | | :limit="1" |
| | | :headers="headers" |
| | | :on-change="beforeUpload" |
| | | :on-error="onError" |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary" |
| | | >éåå¾ç</el-button |
| | | > |
| | | <el-upload ref="upload" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'imageUrl')" |
| | | accept="image/jpg,image/jpeg,image/png" :multiple="false" :limit="1" :headers="headers" |
| | | :on-change="beforeUpload" :on-error="onError"> |
| | | <el-button slot="trigger" size="small" type="primary">éåå¾ç</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item label="èµè´¨éä»¶"> |
| | | <el-upload |
| | | ref="upload1" |
| | | :action="uploadAction" |
| | | :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" |
| | | :headers="headers" |
| | | :multiple="false" |
| | | :limit="1" |
| | | :on-change="beforeUpload1" |
| | | :on-error="onError1" |
| | | > |
| | | <el-button slot="trigger" size="small" type="primary" |
| | | >éåæä»¶</el-button |
| | | > |
| | | <el-upload ref="upload1" :action="uploadAction" :on-success="(m) => handleSuccessUpImg(m, 'fileUrl')" |
| | | accept="image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx" :headers="headers" :multiple="false" |
| | | :limit="1" :on-change="beforeUpload1" :on-error="onError1"> |
| | | <el-button slot="trigger" size="small" type="primary">éåæä»¶</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="qualificationsConnectVisible = false" |
| | | >å æ¶</el-button |
| | | > |
| | | <el-button |
| | | type="primary" |
| | | @click="confirmQualifications" |
| | | :loading="loading" |
| | | >ç¡® å®</el-button |
| | | > |
| | | <el-button @click="qualificationsConnectVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmQualifications" :loading="loading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | }, |
| | | // èµè´¨æç»éä»¶ä¸è½½ |
| | | handleDownLoad(row) { |
| | | // let url = row.fileUrl; |
| | | // const link = document.createElement('a'); |
| | | // link.href = this.javaApi + '/img/'+ url; |
| | | // document.body.appendChild(link); |
| | | // link.target = '_blank'; |
| | | // link.click(); |
| | | const url = process.env.VUE_APP_BASE_API + "/img/" + row.fileUrl; |
| | | this.$download.saveAs(url, row.fileUrl); |
| | | }, |
| | |
| | | line-height: 40px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .table-item { |
| | | border-radius: 8px 8px 8px 8px; |
| | | box-shadow: 4px 4px 8px 0px rgba(51, 51, 51, 0.04); |