| | |
| | | <style lang="scss" scoped> |
| | | .standard_method { |
| | | padding: 20px; |
| | | } |
| | | .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; |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <div class="standard_method"> |
| | | <el-form :model="model" :inline="true" label-width="auto"> |
| | | <el-form-item label="è¯æ ·åç§°ï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | <div class="app-container"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <el-form :model="entitySearch" ref="entitySearch" size="small" :inline="true"> |
| | | <el-form-item label="è¯æ ·åç§°" prop="sampleName"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entitySearch.sampleName" |
| | | @keyup.enter.native="refreshTable"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å§æåä½ï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | <el-form-item label="å§æåä½" prop="commissionUnit"> |
| | | <el-input v-model="entitySearch.commissionUnit" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åä½ï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | <el-form-item label="ç产åä½" prop="production"> |
| | | <el-input v-model="entitySearch.production" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å§æäººï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | <el-form-item label="å§æäºº" prop="commissionUser"> |
| | | <el-input v-model="entitySearch.commissionUser" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small"> |
| | | é ç½® |
| | | </el-button> |
| | | <el-button size="small" type="primary"> |
| | | æ¥ è¯¢ |
| | | </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-form-item> |
| | | </el-form> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog('add')"> |
| | | æ° å¢ |
| | | </el-button> |
| | | </div> |
| | | <lims-table |
| | | :column="column" |
| | | :tableData="tableData" |
| | | :height="'calc(100vh - 250px)'" |
| | | :page="page" |
| | | /> |
| | | <Edit ref="editRef" /> |
| | | <div style="text-align: right; margin-bottom: 20px"> |
| | | <el-button size="medium" type="primary" @click="goAdd">æ°å¢</el-button> |
| | | </div> |
| | | <div class="table"> |
| | | <el-table v-loading="tableListLoading" :data="tableList" height="530" style="width: 100%"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="è¯æ ·åç§°" prop="sampleName" show-overflow-tooltip width="120"></el-table-column> |
| | | <el-table-column label="å§æç¼å·" prop="entrustCode" show-overflow-tooltip width="120"></el-table-column> |
| | | <el-table-column label="å§ææ¶é´" prop="commissionDate" width="120"></el-table-column> |
| | | <el-table-column label="åå·" prop="modelNo"></el-table-column> |
| | | <el-table-column label="å§æåä½" prop="commissionUnit" show-overflow-tooltip width="120"></el-table-column> |
| | | <el-table-column label="ç产åä½" prop="production" show-overflow-tooltip width="120"></el-table-column> |
| | | <el-table-column label="å§æäºº" prop="commissionUser"></el-table-column> |
| | | <el-table-column label="æ ·åæ°é" prop="quantity"></el-table-column> |
| | | <el-table-column label="æ ·åç¶æ" prop="sampleStatus"></el-table-column> |
| | | <el-table-column label="æ¯å¦çæ ·" prop="isLeave"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.isLeave === 1">æ¯</span> |
| | | <span v-if="scope.row.isLeave === 0">å¦</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="æ ·åå¤çæ¹å¼" prop="processing"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.processing === 1">å®éªå®¤å¤ç</span> |
| | | <span v-if="scope.row.processing === 0">å§æåä½åå</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="æä½" width="240" fixed="right"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="text" @click="goUpdate(scope.row)">ç¼è¾</el-button> |
| | | <el-button size="mini" type="text" @click="handleLook(scope.row)">æ¥ç</el-button> |
| | | <el-button size="mini" style="color:#F56C6C" type="text" @click="deleteOrder(scope.row)">å é¤</el-button> |
| | | <el-button size="mini" type="text" @click="openDownloadDia(scope.row)">ä¸è½½</el-button> |
| | | <el-upload ref='upload' |
| | | :action="action" |
| | | :data="{inspectionOrderId: scope.row.inspectionOrderId}" :headers="uploadHeader" |
| | | :on-error="onError" :on-success="handleSuccessUp" :show-file-list="false" accept='image/jpg,image/jpeg,image/png,application/pdf,.doc,.docx,.xlsx' |
| | | name="file" style="background: transparent;display: inline;margin-left: 4px"> |
| | | <span style="color: #409EFF">ä¸ä¼ </span> |
| | | </el-upload> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="pages.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total1" layout="->,total, sizes, prev, pager, next" |
| | | style="margin-top: 10px" background |
| | | @size-change="handleSizeChange1" @current-change="handleCurrentChange1"> |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog |
| | | :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :visible.sync="orderRowsVisible" title="æ°å¢æ£éªä»»å¡å" width="1000px"> |
| | | <div style="display: flex; align-items: center;margin-bottom: 10px"> |
| | | <span style="width: 80px">å§æç¼å·ï¼</span> |
| | | <el-input v-model="entity.entrustCode" clearable size="small" style="width: 300px;margin-right: 10px"></el-input> |
| | | <el-button size="small" type="primary" @click="searchTableData">æ¥è¯¢</el-button> |
| | | <el-button size="small" @click="refreshTableData">é ç½®</el-button> |
| | | </div> |
| | | <el-table v-loading="tableLoading" :data="tableData" height="550" style="width: 100%"> |
| | | <el-table-column align="center" label="åºå·" type="index" width="60"></el-table-column> |
| | | <el-table-column label="å§æç¼å·" prop="entrustCode"></el-table-column> |
| | | <el-table-column label="æ ·ååç§°" prop="sample"></el-table-column> |
| | | <el-table-column align="center" label="æä½"> |
| | | <template slot-scope="scope"> |
| | | <el-button align="center" size="mini" type="text" @click="goAddOrder(scope.row)">æ°å¢å§æå</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination :current-page="1" :page-size="tableSearch.size" :page-sizes="[10, 20, 30, 50, 100]" |
| | | :total="total" layout="->,total, sizes, prev, pager, next" |
| | | style="margin-top: 10px" background |
| | | @size-change="handleSizeChange" @current-change="handleCurrentChange"> |
| | | </el-pagination> |
| | | </el-dialog> |
| | | <el-dialog |
| | | :class="{downPdf:title=='ä¸è½½'}" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :modal="title!='ä¸è½½'" :title="title" :visible.sync="detailDialogVisible" top="20px" width="1200px"> |
| | | <div style="max-height: 75vh;overflow-y: auto;"> |
| | | <div id="dialogBody"> |
| | | <table border="1" cellpadding="10" class="tables heads" style="border: 1px dashed black;"> |
| | | <tr> |
| | | <td rowspan="2"> |
| | | <img alt="" src="@/assets/logo/ZTTlogo.png" style="width: 80%;"> |
| | | </td> |
| | | <td> |
| | | <p>è®°å½åç§°ï¼æ£éªå§æå</p> |
| | | </td> |
| | | <td> |
| | | <p>ä¿åæéï¼6å¹´</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <p>è®°å½ç¼å·ï¼ ZTT/QR-16-04-a</p> |
| | | </td> |
| | | <td> |
| | | <p>彿¡£é¨é¨ï¼ç»¼å室</p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <h4 style="display: flex;align-items: center;flex-direction: column;justify-content: center;"> |
| | | <span style="font-size: 28px;">æ£ éª å§ æ å</span> |
| | | </h4> |
| | | <p v-if="operationType !== 'view'" style="margin-left: 560px;display: flex;align-items: center"> |
| | | <span style="width: 100px">å§æç¼å·ï¼</span> |
| | | <el-input v-model="currentInfo.entrustCode" clearable size="small"></el-input> |
| | | </p> |
| | | <p v-if="operationType === 'view'" style="margin-top: 16px;margin-left: 600px;">å§æç¼å·ï¼{{ currentInfo.entrustCode }}</p> |
| | | <table border="1" cellpadding="10" class="tables"> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>è¯æ ·åç§°</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleName" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.sampleName }}</td> |
| | | <td> |
| | | <p>å§ææ¶é´</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-date-picker |
| | | v-model="currentInfo.commissionDate" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å å·</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.modelNo" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.modelNo }}</td> |
| | | <td> |
| | | <p>å§æåä½</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUnit" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.commissionUnit }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>ç产åä½</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.production" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.production }}</td> |
| | | <td> |
| | | <p>å§æäºº</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.commissionUser }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>æ ·åæ°é</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.quantity" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.quantity }}</td> |
| | | <td> |
| | | <p>æ ·åç¶æ</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleStatus" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>æ¯å¦çæ ·</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-radio-group v-model="currentInfo.isLeave" v-removeAriaHidden> |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td v-if="operationType === 'view'"> |
| | | <span v-if="currentInfo.isLeave==1">æ¯</span> |
| | | <span v-else>å¦</span> |
| | | </td> |
| | | <td> |
| | | <p>æ ·åå¤çæ¹å¼</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-radio-group v-model="currentInfo.processing" v-removeAriaHidden> |
| | | <el-radio :label="0">å§æåä½åå</el-radio> |
| | | <el-radio :label="1">å®éªå®¤å¤ç</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td v-if="operationType === 'view'"> |
| | | <span v-if="currentInfo.processing==0">å§æåä½åå</span> |
| | | <span v-else>å®éªå®¤å¤ç</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>约å®å®ææ¶é´(æ¥åæ¥æ)</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-date-picker |
| | | v-model="currentInfo.appointed" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.appointed }}</td> |
| | | <td> |
| | | <p>æ¥ååéæ¹å¼</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-radio-group v-model="currentInfo.send" v-removeAriaHidden> |
| | | <el-radio :label="1">èªå</el-radio> |
| | | <el-radio :label="0">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | </td> |
| | | <td v-if="operationType === 'view'"> |
| | | <span v-if="currentInfo.send==1">èªå</span> |
| | | <span v-else>å
¶ä»</span> |
| | | </td> |
| | | </tr> |
| | | <el-button size="small" type="primary" @click="addOrderDetailList" v-if="operationType !== 'view'">æ·»å </el-button> |
| | | <tr> |
| | | <td> |
| | | <p>åºå·</p> |
| | | </td> |
| | | <td> |
| | | <p>æ ·åç¼å·</p> |
| | | </td> |
| | | <td> |
| | | <p>è¯éªé¡¹ç®</p> |
| | | </td> |
| | | <td> |
| | | <p>æ£éªä¾æ®</p> |
| | | </td> |
| | | <td> |
| | | <p>夿³¨</p> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="(item,index) in currentInfo.orderDetailList" :key="index" > |
| | | <td>{{ index+1 }}</td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="item.sampleNumber" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ item.sampleNumber }}</td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="item.testItem" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ item.testItem }}</td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="item.testStandard" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ item.testStandard }}</td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="item.remark" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ item.remark }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å¤å®è§å</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'" colspan="3"> |
| | | <el-radio-group v-model="currentInfo.criterionRule" v-removeAriaHidden> |
| | | <el-radio :label="0">ä¸èèä¸ç¡®å®åº¦</el-radio> |
| | | <el-radio :label="1">èèä¸ç¡®å®åº¦</el-radio> |
| | | </el-radio-group> |
| | | <span v-if="currentInfo.criterionRule === 1"><el-input v-model="currentInfo.criterionRuleRemark" clearable size="small" style="width: 60px"></el-input>%</span> |
| | | </td> |
| | | <td v-if="operationType === 'view'" colspan="3"> |
| | | <span v-if="currentInfo.criterionRule===0">ä¸èèä¸ç¡®å®åº¦</span> |
| | | <span v-if="currentInfo.criterionRule===1">èèä¸ç¡®å®åº¦</span> |
| | | <span v-if="currentInfo.criterionRule===1">{{ currentInfo.criterionRuleRemark + '%' }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å§æäººç¾å</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.commissionUser" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'"> |
| | | {{currentInfo.commissionUser}} |
| | | </td> |
| | | <td> |
| | | <p>å§ææ¥æ</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-date-picker |
| | | v-model="currentInfo.commissionDate" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.commissionDate }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å§æäººèç³»çµè¯</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'" colspan="3"><el-input v-model="currentInfo.commissionPhone" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'" colspan="3">{{ currentInfo.commissionPhone }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>综å室ç¾å</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{currentInfo.generalOfficeUser}}</td> |
| | | <td> |
| | | <p>æ¥æ¶æ¥æ</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-date-picker |
| | | v-model="currentInfo.receiptData" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.receiptData }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>颿 ·åç¾å</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"><el-input v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input></td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.sampleTakerUser }}</td> |
| | | <td> |
| | | <p>颿 ·æ¥æ</p> |
| | | </td> |
| | | <td v-if="operationType !== 'view'"> |
| | | <el-date-picker |
| | | v-model="currentInfo.sampleData" |
| | | clearable |
| | | format="yyyy-MM-dd" |
| | | placeholder="éæ©æ¥æ" |
| | | size="small" |
| | | style="width: 100%" |
| | | type="date" |
| | | value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </td> |
| | | <td v-if="operationType === 'view'">{{ currentInfo.sampleData }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2" rowspan="3"> |
| | | <p>æ£æµæºæä¿¡æ¯</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <p>æ±èä¸å¤©ç§æè¡ä»½æéå
¬å¸æ£æµä¸å¿</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="3"> |
| | | <p>å°åï¼æ±èçåéå¸ç»æµææ¯å¼ååºæ°å¼åè·¯ 19 å·</p> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="3"> |
| | | <p>çµè¯ï¼0513-89059043</p> |
| | | </td> |
| | | </tr> |
| | | </table> |
| | | <p style="margin-top: 10px;margin-left: 20px;">æ³¨ï¼æ¬æ£éªå§æåä¸å¼äºä»½ï¼ä¸ä»½ç»¼å室彿¡£ï¼ä¸ä»½å§æåä½çåã</p> |
| | | </div> |
| | | </div> |
| | | <span v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> |
| | | <el-button @click="detailDialogVisible = false">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'add'" :loading="buttonLoading" type="primary" @click="handleAdd">ç¡® å®</el-button> |
| | | <el-button v-if="operationType === 'edit'" :loading="buttonLoading" type="primary" @click="handleEdit">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :visible.sync="downloadDialog" title="ä¸è½½" width="600px"> |
| | | <span> |
| | | <el-button :loading="outLoading" plain type="primary" @click="orderReportDown">ä¸è½½å§æå</el-button> |
| | | <el-button :loading="outLoading" plain type="primary" @click="orderFormDown">ä¸è½½å§ææ¥å</el-button> |
| | | </span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="downloadDialog = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addInspectionOrder, delInspectionOrder, exportInspectionOrder, |
| | | getInsOrderOnInspection, getInspectionOrderByInsOderId, getInspectionOrderOne, |
| | | pageInspectionOrder, |
| | | updateInspectionOrder |
| | | } from "@/api/cnas/process/demand/demand"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Edit from './Edit.vue' |
| | | import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js" |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | |
| | | export default { |
| | | name: 'Demand', |
| | | components: { |
| | | limsTable, |
| | | Edit |
| | | }, |
| | | name: "a7-Inspection-Order-Form", |
| | | components: {limsTable}, |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | code: '' |
| | | title:'æ£éªå§æå', |
| | | detailDialogVisible:false, |
| | | addLoading:false, |
| | | outLoading:false, |
| | | currentInfo:{ |
| | | orderDetailList: [] |
| | | }, |
| | | model: {}, |
| | | column: [ |
| | | { label: 'åºå·', minWidth: '100px' }, |
| | | { label: 'è¯æ ·åç§°', minWidth: '100px' }, |
| | | { label: 'å§æç¼å·' }, |
| | | { label: 'å§ææ¶é´' }, |
| | | { label: 'åå·' }, |
| | | { label: 'å§æåä½' }, |
| | | { label: 'ç产åä½' }, |
| | | { label: 'å§æäºº' }, |
| | | { label: 'æ ·åæ°é' }, |
| | | { label: 'æ ·åç¶æ' }, |
| | | { label: 'æ¯å¦çæ ·' }, |
| | | { label: 'æ ·åå¤çæ¹å¼' }, |
| | | personList:[], |
| | | insStateList:[ |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | label: 'å¾
å®¡æ ¸', |
| | | value: 0 |
| | | }, { |
| | | label: 'å¾
æ£éª', |
| | | value: 1 |
| | | }, |
| | | { |
| | | name: "ç¼ è¾", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.$refs.editRef.openAddContracts(row) |
| | | } |
| | | } |
| | | ], |
| | | label: 'å·²æ£éª', |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: 'éå', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: 'æ¤é', |
| | | value: 3 |
| | | }, |
| | | ], |
| | | tableData: [], // è¡¨æ ¼æ°æ® |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | operationType: '', |
| | | orderRowsVisible: false, |
| | | tableList: [], |
| | | tableListLoading: false, |
| | | pages: { |
| | | current: 1, |
| | | size: 20, |
| | | }, |
| | | } |
| | | tableData: [], |
| | | tableLoading: false, |
| | | tableSearch: { |
| | | current: 1, |
| | | size: 20, |
| | | }, |
| | | total: 0, |
| | | total1: 0, |
| | | entity: { |
| | | entrustCode: '' |
| | | }, |
| | | entitySearch: { |
| | | sampleName: '', |
| | | commissionUnit: '', |
| | | production: '', |
| | | commissionUser: '', |
| | | }, |
| | | buttonLoading: false, |
| | | downloadDialog: false, |
| | | download: {}, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | // this.getPower() |
| | | this.getAuthorizedPerson() |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc å·æ°è¡¨æ ¼ |
| | | */ |
| | | async refreshTable() { |
| | | await getInspectionOrder({ ...this.page }) |
| | | computed: { |
| | | action() { |
| | | return this.javaApi + '/inspectionOrder/uploadInspectionOrderFile' |
| | | } |
| | | }, |
| | | /** |
| | | * @desc æå¼æ¨¡ææ¡ |
| | | */ |
| | | openDialog(type) { |
| | | this.$refs.editRef.open(type) |
| | | methods: { |
| | | addOrderDetailList () { |
| | | if (this.currentInfo.orderDetailList == null) { |
| | | this.currentInfo.orderDetailList = [] |
| | | } |
| | | this.currentInfo.orderDetailList.push({ |
| | | sampleNumber: '', |
| | | testItem: '', |
| | | testStandard: '', |
| | | standardMethodList: '', |
| | | remark: '', |
| | | }) |
| | | }, |
| | | // æ¥è¯¢å表 |
| | | refreshTable() { |
| | | this.tableListLoading = true |
| | | pageInspectionOrder({ |
| | | ...this.pages, |
| | | ...this.entitySearch |
| | | }).then(res => { |
| | | this.tableListLoading = false |
| | | this.tableList = res.data.records |
| | | this.total1 = res.data.total |
| | | }).catch(err => { |
| | | this.tableListLoading = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.entitySearch = { |
| | | sampleName: '', |
| | | commissionUnit: '', |
| | | production: '', |
| | | commissionUser: '', |
| | | } |
| | | this.pages = { |
| | | current: 1, |
| | | size: 20, |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | // æå¼æ°å¢å¼¹æ¡ |
| | | goAdd () { |
| | | this.operationType = 'add' |
| | | this.title = 'æ°å¢æ£éªå§æå'; |
| | | this.orderRowsVisible = true |
| | | this.searchTableData() |
| | | }, |
| | | // æ¥è¯¢å¯æ°å¢çæ£éªå |
| | | searchTableData () { |
| | | this.tableLoading = true |
| | | getInsOrderOnInspection({ |
| | | ...this.tableSearch, |
| | | ...this.entity |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æ£éªåå表 |
| | | refreshTableData () { |
| | | this.entity = { |
| | | entrustCode: '' |
| | | } |
| | | this.tableSearch = { |
| | | current: 1, |
| | | size: 20, |
| | | } |
| | | this.searchTableData() |
| | | }, |
| | | // æ£éªåå表å页 |
| | | handleSizeChange(val) { |
| | | this.tableSearch.size = val |
| | | this.searchTableData(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.tableSearch.current = val |
| | | this.searchTableData(); |
| | | }, |
| | | // å表å页 |
| | | handleSizeChange1(val) { |
| | | this.pages.size = val |
| | | this.refreshTable(); |
| | | }, |
| | | handleCurrentChange1(val) { |
| | | this.pages.current = val |
| | | this.refreshTable(); |
| | | }, |
| | | // æäº¤æ°å¢ |
| | | handleAdd () { |
| | | this.buttonLoading = true |
| | | addInspectionOrder(this.currentInfo).then(res => { |
| | | this.buttonLoading = false |
| | | this.$message.success('æ°å¢æå') |
| | | this.detailDialogVisible = false |
| | | this.orderRowsVisible = false |
| | | this.refreshTable() |
| | | }).catch(err => { |
| | | this.buttonLoading = false |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹ |
| | | handleEdit () { |
| | | this.buttonLoading = true |
| | | updateInspectionOrder(this.currentInfo).then(res => { |
| | | this.buttonLoading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æ°å¢æå') |
| | | this.detailDialogVisible = false |
| | | this.orderRowsVisible = false |
| | | this.refreshTable() |
| | | }).catch(err => { |
| | | this.buttonLoading = false |
| | | }) |
| | | }, |
| | | // æ¥è¯¢éè¦æ°å¢çå§æå详æ
|
| | | goAddOrder (row) { |
| | | getInspectionOrderByInsOderId({insOrderId: row.id}).then(res => { |
| | | this.currentInfo = res.data |
| | | this.title = 'æ°å¢æ£éªå§æå'; |
| | | this.detailDialogVisible = true |
| | | }).catch(err => { |
| | | console.log('err----', err) |
| | | }) |
| | | }, |
| | | // æå¼ç¼è¾å¼¹æ¡ |
| | | goUpdate (row) { |
| | | this.operationType = 'edit' |
| | | getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { |
| | | this.currentInfo = res.data |
| | | this.title = 'ç¼è¾æ£éªå§æå'; |
| | | this.detailDialogVisible = true |
| | | }).catch(err => { |
| | | console.log('err----', err) |
| | | }) |
| | | }, |
| | | // æ¥ç |
| | | handleLook(row){ |
| | | this.operationType = 'view' |
| | | getInspectionOrderOne({inspectionOrderId: row.inspectionOrderId}).then(res => { |
| | | this.currentInfo = res.data |
| | | this.title = 'æ¥çæ£éªå§æå'; |
| | | this.detailDialogVisible = true |
| | | }).catch(err => { |
| | | console.log('err----', err) |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | deleteOrder (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delInspectionOrder({inspectionOrderId: row.inspectionOrderId}).then(res => { |
| | | this.$message.success('å 餿åï¼'); |
| | | this.refreshTable(); |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æå¼ä¸è½½å¼¹æ¡ |
| | | openDownloadDia (row) { |
| | | this.downloadDialog = true |
| | | this.download = row |
| | | }, |
| | | // å§æåä¸è½½ |
| | | orderFormDown () { |
| | | let url = this.download.fileUrl; |
| | | const link = document.createElement('a'); |
| | | link.href = this.javaApi + url; |
| | | link.target = '_blank'; |
| | | document.body.appendChild(link); |
| | | link.click(); |
| | | }, |
| | | // å§ææ¥åä¸è½½ |
| | | orderReportDown () { |
| | | this.outLoading = true; |
| | | exportInspectionOrder({inspectionOrderId: this.download.inspectionOrderId}).then(res => { |
| | | this.outLoading = false; |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'æ£éªå§æå.docx') |
| | | this.$message.success('å¯¼åºæå'); |
| | | |
| | | }).catch(err => { |
| | | this.outLoading = false; |
| | | }) |
| | | }, |
| | | // ä¸ä¼ |
| | | handleSuccessUp(response, ) { |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.refreshTable() |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | | this.$message.error('ä¸ä¼ æä»¶ä¸è¶
è¿10M'); |
| | | this.$refs.upload.clearFiles() |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload.clearFiles() |
| | | }, |
| | | // 人åå表 |
| | | getAuthorizedPerson() { |
| | | selectUserCondition().then(res => { |
| | | let data = [] |
| | | res.data.forEach(a => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | }) |
| | | this.personList = data |
| | | }) |
| | | }, |
| | | |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |