Merge branch 'dev' of http://114.132.189.42:9002/r/lims-ruoyi-before into dev
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æåæ½æ ·è¯¦æ
页é¢ç¸å
³æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // åæææ ¹æ®idæ¥æ£ |
| | | export function getIfsStock(query) { |
| | | return request({ |
| | | url: '/finishProductSpotCheck/getIfsStock', |
| | | 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 |
| | | }) |
| | | } |
| | |
| | | // æ¥åç¼å¶é¡µé¢ç¸å
³æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢åææä¸å-å¾
ä¸å |
| | | // æ¥åè¿å |
| | | export function upReportUrl(query) { |
| | | return request({ |
| | | url: '/insReport/upReportUrl', |
| | |
| | | data: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢æ£éªæ¥åæ°æ® |
| | | export function pageInsReport(query) { |
| | | return request({ |
| | | url: '/insReport/pageInsReport', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥åæ¹éä¸è½½ |
| | | export function downAll(query) { |
| | | return request({ |
| | | url: '/insReport/downAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥åéåå°æ£éªä»»å¡ |
| | | export function sendBackTask(query) { |
| | | return request({ |
| | | url: '/insReport/sendBackTask', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ¥åå®¡æ ¸ |
| | | export function examineReport(query) { |
| | | return request({ |
| | | url: '/insReport/examineReport', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ¥åæäº¤ |
| | | export function writeReport(query) { |
| | | return request({ |
| | | url: '/insReport/writeReport', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ¥åæ¹å |
| | | export function ratifyReport(query) { |
| | | return request({ |
| | | url: '/insReport/ratifyReport', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // æ ·å管ç页é¢ç¸å
³æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢ä»åº |
| | | export function selectWarehouse() { |
| | | return request({ |
| | | url: '/warehouse/selectWarehouse', |
| | | method: 'get' |
| | | }) |
| | | } |
| | | // æ ·åå
¥åº |
| | | export function inWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/inWarehouse', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ ·ååºåº |
| | | export function outWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/outWarehouse', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // ä¿®æ¹ä»åº |
| | | export function upWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/upWarehouse', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ·»å ä»åº |
| | | export function addWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/addWarehouse', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // ä¿®æ¹è´§æ¶ |
| | | export function upShelf(query) { |
| | | return request({ |
| | | url: '/warehouse/upShelf', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // æ·»å è´§æ¶ |
| | | export function addShelf(query) { |
| | | return request({ |
| | | url: '/warehouse/addShelf', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | // å é¤ä»åº |
| | | export function delWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/delWarehouse', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | // å é¤è´§æ¶ |
| | | export function delShelf(query) { |
| | | return request({ |
| | | url: '/warehouse/delShelf', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢è´§æ¶ä¸çåæ¾ä¿¡æ¯ |
| | | export function getWarehouse(query) { |
| | | return request({ |
| | | url: '/warehouse/getWarehouse', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢è´§æ¶ä¸çåæ¾ä¿¡æ¯ |
| | | export function searchSampleId(query) { |
| | | return request({ |
| | | url: '/warehouse/searchSampleId', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | |
| | | // ä¸åæ ¼ç®¡çç¸å
³æ¥å£ |
| | | |
| | | import request from "@/utils/request"; |
| | | |
| | | //æ¥è¯¢è¿è´§éªè¯ä¿¡æ¯ |
| | |
| | | data: data, |
| | | }); |
| | | } |
| | | // æ¥è¯¢ä¸åæ ¼æ ·åæ°æ® |
| | | export function pageInsUnPass(data) { |
| | | return request({ |
| | | url: "/unPass/pageInsUnPass", |
| | | method: "post", |
| | | data: data, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // ä¸åæ ¼å¤çç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | //æ¥è¯¢ä¸åæ ¼å¤ç |
| | | export function page(query) { |
| | | return request({ |
| | | url: "/unqualifiedHandler/page", |
| | | method: "get", |
| | | params: query, |
| | | }); |
| | | } |
| | | //å é¤ä¸åæ ¼å¤ç |
| | | export function deleteUnqualifiedHandler(query) { |
| | | return request({ |
| | | url: "/unqualifiedHandler/deleteUnqualifiedHandler", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
| | | //å é¤ä¸åæ ¼å¤ç |
| | | export function pushOA(query) { |
| | | return request({ |
| | | url: "/unqualifiedHandler/pushOA", |
| | | method: "delete", |
| | | params: query, |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function selectQualifiedSupplierManagementPage(query) { |
| | | return request({ |
| | | url: '/supplierManagement/selectQualifiedSupplierManagementPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // ç¼è¾ä¾åºå |
| | | export function updateSupplierManagement(query) { |
| | | return request({ |
| | | url: '/supplierManagement/updateSupplierManagement', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // æ°å¢ä¾åºå |
| | | export function addSupplierManagement(query) { |
| | | return request({ |
| | | url: '/supplierManagement/addSupplierManagement', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | // 导åºä¾åºå |
| | | export function exportSupplierManagement(query) { |
| | | return request({ |
| | | url: "/supplierManagement/exportSupplierManagement", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | // å é¤ä¾åºå |
| | | export function delSupplierManagement(query) { |
| | | return request({ |
| | | url: '/supplierManagement/delSupplierManagement', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å®éªå®¤çæ£æµè½åæ¡£æ¡ç¸å
³æ¥å£ |
| | | import request from "@/utils/request"; |
| | | |
| | | // 姿忣éªå页æ¥è¯¢ |
| | | export const getInspectionOrder = (params) => { |
| | | return request({ |
| | | url: "/inspectionOrder/pageInspectionOrder", |
| | | method: "get", |
| | | params: params |
| | | }) |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // å页æ¥è¯¢ |
| | | export function getPageSubstanceRecord(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/getPageSubstanceRecord', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // è·åå®éªå®¤åç§° |
| | | export function getPageStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/getPageStandardSubstance', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
åæ°å¢ç¼è¾ |
| | | export function addStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/addStandardSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | //å 餿 åç©è´¨æ¸
å |
| | | export function removeStandardSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstance/removeStandardSubstance', |
| | | method: 'delete', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æä»¶åæ´-å¯¼åº |
| | | export function exportOfStandardSubstanceList(query) { |
| | | return request({ |
| | | url: "/feStandardSubstance/exportOfStandardSubstanceList", |
| | | method: "get", |
| | | responseType: "blob", |
| | | params: query, |
| | | }); |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
ååç¨ |
| | | export function borrowSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/borrowSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | //æ åç©è´¨æ¸
åå½è¿ |
| | | export function returnSubstance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceRecord/returnSubstance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | export function getPageAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/getPageAcceptance', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | export function updateAcceptanc(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/updateAcceptanc', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | export function addAcceptance(query) { |
| | | return request({ |
| | | url: '/feStandardSubstanceAcceptance/addAcceptance', |
| | | method: 'post', |
| | | data: query |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | content: ""; |
| | | display: inline-block; |
| | | width: 4px; |
| | | height: 28px; |
| | | height: 16px; |
| | | background: #3a7bfa; |
| | | border-radius: 10px; |
| | | margin-left: 32px; |
| | | margin-left: 20px; |
| | | margin-right: 8.5px; |
| | | } |
| | | |
| | |
| | | content: ""; |
| | | display: inline-block; |
| | | width: 4px; |
| | | height: 28px; |
| | | height: 16px; |
| | | background: #3a7bfa; |
| | | border-radius: 10px; |
| | | margin-left: 20px; |
| | |
| | | <el-table-column v-for="(item, index) in column" :key="index" :column-key="item.columnKey" |
| | | :filter-method="item.filterHandler" :filter-multiple="item.filterMultiple" :filtered-value="item.filteredValue" |
| | | :filters="item.filters" :fixed="item.fixed" :label="item.label" :min-width="item.minWidth" :prop="item.prop" |
| | | :show-overflow-tooltip="item.dataType === 'action' ? false : true" :sortable="item.sortable ? true : false" |
| | | :show-overflow-tooltip="item.dataType === 'action' || item.dataType === 'slot' ? false : true" :sortable="item.sortable ? true : false" |
| | | :type="item.type" :width="item.dataType === 'action' ? getWidth(item.operation) : item.width |
| | | " align="center"> |
| | | <!-- <div class="123" v-if="item.type == ''"> --> |
| | |
| | | <!-- æé® --> |
| | | <div v-else-if="item.dataType == 'action'"> |
| | | <template v-for="(o, key) in item.operation"> |
| | | <el-button v-if="o.type != 'upload'" size="mini" v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | <el-button v-show="o.type != 'upload'" size="mini" |
| | | v-if="o.showHide ? o.showHide(scope.row) : true" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :icon="iconFn(o)" :plain="o.plain" |
| | | :style="{ color: o.name === 'å é¤' ? '#f56c6c' : o.color }" :type="o.type | typeFn(scope.row)" |
| | | @click="o.clickFun(scope.row)" :key="key"> |
| | | {{ o.name }} |
| | | </el-button> |
| | | <el-upload action="#" size="mini" :on-change="(file, fileList) => o.clickFun(scope.row, file, fileList) |
| | | " :multiple="o.multiple ? o.multiple : false" :limit="o.limit ? o.limit : 1" |
| | | <el-upload |
| | | :action="javaApi + o.url +'?id=' +(o.uploadIdFun ? o.uploadIdFun(scope.row): scope.row.id) " |
| | | size="mini" |
| | | ref="upload" |
| | | :multiple="o.multiple ? o.multiple : false" |
| | | :limit="1" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false" :accept="o.accept |
| | | ? o.accept |
| | | : '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' |
| | | " v-if="o.type == 'upload'" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" :auto-upload="false" :on-exceed="onExceed" |
| | | " |
| | | v-if="o.type == 'upload'" style="display: inline-block; width: 50px" |
| | | v-show="o.showHide ? o.showHide(scope.row) : true" |
| | | :headers="uploadHeader" |
| | | :on-error="onError" |
| | | :on-exceed="onExceed" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" :key="key"> |
| | | <el-button :size="o.size ? o.size : 'small'" type="text" |
| | | :disabled="o.disabled ? o.disabled(scope.row) : false">{{ o.name }}</el-button> |
| | |
| | | setCurrent(row) { |
| | | this.$refs.multipleTable.setCurrentRow(); |
| | | }, |
| | | handleSuccessUp(response, label) { |
| | | if (typeof label === "string") { |
| | | if (response.code == 200) { |
| | | this.upData[label] = response.data.url; |
| | | } |
| | | } else { |
| | | if (response.code == 200) { |
| | | this.$message.success("ä¸ä¼ æå"); |
| | | } |
| | | } |
| | | }, |
| | | onError(err, file, fileList) { |
| | | this.$message.error("ä¸ä¼ 失败"); |
| | | this.$refs.upload.clearFiles(); |
| | | this.uploading = false; |
| | | }, |
| | | onExceed() { |
| | | this.$message.warning("è¶
åºæä»¶ä¸ªæ°"); |
| | | }, |
| | |
| | | v-else |
| | | ref="upload" |
| | | :accept="a.uploadConfig.accept" |
| | | :action=" |
| | | javaApi + |
| | | a.uploadConfig.url + |
| | | '?id=' + |
| | | (a.uploadConfig.uploadIdFun |
| | | ? a.uploadConfig.uploadIdFun(scope.row) |
| | | : scope.row.id) |
| | | " |
| | | :action="javaApi + a.uploadConfig.url +'?id=' +(a.uploadConfig.uploadIdFun ? a.uploadConfig.uploadIdFun(scope.row): scope.row.id)" |
| | | :disabled=" |
| | | a.disabFun ? a.disabFun(scope.row, scope.$index) : false |
| | | " |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-click-modal="false" :close-on-press-escape="false" |
| | | :title="operationType === 'edit' ? 'ç¼è¾' : 'æ°å¢'" |
| | | :visible.sync="formDia" |
| | | width="90%" @close="closeDia"> |
| | | <el-form :model="model" ref="modelForm" label-width="150px" :rules="rules"> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¾åºå" prop="supplierName"> |
| | | <el-input v-model="model.supplierName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç¼å·" prop="supplierRef"> |
| | | <el-input v-model="model.supplierRef" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <el-form-item label="ä¾åºåç©åæå¡åç§°" prop="supplierItemServiceName"> |
| | | <el-input v-model="model.supplierItemServiceName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="é®ç¼"> |
| | | <el-input v-model="model.postalCode" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å°å"> |
| | | <el-input v-model="model.adress" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è系人"> |
| | | <el-input v-model="model.contacts" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»çµè¯"> |
| | | <el-input v-model="model.phone" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ·å"> |
| | | <el-input v-model="model.householdName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¼ ç"> |
| | | <el-input v-model="model.fax" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="弿·è¡"> |
| | | <el-input v-model="model.openingName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç½å"> |
| | | <el-input v-model="model.website" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´¦å·"> |
| | | <el-input v-model="model.accountName" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="Email"> |
| | | <el-input v-model="model.email" placeholder="请è¾å
¥" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer"> |
| | | <el-button @click="closeDia">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit" :loading="editLoad">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | addSupplierManagement, |
| | | updateSupplierManagement |
| | | } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | |
| | | export default { |
| | | name: "formDia", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | operationType: '', |
| | | formDia: false, |
| | | model: { |
| | | supplierName: '', |
| | | supplierRef: '', |
| | | supplierItemServiceName: '', |
| | | postalCode: '', |
| | | adress: '', |
| | | contacts: '', |
| | | phone: '', |
| | | householdName: '', |
| | | fax: '', |
| | | openingName: '', |
| | | website: '', |
| | | accountName: '', |
| | | email: '', |
| | | supplierManagementId: '', |
| | | }, |
| | | rules: { |
| | | supplierName: [{ required: true, message: '请è¾å
¥ä¾åºå', trigger: 'blur' }], |
| | | supplierRef: [{ required: true, message: '请è¾å
¥ä¾åºåç¼å·', trigger: 'blur' }], |
| | | |
| | | }, |
| | | editLoad: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | openDialog (type, row) { |
| | | this.operationType = type |
| | | this.formDia = true |
| | | if (this.operationType === 'edit') { |
| | | this.model = this.HaveJson(row) |
| | | } |
| | | }, |
| | | // æäº¤è¡¨å |
| | | submit () { |
| | | this.$refs.modelForm.validate((valid) => { |
| | | if (valid) { |
| | | this.editLoad = true |
| | | if (this.operationType === 'edit') { |
| | | updateSupplierManagement(this.model).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 200){ |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.closeDia() |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } else { |
| | | addSupplierManagement(this.model).then(res => { |
| | | this.editLoad = false |
| | | if (res.code === 200){ |
| | | this.$message.success('æ°å¢æå') |
| | | this.closeDia() |
| | | } |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.editLoad = false |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.$refs.modelForm.resetFields() |
| | | this.formDia = false |
| | | this.$emit('closeDia') |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="åç§°" prop="supplierName"> |
| | | <el-input v-model="searchForm.supplierName" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="getTableData">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" @click="exportExcel">导 åº</el-button> |
| | | <el-button size="medium" type="primary" @click="showDialog('add')">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <form-dia ref="formDia" v-if="formDia" @closeDia="closeDia"></form-dia> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import ZTTable from "../caorui/ZTTable/index.vue"; |
| | | // import TableCard from "../caorui/TableCard/index.vue"; |
| | | // import axios from "axios"; |
| | | import FormDia from "../supplierManage/component/formDia.vue"; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | selectQualifiedSupplierManagementPage, |
| | | exportSupplierManagement, |
| | | delSupplierManagement |
| | | } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | |
| | | export default { |
| | | name: "a6-supplier-manage-new", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { |
| | | limsTable, |
| | | FormDia |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | searchForm: { |
| | | supplierName: '' |
| | | }, |
| | | tableLoading: false, |
| | | tableColumn: [ |
| | | { |
| | | label: "ä¾åºåç¼å·", |
| | | prop: "supplierRef" |
| | | }, |
| | | { |
| | | label: "ä¾åºå", |
| | | prop: "supplierName" |
| | | }, |
| | | { |
| | | label: "ä¾åºç©å(æå¡)åç§°", |
| | | prop: "supplierItemServiceName" |
| | | }, |
| | | { |
| | | label: "å°å", |
| | | prop: "adress" |
| | | }, |
| | | { |
| | | label: "èç³»çµè¯", |
| | | prop: "phone" |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: "right", |
| | | minWidth: '60', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showDialog('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.deleteRow(row); |
| | | }, |
| | | } |
| | | |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | formDia: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // è·åè¡¨æ ¼æ°æ® |
| | | async getTableData() { |
| | | this.tableLoading = true; |
| | | selectQualifiedSupplierManagementPage(this.searchForm).then(res => { |
| | | this.tableLoading = false; |
| | | if(res.code === 200) { |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | resetSearchForm () { |
| | | this.pagination.current = 1 |
| | | this.pagination.pageSize = 20 |
| | | this.searchForm.supplierName = '' |
| | | this.getTableData() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.getTableData(); |
| | | }, |
| | | // æå¼æ°å¢å¼¹æ¡ |
| | | showDialog(type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDialog(type, row) |
| | | }) |
| | | }, |
| | | // å
³éå¼¹æ¡ |
| | | closeDia () { |
| | | this.formDia = false |
| | | this.getTableData() |
| | | }, |
| | | // å é¤è®°å½ |
| | | deleteRow (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æä»¶, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | delSupplierManagement({supplierManagementId:row.supplierManagementId}).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿åï¼') |
| | | this.getTableData() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // 导åºexcel |
| | | async exportExcel() { |
| | | exportSupplierManagement({deviceId:this.clickNodeVal.value}).then(res => { |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'åæ ¼ä¾åºå.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog title="æ°å¢æ£éªå§æå" :visible.sync="visible" width="1200px"> |
| | | <div id="dialogBody"> |
| | | <div style="max-height: 75vh;overflow-y: auto;"> |
| | | <div id="dialogBody"> |
| | | <table border="1" cellpadding="10" class="tables heads"> |
| | | <tr> |
| | | <td rowspan="2"> |
| | | <img alt="" :src="ZTTLogo" 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 class="table_h4"> |
| | | æ£ éª å§ æ å |
| | | </h4> |
| | | <p |
| | | v-if="operationType !== 'view'" |
| | | style="margin-left: 560px;display: flex;align-items: center"> |
| | | <span style="width: 100px">å§æç¼å·ï¼</span> |
| | | <el-input clearable size="small"></el-input> |
| | | </p> |
| | | <p v-else 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 > |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleName" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.sampleName }}</span> |
| | | </td> |
| | | <td> |
| | | <p>å§ææ¶é´</p> |
| | | </td> |
| | | <td> |
| | | <el-date-picker |
| | | v-if="operationType !== 'view'" |
| | | 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> |
| | | <span v-else>{{ currentInfo.commissionDate }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å å·</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.modelNo" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.modelNo }}</span> |
| | | </td> |
| | | <td> |
| | | <p>å§æåä½</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUnit" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.commissionUnit }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>ç产åä½</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.production" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.production }}</span> |
| | | </td> |
| | | <td> |
| | | <p>å§æäºº</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.commissionUser }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>æ ·åæ°é</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.quantity" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.quantity }}</span> |
| | | </td> |
| | | <td> |
| | | <p>æ ·åç¶æ</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleStatus" clearable size="small"></el-input> |
| | | <span v-else>{{ insStateList.find(m=>m.value==currentInfo.sampleStatus)?insStateList.find(m=>m.value==currentInfo.sampleStatus).label:'/' }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>æ¯å¦çæ ·</p> |
| | | </td> |
| | | <td> |
| | | <el-radio-group |
| | | v-if="operationType !== 'view'" |
| | | v-model="currentInfo.isLeave" |
| | | v-removeAriaHidden |
| | | > |
| | | <el-radio :label="1">æ¯</el-radio> |
| | | <el-radio :label="0">å¦</el-radio> |
| | | </el-radio-group> |
| | | <div v-else> |
| | | <span v-if="currentInfo.isLeave==1">æ¯</span> |
| | | <span v-else>å¦</span> |
| | | </div> |
| | | </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-else> |
| | | <span v-if="currentInfo.processing==0">å§æåä½åå</span> |
| | | <span v-else>å®éªå®¤å¤ç</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>约å®å®ææ¶é´(æ¥åæ¥æ)</p> |
| | | </td> |
| | | <td> |
| | | <el-date-picker |
| | | v-if="operationType !== 'view'" |
| | | 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> |
| | | <span v-else> |
| | | {{ currentInfo.appointed }} |
| | | </span> |
| | | </td> |
| | | <td> |
| | | <p>æ¥ååéæ¹å¼</p> |
| | | </td> |
| | | <td > |
| | | <el-radio-group |
| | | v-if="operationType !== 'view'" |
| | | v-model="currentInfo.send" v-removeAriaHidden |
| | | > |
| | | <el-radio :label="1">èªå</el-radio> |
| | | <el-radio :label="0">å
¶ä»</el-radio> |
| | | </el-radio-group> |
| | | <div v-else> |
| | | <span v-if="currentInfo.send==1">èªå</span> |
| | | <span v-else>å
¶ä»</span> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | | <el-button class="add_btn" size="small" type="primary" @click="addOrderDetailList">æ·»å </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> |
| | | <el-input v-if="operationType !== 'view'" v-model="item.sampleNumber" clearable size="small"></el-input> |
| | | <span v-else>{{ item.sampleNumber }}</span> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'"v-model="item.testItem" clearable size="small"></el-input> |
| | | <span v-else>{{ item.testItem }}</span> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="item.testStandard" clearable size="small"></el-input> |
| | | <span v-else>{{ item.testStandard }}</span> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="item.remark" clearable size="small"></el-input> |
| | | <span v-else>{{ item.remark }}</span> |
| | | </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-else 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> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionUser" clearable size="small"></el-input> |
| | | <span v-else>{{currentInfo.commissionUser}}</span> |
| | | </td> |
| | | <td> |
| | | <p>å§ææ¥æ</p> |
| | | </td> |
| | | <td> |
| | | <el-date-picker |
| | | v-if="operationType !== 'view'" |
| | | 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> |
| | | <span v-else>{{ currentInfo.commissionDate }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>å§æäººèç³»çµè¯</p> |
| | | </td> |
| | | <td colspan="3"> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.commissionPhone" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.commissionPhone }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>综å室ç¾å</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.generalOfficeUser" clearable size="small"></el-input> |
| | | <span v-else>{{currentInfo.generalOfficeUser}}</span> |
| | | </td> |
| | | <td> |
| | | <p>æ¥æ¶æ¥æ</p> |
| | | </td> |
| | | <td> |
| | | <el-date-picker |
| | | v-if="operationType !== 'view'" |
| | | 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> |
| | | <span v-else>{{ currentInfo.receiptData }}</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <p>颿 ·åç¾å</p> |
| | | </td> |
| | | <td> |
| | | <el-input v-if="operationType !== 'view'" v-model="currentInfo.sampleTakerUser" clearable size="small"></el-input> |
| | | <span v-else>{{ currentInfo.sampleTakerUser }}</span> |
| | | </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-else>{{ 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> |
| | | </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> |
| | | </template> |
| | | <script> |
| | | import ZTTLogo from "@/assets/logo/ZTTlogo.png" |
| | | export default { |
| | | name: 'AddContracts', |
| | | data() { |
| | | return { |
| | | ZTTLogo, |
| | | visible: false, |
| | | operationType: '', |
| | | currentInfo:{ |
| | | orderDetailList: [] |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.visible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | .tables { |
| | | table-layout: fixed; |
| | | width: 100%; |
| | | margin-top: 10px; |
| | | border-collapse: collapse; /* å
³é®å±æ§ï¼åå¹¶è¾¹æ¡ */ |
| | | td { |
| | | height: 40px; |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 14px; |
| | | word-wrap: break-word; |
| | | white-space: normal; |
| | | p { |
| | | margin: unset |
| | | } |
| | | } |
| | | } |
| | | .heads { |
| | | td { |
| | | border: 1px dashed black; /* åå
æ ¼çè线 */ |
| | | padding: 8px; |
| | | text-align: left; |
| | | } |
| | | } |
| | | .table_h4 { |
| | | display: flex; |
| | | align-items: center; |
| | | flex-direction: column; |
| | | justify-content: center; |
| | | font-size: 28px; |
| | | font-weight: bold; |
| | | margin: 10px 0 10px 0; |
| | | } |
| | | .add_btn { |
| | | margin: 10px 0 10px 10px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog title="æ°å¢æ£éªä»»å¡å" :visible.sync="visible"> |
| | | <el-form :model="search" :inline="true"> |
| | | <el-form-item label="å§æç¼å·ï¼"> |
| | | <el-input placeholder="请è¾å
¥å§æç¼å·"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary">æ¥ è¯¢</el-button> |
| | | <el-button>é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <lims-table |
| | | :column="column" |
| | | :tableData="tableData" |
| | | :page="page" |
| | | /> |
| | | </el-dialog> |
| | | <AddContracts ref="addContractsRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import AddContracts from "./AddContracts.vue"; |
| | | export default { |
| | | name: 'EditDemand', |
| | | components: { |
| | | limsTable, |
| | | AddContracts |
| | | }, |
| | | data() { |
| | | return { |
| | | visible: false, |
| | | search: {}, |
| | | column: [ |
| | | { label: 'åºå·', minWidth: '100px' }, |
| | | { label: 'å§æç¼å·', minWidth: '100px' }, |
| | | { label: 'æ ·ååç§°', minWidth: '100px' }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "æ°å¢å§æå", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.$refs.addContractsRef.open() |
| | | } |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | tableData: [{}], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1, |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | open() { |
| | | this.visible = true |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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()" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å§æåä½ï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åä½ï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="å§æäººï¼"> |
| | | <el-input size="small" |
| | | placeholder="请è¾å
¥" |
| | | clearable |
| | | @change="refreshTable()" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small"> |
| | | é ç½® |
| | | </el-button> |
| | | <el-button size="small" type="primary"> |
| | | æ¥ è¯¢ |
| | | </el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-button size="small" type="primary" icon="el-icon-plus" @click="openDialog"> |
| | | æ° å¢ |
| | | </el-button> |
| | | </div> |
| | | <lims-table |
| | | :column="column" |
| | | :tableData="tableData" |
| | | :height="'calc(100vh - 250px)'" |
| | | :page="page" |
| | | /> |
| | | <Edit ref="editRef" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import Edit from './Edit.vue' |
| | | import { getInspectionOrder } from "@/api/cnas/process/demand/demand.js" |
| | | |
| | | export default { |
| | | name: 'Demand', |
| | | components: { |
| | | limsTable, |
| | | Edit |
| | | }, |
| | | data() { |
| | | return { |
| | | queryParams: { |
| | | code: '' |
| | | }, |
| | | model: {}, |
| | | column: [ |
| | | { label: 'åºå·', minWidth: '100px' }, |
| | | { label: 'è¯æ ·åç§°', minWidth: '100px' }, |
| | | { label: 'å§æç¼å·' }, |
| | | { label: 'å§ææ¶é´' }, |
| | | { label: 'åå·' }, |
| | | { label: 'å§æåä½' }, |
| | | { label: 'ç产åä½' }, |
| | | { label: 'å§æäºº' }, |
| | | { label: 'æ ·åæ°é' }, |
| | | { label: 'æ ·åç¶æ' }, |
| | | { label: 'æ¯å¦çæ ·' }, |
| | | { label: 'æ ·åå¤çæ¹å¼' }, |
| | | { |
| | | dataType: "action", |
| | | fixed: "right", |
| | | label: "æä½", |
| | | operation: [ |
| | | { |
| | | name: "ç¼ è¾", |
| | | type: "text" |
| | | } |
| | | ], |
| | | }, |
| | | ], |
| | | tableData: [], // è¡¨æ ¼æ°æ® |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1, |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | /** |
| | | * @desc å·æ°è¡¨æ ¼ |
| | | */ |
| | | async refreshTable() { |
| | | await getInspectionOrder({ ...this.page }) |
| | | }, |
| | | /** |
| | | * @desc æå¼æ¨¡ææ¡ |
| | | */ |
| | | openDialog() { |
| | | this.$refs.editRef.open() |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.name" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="è§æ ¼åå·" prop="factoryManufacturer"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.model" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="medium" @click="resetSearchForm">é ç½®</el-button> |
| | | <el-button size="medium" type="primary" @click="searchList">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | getPageSubstanceRecord |
| | | } from '@/api/cnas/resourceDemand/standardMaterailRequistion/standardMaterailRequistion' |
| | | |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | // TableCard, |
| | | // ZTTable, |
| | | }, |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | factoryManufacturer: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ åç©è´¨åç§°', |
| | | prop: 'name', |
| | | minWidth: '120' |
| | | }, |
| | | { |
| | | label: 'è§æ ¼åå·', |
| | | prop: 'model', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°é', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¢ç¨äºº', |
| | | prop: 'borrowUser', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'é¢ç¨æ¥æ', |
| | | prop: 'borrowDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿äºº', |
| | | prop: 'returnIntegrity', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿æ¥æ', |
| | | prop: 'returnDate', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'å½è¿æ¶ç¶æ', |
| | | prop: 'returnIntegrity', |
| | | minWidth: '100' |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | total: 0, |
| | | formDia: false, |
| | | borrowDia: false, |
| | | returnDia: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | methods :{ |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | this.tableLoading = true |
| | | getPageSubstanceRecord({ |
| | | ...this.page, |
| | | ...this.searchForm |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.name = ''; |
| | | this.searchForm.model = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨åç¨" |
| | | width="80%" @close="closeBorrowDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°"> |
| | | <el-input v-model="form.name" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·"> |
| | | <el-input v-model="form.model" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®å¥½æ§" prop="integrity"> |
| | | <el-input v-model="form.integrity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç¨äºº" prop="borrowUser"> |
| | | <el-input v-model="form.borrowUser" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="èç³»æ¹å¼" prop="phone"> |
| | | <el-input v-model="form.phone" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååºæ¥æ" prop="borrowDate"> |
| | | <el-date-picker |
| | | v-model="form.borrowDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="约å®å½è¿æ¥æ" prop="borrowReturnDate"> |
| | | <el-date-picker |
| | | v-model="form.borrowReturnDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ååºäºº" prop="lender"> |
| | | <el-input v-model="form.lender" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeBorrowDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | borrowSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'borrowDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | integrity: '', |
| | | borrowUser: '', |
| | | phone: '', |
| | | borrowDate: '', |
| | | borrowReturnDate: '', |
| | | lender: '', |
| | | substanceId: '' |
| | | }, |
| | | rules: { |
| | | integrity: [{required: true, message: '请填åå®å¥½æ§',trigger: 'blur'}], |
| | | borrowUser: [{required: true, message: '请填ååç¨äºº',trigger: 'blur'}], |
| | | phone: [{required: true, message: '请填åèç³»æ¹å¼',trigger: 'blur'}], |
| | | borrowDate: [{required: true, message: 'è¯·éæ©ååºæ¥æ',trigger: 'change'}], |
| | | borrowReturnDate: [{required: true, message: 'è¯·éæ©çº¦å®å½è¿æ¥æ',trigger: 'change'}], |
| | | lender: [{required: true, message: 'è¯·éæ©lender',trigger: 'blur'}], |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.form.name = row.name |
| | | this.form.model = row.model |
| | | this.form.substanceId = row.id |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | this.form.status = '0'; |
| | | borrowSubstance(this.form).then(res =>{ |
| | | this.loading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æä½æå') |
| | | this.closeBorrowDia() |
| | | } |
| | | }) |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeBorrowDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeBorrowDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨" |
| | | width="80%" @close="closeYearDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input v-model="form.name" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è§æ ¼åå·" prop="model"> |
| | | <el-input v-model="form.model" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ç产åå®¶" prop="factoryManufacturer"> |
| | | <el-input v-model="form.factoryManufacturer" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åºåç¼å·" prop="factoryNum"> |
| | | <el-input v-model="form.factoryNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="管çç¼å·" prop="manageNum"> |
| | | <el-input v-model="form.manageNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="ä¸ç¡®å®åº¦" prop="uncertainty"> |
| | | <el-input v-model="form.uncertainty" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ°é" prop="quantity"> |
| | | <el-input v-model="form.quantity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="è´ç½®æ¥æ" prop="acquisitionDate"> |
| | | <el-date-picker |
| | | v-model="form.acquisitionDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æææ" prop="effectiveDate"> |
| | | <el-date-picker |
| | | v-model="form.effectiveDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ¡£æ¡ç¼å·" prop="fileNum"> |
| | | <el-input v-model="form.fileNum" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="åæ¾ä½ç½®" prop="position"> |
| | | <el-input v-model="form.position" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24"> |
| | | <el-form-item label="夿³¨" prop="remark"> |
| | | <el-input v-model="form.remark" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeYearDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { |
| | | addStandardSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'formDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | factoryManufacturer: '', |
| | | factoryNum: '', |
| | | manageNum: '', |
| | | uncertainty: '', |
| | | quantity: '', |
| | | acquisitionDate: '', |
| | | effectiveDate: '', |
| | | fileNum: '', |
| | | position: '', |
| | | remark: '', |
| | | id: '', |
| | | }, |
| | | rules: { |
| | | name: [{required: true, message: 'è¯·å¡«åæ åç©è´¨åç§°',trigger: 'blur'}], |
| | | model: [{required: true, message: '请填åè§æ ¼åå·',trigger: 'blur'}], |
| | | factoryManufacturer: [{required: true, message: '请填åç产åå®¶',trigger: 'blur'}], |
| | | factoryNum: [{required: true, message: '请填ååºåç¼å·',trigger: 'blur'}], |
| | | manageNum: [{required: true, message: '请填å管çç¼å·',trigger: 'blur'}], |
| | | uncertainty: [{required: true, message: '请填åä¸ç¡®å®åº¦',trigger: 'blur'}], |
| | | quantity: [{required: true, message: 'è¯·å¡«åæ°é',trigger: 'blur'}], |
| | | acquisitionDate: [{required: true, message: 'è¯·éæ©è´ç½®æ¥æ',trigger: 'change'}], |
| | | effectiveDate: [{required: true, message: 'è¯·éæ©æææ',trigger: 'change'}], |
| | | fileNum: [{required: true, message: 'è¯·å¡«åæ¡£æ¡ç¼å·',trigger: 'blur'}], |
| | | position: [{required: true, message: '请填ååæ¾ä½ç½®',trigger: 'blur'}], |
| | | }, |
| | | operationType: '', |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (type, row) { |
| | | this.formDia = true |
| | | this.operationType = type |
| | | if (type !== 'add') { |
| | | this.form = row |
| | | } |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | addStandardSubstance(this.form).then(res => { |
| | | this.loading = false |
| | | if (res.code === 201) return |
| | | this.$message.success('æä½æå') |
| | | this.closeYearDia() |
| | | }).catch(err => { |
| | | console.log('err---', err); |
| | | this.loading = false |
| | | }) |
| | | } else { |
| | | console.log('error submit!!'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeYearDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeYearDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog v-loading="diaLoading" :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | :visible.sync="formDia" |
| | | title="æ åç©è´¨å½è¿" |
| | | width="80%" @close="closeReturnDia"> |
| | | <el-form ref="form" :model="form" :rules="rules" label-position="right" label-width="auto"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input v-model="form.name" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="åå·" prop="model"> |
| | | <el-input v-model="form.model" disabled size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿æ¥æ" prop="returnDate"> |
| | | <el-date-picker |
| | | v-model="form.returnDate" |
| | | clearable |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | size="small" style="width: 100%" |
| | | type="datetime" value-format="yyyy-MM-dd HH:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å½è¿äºº" prop="returnedPerson"> |
| | | <el-input v-model="form.returnedPerson" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="å®å¥½æ§" prop="returnIntegrity"> |
| | | <el-input v-model="form.returnIntegrity" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="æ£æ¥äºº" prop="rummager"> |
| | | <el-input v-model="form.rummager" clearable size="small"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closeReturnDia">å æ¶</el-button> |
| | | <el-button :loading="loading" type="primary" @click="handleEdit">æ 交</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | returnSubstance |
| | | } from "@/api/cnas/resourceDemand/standardMaterial/standardMaterial"; |
| | | |
| | | export default { |
| | | name: 'returnDia', |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | formDia: false, |
| | | diaLoading: false, |
| | | loading: false, |
| | | form: { |
| | | name: '', |
| | | model: '', |
| | | returnedPerson: '', |
| | | returnDate: '', |
| | | returnIntegrity: '', |
| | | rummager: '', |
| | | }, |
| | | rules: { |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // æå¼å¼¹æ¡ |
| | | openDia (row) { |
| | | this.formDia = true |
| | | this.form.name = row.name |
| | | this.form.model = row.model |
| | | this.form.substanceId = row.id |
| | | }, |
| | | // æäº¤å¼¹æ¡æ°æ® |
| | | handleEdit () { |
| | | this.$refs['form'].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true |
| | | this.form.status = '1'; |
| | | returnSubstance(this.form).then(res => { |
| | | this.loading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('æä½æå') |
| | | this.closeReturnDia() |
| | | } |
| | | }) |
| | | let internalReport = this.HaveJson(this.form) |
| | | |
| | | } else { |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | closeReturnDia () { |
| | | this.$refs.form.resetFields(); |
| | | this.formDia = false |
| | | this.$emit('closeReturnDia') |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="searchForm" ref="searchForm" size="small" :inline="true"> |
| | | <el-form-item label="æ åç©è´¨åç§°" prop="name"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.name" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç产åå®¶" prop="factoryManufacturer"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="searchForm.factoryManufacturer" |
| | | @keyup.enter.native="searchList"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" icon="el-icon-search" size="mini" @click="searchList">æ¥ è¯¢</el-button> |
| | | <el-button icon="el-icon-refresh" size="mini" @click="resetSearchForm">é ç½®</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="medium" @click="exportFun">导 åº</el-button> |
| | | <el-button size="medium" type="primary" @click="openFormDia('add')">æ° å¢</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="tableColumn" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <form-dia v-if="formDia" ref="formDia" @closeYearDia="closeYearDia"></form-dia> |
| | | <borrow-dia v-if="borrowDia" ref="borrowDia" @closeYearDia="closeBorrowDia"></borrow-dia> |
| | | <return-dia v-if="returnDia" ref="returnDia" @closeYearDia="closeReturnDia"></return-dia> |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | // import FormDia from '../do/a6-standard-material-list/formDia.vue'; |
| | | // import BorrowDia from '../do/a6-standard-material-list/borrowDia.vue'; |
| | | // import ReturnDia from '../do/a6-standard-material-list/returnDia.vue'; |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | getPageStandardSubstance, |
| | | removeStandardSubstance, |
| | | exportOfStandardSubstanceList |
| | | } from '@/api/cnas/resourceDemand/standardMaterial/standardMaterial' |
| | | import FormDia from '../standardMaterial/component/formDia.vue'; |
| | | import BorrowDia from '../standardMaterial/component/borrowDia.vue'; |
| | | import ReturnDia from '../standardMaterial/component/returnDia.vue'; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | FormDia, |
| | | BorrowDia, |
| | | ReturnDia |
| | | }, |
| | | data() { |
| | | return { |
| | | searchForm: { |
| | | name: '', |
| | | factoryManufacturer: '', |
| | | }, |
| | | tableColumn: [ |
| | | { |
| | | label: 'æ åç©è´¨åç§°', |
| | | prop: 'name', |
| | | minWidth: '120' |
| | | }, |
| | | { |
| | | label: 'è§æ ¼åå·', |
| | | prop: 'model', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ç产åå®¶', |
| | | prop: 'factoryManufacturer', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åºåç¼å·', |
| | | prop: 'factoryNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '管çç¼å·', |
| | | prop: 'manageNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'ä¸ç¡®å®åº¦', |
| | | prop: 'uncertainty', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'æ°é', |
| | | prop: 'quantity', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'è´ç½®æ¥æ', |
| | | prop: 'acquisitionDate', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | label: 'æææ', |
| | | prop: 'effectiveDate', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | label: 'æ¡£æ¡ç¼å·', |
| | | prop: 'fileNum', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: 'åæ¾ä½ç½®', |
| | | prop: 'position', |
| | | minWidth: '100' |
| | | }, |
| | | { |
| | | label: '夿³¨', |
| | | prop: 'remark', |
| | | minWidth: '100' |
| | | }, |
| | | // { |
| | | // label: 'å建人', |
| | | // prop: 'createUser', |
| | | // minWidth: '100' |
| | | // }, |
| | | { |
| | | label: 'å建æ¶é´', |
| | | prop: 'createTime', |
| | | minWidth: '150' |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | minWidth: '180', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openFormDia('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'åç¨', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.borrow(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å½è¿', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.return(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | color: '#f56c6c', |
| | | clickFun: (row) => { |
| | | this.delPlan(row) |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | tableData: [], |
| | | tableLoading: false, |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | total: 0, |
| | | formDia: false, |
| | | borrowDia: false, |
| | | returnDia: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.searchList() |
| | | }, |
| | | methods :{ |
| | | exportFun() { |
| | | this.outLoading = true |
| | | exportOfStandardSubstanceList(this.searchForm).then(res =>{ |
| | | this.outLoading = false |
| | | const blob = new Blob([res], {type: 'application/octet-stream'},false); |
| | | this.$download.saveAs(blob, 'æ åç©è´¨æ¸
å.xlsx') |
| | | this.$message.success('å¯¼åºæå') |
| | | }) |
| | | }, |
| | | // æ¥è¯¢å表 |
| | | searchList () { |
| | | this.tableLoading = true |
| | | getPageStandardSubstance({ |
| | | ...this.page, |
| | | ...this.searchForm |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200){ |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | } |
| | | }) |
| | | }, |
| | | // å é¤ |
| | | delPlan (row) { |
| | | this.$confirm('æ¤æä½å°æ°¸ä¹
å é¤è¯¥æ°æ®, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.tableLoading = true |
| | | removeStandardSubstance({id:row.id}).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 200) { |
| | | this.$message.success('å 餿å') |
| | | this.searchList() |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | // æ°å¢ï¼ç¼è¾ï¼æ¹åå¼¹æ¡ |
| | | openFormDia (type, row) { |
| | | this.formDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.formDia.openDia(type, row) |
| | | }) |
| | | }, |
| | | closeYearDia () { |
| | | this.formDia = false |
| | | this.searchList() |
| | | }, |
| | | // åç¨ |
| | | borrow (row) { |
| | | this.borrowDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.borrowDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeBorrowDia () { |
| | | this.borrowDia = false |
| | | this.searchList() |
| | | }, |
| | | // å½è¿ |
| | | return (row) { |
| | | this.returnDia = true |
| | | this.$nextTick(() => { |
| | | this.$refs.returnDia.openDia(row) |
| | | }) |
| | | }, |
| | | closeReturnDia () { |
| | | this.returnDia = false |
| | | this.searchList() |
| | | }, |
| | | // éç½®æ¥è¯¢æ¡ä»¶ |
| | | resetSearchForm () { |
| | | this.searchForm.name = ''; |
| | | this.searchForm.factoryManufacturer = ''; |
| | | this.searchList() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.searchList(); |
| | | }, |
| | | // å页 |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-dialog :visible.sync="dialogVisible" title="æ åç©è´¨éªæ¶è®°å½" width="70%"> |
| | | <!-- <el-steps :active="currentStep" finish-status="success"> |
| | | <el-step class="cursor-pointer" v-for="(item, index) in steps" :key="index" :title="item"> |
| | | </el-step> |
| | | </el-steps> --> |
| | | <!-- <el-form :model="model" label-width="140px" size="small">--> |
| | | <!-- <Step1 :model.sync="model"></Step1>--> |
| | | <!-- </el-form>--> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submit">ä¿ å</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | // import Step1 from './Step/Step1.vue' |
| | | export default { |
| | | components: { |
| | | // Step1 |
| | | }, |
| | | data() { |
| | | return { |
| | | dialogVisible: false, |
| | | currentStep: 0, // æ¥éª¤æ¡æ¾ç¤ºç¬¬å æ¥ |
| | | // steps: ['æäº¤', 'å¼ç®±éªæ¶å¤æ ¸', 'å®è£
éªæ¶æ£æ¥', 'å®è£
éªæ¶å¤æ ¸', 'éªæ¶æ ¸æ¥', 'éªæ¶æ ¸æ¥å®¡æ ¸'], |
| | | model: { |
| | | acceptance: { |
| | | id: undefined, |
| | | producer: undefined, // å家代表 |
| | | file: undefined, // ç¸å
³éä»¶ |
| | | recipient: undefined, // æ¥æ¶äºº |
| | | signature: undefined, // æ¥åç¾å |
| | | situation: undefined, // éªæ¶æ
åµ |
| | | installation: undefined, // å®è£
è°è¯æ
åµ |
| | | substanceId: undefined, // æ¸
å |
| | | arriveDate: undefined, // å°è´§æ¥æ |
| | | maintenanceUnit: undefined, // ç»´ä¿®åä½ |
| | | }, |
| | | list: [] |
| | | } |
| | | } |
| | | }, |
| | | watch: { |
| | | model(newVal) { |
| | | this.model = newVal |
| | | } |
| | | }, |
| | | methods: { |
| | | clearForm() { |
| | | this.model.acceptance.id = undefined |
| | | this.model.acceptance.producer = undefined |
| | | this.model.acceptance.file = undefined |
| | | this.model.acceptance.recipient = undefined |
| | | this.model.acceptance.signature = undefined |
| | | this.model.acceptance.situation = undefined |
| | | this.model.acceptance.installation = undefined |
| | | this.model.acceptance.substanceId = undefined |
| | | this.model.acceptance.arriveDate = undefined |
| | | this.model.acceptance.maintenanceUnit = undefined |
| | | this.model.list = [] |
| | | }, |
| | | openDialog(form) { |
| | | console.log(form) |
| | | if(form) { |
| | | this.model.acceptance.id = form.acceptance.id |
| | | this.model.acceptance.producer = form.acceptance.producer |
| | | this.model.acceptance.file = form.acceptance.file |
| | | this.model.acceptance.recipient = form.acceptance.recipient |
| | | this.model.acceptance.signature = form.acceptance.signature |
| | | this.model.acceptance.situation = form.acceptance.situation |
| | | this.model.acceptance.installation = form.acceptance.installation |
| | | this.model.acceptance.substanceId = form.acceptance.substanceId |
| | | this.model.acceptance.arriveDate = form.acceptance.arriveDate |
| | | this.model.acceptance.maintenanceUnit = form.acceptance.maintenanceUnit |
| | | this.model.list = form.list |
| | | } else { |
| | | this.clearForm() |
| | | } |
| | | this.dialogVisible = true |
| | | }, |
| | | closeDialog() { |
| | | this.dialogVisible = false |
| | | }, |
| | | submit() { |
| | | if (!this.model.acceptance.substanceId) { |
| | | this.$message.warning('è¯·éæ©æ¸
å') |
| | | return |
| | | } |
| | | this.$emit('submit', this.model) |
| | | this.closeDialog() |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .cursor-pointer { |
| | | cursor: pointer; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <!--<template>--> |
| | | <!-- <el-card class="card">--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="å家代表">--> |
| | | <!-- <el-input v-model="model.acceptance.producer"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="ç¸å
³éä»¶">--> |
| | | <!-- <div class="table-between">--> |
| | | <!-- <el-input v-model="model.acceptance.file" style="width: 82%;"></el-input>--> |
| | | <!-- <el-upload--> |
| | | <!-- ref="upload"--> |
| | | <!-- style="float: left; margin: 0 12px 0 20px;"--> |
| | | <!-- :action="action"--> |
| | | <!-- :show-file-list="false"--> |
| | | <!-- :on-success="onSuccess"--> |
| | | <!-- >--> |
| | | <!-- <el-button type="primary">--> |
| | | <!-- éä»¶ä¸ä¼ --> |
| | | <!-- </el-button>--> |
| | | <!-- </el-upload>--> |
| | | <!-- </div>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="æ¥æ¶äºº">--> |
| | | <!-- <el-input v-model="model.acceptance.recipient"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="æ¥åç¾å">--> |
| | | <!-- <el-input v-model="model.acceptance.signature"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="éªæ¶æ
åµ">--> |
| | | <!-- <el-input v-model="model.acceptance.situation"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="å®è£
è°è¯æ
åµ">--> |
| | | <!-- <el-input v-model="model.acceptance.installation"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="æ¸
å" prop="substanceId" required>--> |
| | | <!-- <el-select v-model="model.acceptance.substanceId" placeholder="è¯·éæ©" style="width: 100%">--> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.name"--> |
| | | <!-- :value="item.id">--> |
| | | <!-- </el-option>--> |
| | | <!-- </el-select>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="å°è´§æ¥æ">--> |
| | | <!-- <el-date-picker--> |
| | | <!-- v-model="model.acceptance.arriveDate"--> |
| | | <!-- align="right"--> |
| | | <!-- type="date"--> |
| | | <!-- placeholder="éæ©æ¥æ"--> |
| | | <!-- style="width: 100%"--> |
| | | <!-- value-format="yyyy-MM-dd"--> |
| | | <!-- >--> |
| | | <!-- </el-date-picker>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="12">--> |
| | | <!-- <el-form-item label="ç»´ä¿®åä½">--> |
| | | <!-- <el-input v-model="model.acceptance.maintenanceUnit"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="24">--> |
| | | <!-- <el-form-item label="å¤ä»¶ç¡®è®¤">--> |
| | | <!-- <el-button type="primary" style="float: right;" @click="addSpareTable">å¢å è¡</el-button>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="24">--> |
| | | <!-- <el-form-item>--> |
| | | <!-- <ZTTable--> |
| | | <!-- style="margin-bottom: 20px;"--> |
| | | <!-- :column="spareColumns"--> |
| | | <!-- :table-data="model.list"--> |
| | | <!-- >--> |
| | | <!-- <template slot="name" slot-scope="{ row, index }">--> |
| | | <!-- <el-input v-if="row.isEdit" size="small" v-model="row.name"></el-input>--> |
| | | <!-- <span v-else>{{ row.name }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="number" slot-scope="{ row, index }">--> |
| | | <!-- <el-input v-if="row.isEdit" size="small" v-model="row.number"></el-input>--> |
| | | <!-- <span v-else>{{ row.number }}</span>--> |
| | | <!-- </template>--> |
| | | <!-- <template slot="action" slot-scope="{ row, index }">--> |
| | | <!-- <div v-if="row.isEdit">--> |
| | | <!-- <el-button type="text" @click="save(index)">ä¿å</el-button>--> |
| | | <!-- <el-button type="text">åæ¶</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- <div v-else>--> |
| | | <!-- <el-button type="text" @click="edit(index)">ä¿®æ¹</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- </ZTTable>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-card>--> |
| | | <!--</template>--> |
| | | |
| | | <!--<script>--> |
| | | <!--import ZTTable from '@/components/caorui/ZTTable/index.vue';--> |
| | | <!--import { getStandardSubstanceAll } from "@/assets/api/api";--> |
| | | <!--import axios from 'axios';--> |
| | | |
| | | <!--export default {--> |
| | | <!-- components: {--> |
| | | <!-- ZTTable--> |
| | | <!-- },--> |
| | | <!-- props: {--> |
| | | <!-- model: {--> |
| | | <!-- type: Object,--> |
| | | <!-- default: () => {}--> |
| | | <!-- }--> |
| | | <!-- },--> |
| | | <!-- data() {--> |
| | | <!-- return {--> |
| | | <!-- spareColumns: [--> |
| | | <!-- {--> |
| | | <!-- label: "åç§°",--> |
| | | <!-- prop: "name",--> |
| | | <!-- align: "center",--> |
| | | <!-- dataType: "slot",--> |
| | | <!-- slot: "name",--> |
| | | <!-- }, {--> |
| | | <!-- label: "æ°é",--> |
| | | <!-- prop: "number",--> |
| | | <!-- align: "center",--> |
| | | <!-- dataType: "slot",--> |
| | | <!-- slot: "number",--> |
| | | <!-- }, {--> |
| | | <!-- label: "æä½",--> |
| | | <!-- align: "center",--> |
| | | <!-- dataType: "slot",--> |
| | | <!-- slot: "action",--> |
| | | <!-- width: 150--> |
| | | <!-- }--> |
| | | <!-- ],--> |
| | | <!-- options: []--> |
| | | <!-- }--> |
| | | <!-- },--> |
| | | <!-- computed: {--> |
| | | <!-- action() {--> |
| | | <!-- return `${this.javaApi}/${this.$api.personnel.saveCNASFile}`--> |
| | | <!-- }--> |
| | | <!-- },--> |
| | | <!-- mounted() {--> |
| | | <!-- this.getStand()--> |
| | | <!-- },--> |
| | | <!-- methods: {--> |
| | | <!-- async getStand() {--> |
| | | <!-- const { code, data } = await axios({--> |
| | | <!-- url: getStandardSubstanceAll,--> |
| | | <!-- method: 'get'--> |
| | | <!-- })--> |
| | | <!-- this.options = data--> |
| | | <!-- },--> |
| | | <!-- addSpareTable() {--> |
| | | <!-- this.model.list.push({--> |
| | | <!-- acceptanceId: this.model.acceptance.id,--> |
| | | <!-- name: '',--> |
| | | <!-- number: '',--> |
| | | <!-- isEdit: true--> |
| | | <!-- })--> |
| | | <!-- },--> |
| | | <!-- onSuccess(response) {--> |
| | | <!-- this.model.acceptance.file = response.data--> |
| | | <!-- this.$emit('update:model', this.model)--> |
| | | <!-- },--> |
| | | <!-- save(index) {--> |
| | | <!-- this.model.list[index].isEdit = false--> |
| | | <!-- this.$emit('update:model', this.model)--> |
| | | <!-- },--> |
| | | <!-- edit(index) {--> |
| | | <!-- this.model.list[index].isEdit = true--> |
| | | <!-- }--> |
| | | <!-- }--> |
| | | <!--}--> |
| | | <!--</script>--> |
| | | |
| | | <!--<style scoped>--> |
| | | <!--.card {--> |
| | | <!-- margin-top: 1em;--> |
| | | <!-- height: 56vh;--> |
| | | <!-- overflow-y: scroll;--> |
| | | <!--}--> |
| | | <!--.table-between {--> |
| | | <!-- display: flex;--> |
| | | <!-- justify-content: space-between;--> |
| | | <!--}--> |
| | | <!--</style>--> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="form" ref="form" size="small" :inline="true"> |
| | | <el-form-item label="ç©è´¨åç§°"> |
| | | <el-input v-model="form.search"></el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button @click="reset">é ç½®</el-button> |
| | | <el-button type="primary" @click="getTableData">æ¥ è¯¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button icon="el-icon-plus" size="small" type="primary" @click="openDialog">æ·»å éªæ¶</el-button> |
| | | <el-button size="small" type="primary" @click="exportExcel">导åº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="columns" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></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>--> |
| | | </template> |
| | | |
| | | <script> |
| | | // import axios from "axios"; |
| | | // import { getPageAcceptance, addAcceptance, updateAcceptance, getAcceptanceDetails, exportAcceptance } from "@/assets/api/api"; |
| | | // import ZTTable from '@/components/caorui/ZTTable/index.vue'; |
| | | // import AddRecord from './components/AddRecord.vue'; |
| | | |
| | | import limsTable from '@/components/Table/lims-table.vue' |
| | | import { |
| | | getPageAcceptance, |
| | | updateAcceptanc, |
| | | addAcceptance |
| | | } from '@/api/cnas/resourceDemand/standardMaterialAccept/standardMaterialAccept' |
| | | export default { |
| | | components: { |
| | | limsTable |
| | | |
| | | }, |
| | | data() { |
| | | return { |
| | | form: { |
| | | search: undefined |
| | | }, |
| | | columns: [ |
| | | { |
| | | label: "åºåºç¼å·", |
| | | prop: "factoryNum" |
| | | }, |
| | | { |
| | | label: "æææ", |
| | | prop: "effectiveDate" |
| | | }, |
| | | { |
| | | label: "ç产åå®¶", |
| | | prop: "factoryManufacturer" |
| | | }, |
| | | { |
| | | label: "ææ¡£ç¼å·", |
| | | prop: "fileNum" |
| | | }, |
| | | { |
| | | label: "æ åç©è´¨åç§°", |
| | | prop: "name" |
| | | }, |
| | | { |
| | | label: "è§æ ¼åå·", |
| | | prop: "model" |
| | | }, |
| | | { |
| | | label: "管çç¼å·", |
| | | prop: "manageNum" |
| | | }, |
| | | { |
| | | label: "åæ¾ä½ç½®", |
| | | prop: "position" |
| | | }, |
| | | // { |
| | | // label: "åºåå·", |
| | | // prop: "manageNum" |
| | | // }, |
| | | { |
| | | label: "æäº¤æ¥æ", |
| | | prop: "acquisitionDate" |
| | | }, |
| | | { |
| | | label: "æ°é", |
| | | prop: "quantity" |
| | | }, |
| | | { |
| | | fixed: "right", |
| | | label: "æä½", |
| | | align: "center", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | }, |
| | | ], |
| | | tableData: [], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | tableLoading: false, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getTableData() |
| | | }, |
| | | methods: { |
| | | async getTableData() { |
| | | const res = await getPageAcceptance(this.form); |
| | | if(res.code === 200){ |
| | | this.tableData = res.data.records; |
| | | this.page.total = res.data.total; |
| | | } |
| | | |
| | | }, |
| | | openDialog() { |
| | | this.$refs.addRecordRef.openDialog() |
| | | }, |
| | | async submit(form) { |
| | | |
| | | const {code} = await form.acceptance.id ? updateAcceptanc(this.form):addAcceptance((this.form)); |
| | | if(code == 200) { |
| | | this.$message.success(`${form.acceptance.id ? 'ç¼è¾':'æ·»å '}æå`) |
| | | this.getTableData() |
| | | } |
| | | }, |
| | | async edit(row) { |
| | | const res = await this.getDetail(row.id) |
| | | this.$refs.addRecordRef.openDialog({ |
| | | acceptance: res.acceptance, |
| | | list: res.list |
| | | }) |
| | | }, |
| | | async getDetail(id) { |
| | | const { code, data } = await axios({ |
| | | method: 'get', |
| | | url: getAcceptanceDetails, |
| | | params: { id } |
| | | }) |
| | | if(code == 200) { |
| | | return data; |
| | | } |
| | | }, |
| | | reset() { |
| | | this.form.search = undefined |
| | | this.getTableData() |
| | | }, |
| | | async exportExcel() { |
| | | const res = await axios({ |
| | | method: "get", |
| | | url: `${exportAcceptance}`, |
| | | responseType: "blob" |
| | | }) |
| | | 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('å¯¼åºæå') |
| | | } |
| | | } |
| | | }, |
| | | |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.getTableData() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <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="420" 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 v-if="operationType !== 'view'" slot="footer" class="dialog-footer"> |
| | | <el-button v-if="operationType !== 'add'" @click="quarterSampleDia = false">å æ¶</el-button> |
| | | <el-button v-if="operationType === 'add'" @click="quarterSampleDia = false">ä¿ å</el-button> |
| | | <el-button type="primary" @click="handleSample">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {addQuarter, getQuarter, updateQuarterOnOrder} from "@/api/business/finishedProductSampling"; |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | 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: {}, |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | 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) |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | } |
| | | }, |
| | | // æå¨æ·»å |
| | | addQuarter () { |
| | | this.quarterItems.push({ |
| | | productType: '', |
| | | dutyUser: this.nickName, |
| | | 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('page') |
| | | } |
| | | }, |
| | | 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 style="padding: 10px 0"> |
| | | <div class="card"> |
| | | <div class="title"> |
| | | <el-button size="small" type="primary" @click="addTemQuarter">æ°å¢</el-button> |
| | | <el-button size="small" type="primary" @click="quarterSample">å£åº¦æ½æ ·</el-button> |
| | | <el-button size="small" type="primary" @click="handleStockList">å·æ°</el-button> |
| | | </div> |
| | | <el-table |
| | | ref="finishedproducttransferTable" |
| | | v-loading="tableLoading" |
| | | :data="stockList" |
| | | :header-cell-style="lineSideWarehouseTableHeaderCellStyle" |
| | | :row-class-name="lineSideWarehouseTableRowClassName" |
| | | class="finishedproducttransfer-table" |
| | | height="calc(100vh - 240px)" |
| | | @selection-change="handleSelectionChange" |
| | | > |
| | | <el-table-column type="selection" width="45"></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | label="客æ·è®¢åç¼å·" |
| | | prop="customerOrderNo" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">客æ·è®¢åç¼å·</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.customerOrderNo" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.customerOrderNo }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="æåé¶ä»¶å·" |
| | | prop="partNo" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">æåé¶ä»¶å·</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.partNo" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.partNo }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="é¶ä»¶åç§°" |
| | | prop="partName" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">é¶ä»¶åç§°</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.partName" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.partName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | label="ä»åº" |
| | | prop="warehouseName" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">ä»åº</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.warehouseName" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.warehouseName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | label="åºä½å·" |
| | | prop="locationNo" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">åºä½å·</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.locationNo" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.locationNo }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | align="center" |
| | | label="åºä½åç§°" |
| | | prop="locationName" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">åºä½åç§°</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.locationName" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.locationName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="æ¹æ¬¡å·" |
| | | prop="partBatchNo" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">æ¹æ¬¡å·</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.partBatchNo" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.partBatchNo }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="å
¥åºæ¥æº" |
| | | prop="inSource" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">å
¥åºæ¥æº</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.inSource" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.inSource }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="夿¤é¢è²" |
| | | prop="outerColor" |
| | | width="140" |
| | | > |
| | | <template slot="header" slot-scope="scope"> |
| | | <div style="line-height: 14px;margin-bottom: 6px">夿¤é¢è²</div> |
| | | <div class="th" @click.stop> |
| | | <el-input |
| | | v-model="queryParamOne.outerColor" |
| | | clearable |
| | | size="mini" |
| | | type="text" |
| | | @clear="handleStockList" |
| | | @keyup.enter.native="handleStockList" |
| | | ></el-input> |
| | | </div> |
| | | </template> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.outerColor }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="åºåæ°é" |
| | | prop="stockQuantity" |
| | | width="140" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | label="å¯ç¨åºåæ°é" |
| | | prop="availableStockQuantity" |
| | | width="140" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.availableStockQuantity }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pagin-page" style="margin-top: 0;margin-bottom: 0;"> |
| | | <el-pagination |
| | | background |
| | | :current-page="queryReport.current" |
| | | :page-size="queryReport.size" |
| | | :page-sizes="[10, 15, 20, 50, 100]" |
| | | :total="queryReport.total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | style="text-align:right;padding: 20px 16px;" |
| | | @size-change="handleSizeChangeReport" |
| | | @current-change="handleCurrentChangeReport" |
| | | > |
| | | </el-pagination> |
| | | </div> |
| | | </div> |
| | | <add-quarter-item ref="addQuarterItem"></add-quarter-item> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import AddQuarterItem from "./components/addQuarterItem.vue"; |
| | | import {getIfsStock} from "@/api/business/finishedProductSampling"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | stockList: [], |
| | | queryParamOne: { |
| | | partNo: null, |
| | | partName: null, |
| | | warehouseName: null, |
| | | locationName: null, |
| | | locationNo: null, |
| | | partBatchNo: null, |
| | | stockQuantity: null, |
| | | availableStockQuantity: null, |
| | | outerColor: null, |
| | | customerOrderNo: null, |
| | | inSource: null, |
| | | }, |
| | | queryReport: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | tableLoading: false, |
| | | multipleSelection: [], // tableæéä¸ç对象 |
| | | showEditForm: false, |
| | | showMoveForm: false, |
| | | showMoveAllForm: false, |
| | | erpfinishstock: {}, |
| | | isAvaliable: false, |
| | | isPackage: false, |
| | | quarterTemItems: [], |
| | | operationType: '' |
| | | } |
| | | }, |
| | | components: {AddQuarterItem}, |
| | | mounted() { |
| | | this.getIfsStock() |
| | | }, |
| | | updated() { |
| | | this.$nextTick(() => { |
| | | this.$refs.finishedproducttransferTable.doLayout() |
| | | }) |
| | | }, |
| | | computed: { |
| | | ...mapGetters(["nickName"]), |
| | | }, |
| | | methods: { |
| | | // å£åº¦æ½æ · |
| | | quarterSample () { |
| | | this.$refs.addQuarterItem.openDia(this.quarterTemItems, 'add') |
| | | }, |
| | | addTemQuarter () { |
| | | if (this.multipleSelection.length > 0) { |
| | | const multipleSelection = JSON.parse(JSON.stringify(this.multipleSelection)) |
| | | if (multipleSelection.length > 0) { |
| | | multipleSelection.forEach(item => { |
| | | if (item.partName.includes(' ')) { |
| | | const list = item.partName.match(/^(\S+)\s(.*)/).slice(1) |
| | | console.log('list', list) |
| | | item.productType = list[0] |
| | | item.spotCheckNumber = list[1] |
| | | } |
| | | item.dutyUser = this.nickName |
| | | item.itemRemark = item.partBatchNo; |
| | | this.quarterTemItems.push(item) |
| | | }) |
| | | } |
| | | this.$message.success('æåæå') |
| | | this.$refs.finishedproducttransferTable.clearSelection() |
| | | } else { |
| | | this.$message.warning('è¯·éæ©æ°æ®') |
| | | } |
| | | }, |
| | | // è·åæ°æ®å表 |
| | | getIfsStock() { |
| | | this.tableLoading = true |
| | | this.stockList = [] |
| | | const newReqParam = this.getFinalParam() |
| | | getIfsStock(newReqParam) |
| | | .then((response) => { |
| | | const resData = response.data |
| | | this.queryReport.total = resData.total |
| | | const resStockList = resData.data |
| | | resStockList.forEach((item) => { |
| | | this.stockList.push({ |
| | | partNo: item.PART_NO, |
| | | partName: item.PART_DESC, |
| | | warehouseName: item.WAREHOUSE_ID, |
| | | locationName: item.LOCATION_DESC, |
| | | locationNo: item.LOCATION_NO, |
| | | partBatchNo: item.LOT_BATCH_NO, |
| | | stockQuantity: item.QTY_ONHAND, |
| | | availableStockQuantity: item.QTY_AVAILABLE, |
| | | outerColor: item.ATTR4, |
| | | customerOrderNo: item.ATTR6, |
| | | inSource: item.ATTR23, |
| | | }) |
| | | }) |
| | | this.tableLoading = false |
| | | }) |
| | | .catch(() => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | getFinalParam() { |
| | | const newReqParam = { |
| | | partNo: this.queryParamOne.partNo, |
| | | partDescription: this.queryParamOne.partName, |
| | | warehouse: this.queryParamOne.warehouseName |
| | | ? this.queryParamOne.warehouseName + '%' |
| | | : null, |
| | | locDesc: this.queryParamOne.locationName, |
| | | locNo: this.queryParamOne.locationNo, |
| | | lotBatchNo: this.queryParamOne.partBatchNo, |
| | | quantityFlag: this.queryParamOne.stockQuantity, |
| | | outerColor: this.queryParamOne.outerColor, |
| | | otcOrderNo: this.queryParamOne.customerOrderNo, |
| | | availableStockQuantity: this.queryParamOne.availableStockQuantity, |
| | | inSource: this.queryParamOne.inSource, |
| | | page: this.queryReport.current, |
| | | limit: this.queryReport.size |
| | | } |
| | | return newReqParam |
| | | }, |
| | | lineSideWarehouseTableHeaderCellStyle({row, column, rowIndex, columnIndex}) { |
| | | let headerStyle = 'background:#FAFAFA;color:#666;' |
| | | if (columnIndex === 0) { |
| | | headerStyle += 'border-radius: 6px 0px 0px 0px;' |
| | | } else if (columnIndex === 13) { |
| | | headerStyle += 'border-radius: 0px 6px 0px 0px;' |
| | | } |
| | | return headerStyle |
| | | }, |
| | | lineSideWarehouseTableRowClassName({ row, rowIndex }) { |
| | | if (rowIndex % 2 === 1) { |
| | | return 'stripe-row' |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | handleSizeChangeReport(val) { |
| | | this.queryReport.size = val |
| | | this.queryReport.current = 1 |
| | | this.getIfsStock() |
| | | }, |
| | | handleCurrentChangeReport(val) { |
| | | this.queryReport.current = val |
| | | this.getIfsStock() |
| | | }, |
| | | handleStockList() { |
| | | this.queryReport.current = 1 |
| | | this.getIfsStock() |
| | | }, |
| | | handleSelectionChange(val) { |
| | | this.multipleSelection = val |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | >>>.el-table__header { |
| | | height: 70px; |
| | | } |
| | | .card { |
| | | height: calc(100% - 40px); |
| | | background: #ffffff; |
| | | padding: 10px; |
| | | } |
| | | .title { |
| | | text-align: right; |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | { |
| | | name: "ä¸ä¼ ", |
| | | type: "text", |
| | | clickFun: (row) => { |
| | | this.handleUpload(row); |
| | | }, |
| | | type: "upload", |
| | | accept: '.doc,.docx', |
| | | url: '/insReport/inReport', |
| | | uploadIdFun: (row) => { |
| | | return row.insReportId |
| | | } |
| | | }, |
| | | { |
| | | name: "è¿å", |
| | |
| | | }) |
| | | }, |
| | | // ä¸ä¼ æ¥å |
| | | handleUpload () { |
| | | handleUpload (row) { |
| | | |
| | | }, |
| | | // ä¸è½½æ¥å |
| | |
| | | }, |
| | | mounted() { |
| | | this.queryParams.userId = this.userId; |
| | | // this.getPower(); |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | |
| | | handleDataLook(row) { |
| | | this.lookInfo = row; |
| | | this.getLookList(); |
| | | }, |
| | | // æéåé
|
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem("power")); |
| | | let inspection = false; |
| | | let connect = false; |
| | | let review = false; |
| | | let claim = false; |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == "doInsOrder") { |
| | | inspection = true; |
| | | } |
| | | if (power[i].menuMethod == "upPlanUser") { |
| | | connect = true; |
| | | } |
| | | if (power[i].menuMethod == "verifyPlan") { |
| | | review = true; |
| | | } |
| | | if (power[i].menuMethod == "claimInsOrderPlan") { |
| | | claim = true; |
| | | } |
| | | } |
| | | if (!claim) { |
| | | this.componentData.do.splice(3, 1); |
| | | } |
| | | if (!review) { |
| | | this.componentData.do.splice(2, 1); |
| | | } |
| | | if (!connect) { |
| | | this.componentData.do.splice(1, 1); |
| | | } |
| | | if (!inspection) { |
| | | this.componentData.do.splice(0, 1); |
| | | } |
| | | }, |
| | | changeCheckBox(val) { |
| | | this.queryParams.userId = val ? 0 : null; |
| | |
| | | dicts: ['check_type', 'urgency_level'], |
| | | components: {}, |
| | | props: { |
| | | isReport: { |
| | | type: Number, |
| | | default: () => null |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | orderType: '', |
| | | active: 0, |
| | | currentId: 0, |
| | | isReport: '', |
| | | editTable:[], // åºé´ç¹æ®å¼å¡«å |
| | | template: null, |
| | | saveLoad: false, // ä¿åæé®loading |
| | |
| | | this.active = this.$route.query.active |
| | | this.orderType = this.$route.query.orderType |
| | | this.currentId = this.$route.query.currentId |
| | | this.isReport = this.$route.query.isReport |
| | | this.customsInspection = this.$route.query.customsInspection |
| | | this.getUserNowList() // è·åå½åç¨æ·ä¿¡æ¯ |
| | | this.selectStandardMethods() // è·åæ£éªæ åä¸ææ¡æ°æ® |
| | |
| | | orderId = this.dataIndex === 0 ? this.customsInspection.enterOrderId : this.customsInspection.quarterOrderId |
| | | } else if (!this.customsInspection.enterOrderId && !this.customsInspection.quarterOrderId) { |
| | | this.isShowTab = false |
| | | orderId = this.isReport === 1 ? this.customsInspection.insOrderId : this.customsInspection.id |
| | | orderId = this.isReport == 1 ? this.customsInspection.insOrderId : this.customsInspection.id |
| | | } |
| | | // æ¥ç |
| | | // è¯·æ±æ¥å£ï¼åæ¾æ°æ® |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs.fileList.selectList() |
| | | this.getFileList() |
| | | } |
| | | }, |
| | | beforeUpload(file) { |
| | |
| | | <template> |
| | | <div class="inspection_order"> |
| | | <div v-show="activeFace === 0 && state===0" style="width: 100%;height: 100%;"> |
| | | <div> |
| | | <el-row class="title"> |
| | | <el-col :span="12" style="padding-left: 20px;text-align: left;">æ¥åç¼å¶</el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search" style="position: relative;"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ¥åç¼å·ï¼</div> |
| | | <div class="search_input"><el-input v-model="componentData.entity.code" clearable placeholder="请è¾å
¥" |
| | | size="small" @keyup.enter.native="refreshTable()"></el-input></div> |
| | | <div class="app-container"> |
| | | <div> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="æ¥åç¼å·" prop="code"> |
| | | <el-input v-model="entity.code" clearable placeholder="请è¾å
¥" |
| | | size="small" @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç¶æ" prop="queryStatus"> |
| | | <el-select v-model="entity.queryStatus" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åç±»å«" prop="typeSource"> |
| | | <el-select v-model="entity.typeSource" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç±»å«" prop="orderType"> |
| | | <el-select v-model="entity.orderType" clearable size="small" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in orderTypeList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="mini" @click="refresh()">éç½®</el-button> |
| | | <el-button size="mini" type="primary" @click="refreshTable()">æ¥è¯¢</el-button> |
| | | <el-button :loading="outLoading" size="mini" type="primary" @click="handleDowns">æ¹éä¸è½½</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="valueTableData" :column="column" :page="page" :tableLoading="tableLoading" |
| | | :isSelection="true" :handleSelectionChange="handleChange" |
| | | :height="'calc(100vh - 290px)'" @pagination="pagination" key="valueTableData"> |
| | | <div slot="action" slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="viewIssued(scope.row)">æ¥çæ¥å</el-button> |
| | | <el-upload ref='upload1' |
| | | style="display: inline;margin: 0 6px" |
| | | :action="fileAction1 +'?id='+ scope.row.id" |
| | | :auto-upload="true" |
| | | :before-upload="fileBeforeUpload1" |
| | | :headers="uploadHeader" :on-error="onError1" |
| | | :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-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-popover placement="bottom" trigger="hover" style="margin-left: 6px"> |
| | | <template #reference> |
| | | <el-button link type="text" size="small">æ´å¤</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">ä¸è½½</el-button> |
| | | <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">åå§è®°å½</el-button> |
| | | <el-button type="text" size="small" @click="handleFileLook(scope.row)">éä»¶ä¸ä¼ </el-button> |
| | | </div> |
| | | </el-popover> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ç¶æï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="componentData.entity.queryStatus" clearable size="small" style="width: 100%;" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in queryStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">ä¸åç±»å«ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="componentData.entity.typeSource" clearable size="small" style="width: 100%;" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in typeSourceList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ£éªç±»å«ï¼</div> |
| | | <div class="search_input"> |
| | | <el-select v-model="componentData.entity.orderType" clearable size="small" style="width: 100%;" @change="refreshTable()"> |
| | | <el-option v-for="(a, i) in orderTypeList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </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> |
| | | <el-button :loading="outLoading" size="small" style="margin-right: 16px;" type="primary" @click="handleDowns">æ¹éä¸è½½</el-button> |
| | | </div> |
| | | </div> |
| | | <!-- <input id="input" type="file" accept=".doc,.docx"></input> --> |
| | | <div class="table"> |
| | | <el-table @selection-change="handleChange" :data="valueTableData" style="width: 100%" height="calc(100vh - 21em)" v-loading="tableLoading"> |
| | | <!-- è¡¨æ ¼å --> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column header-align="center" align="center" width="70" prop="prop" label="åºå·" type="index"></el-table-column> |
| | | <el-table-column prop="code" label="æ¥åç¼å·" min-width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="text" @click="selectAllByOne(scope.row)">{{scope.row.code}}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="typeSource" label="ä¸åç±»å«" min-width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="info" v-if="scope.row.typeSource === 1" disable-transitions>åææä¸å</el-tag> |
| | | <el-tag type="info" v-if="scope.row.typeSource === 0" disable-transitions>æåä¸å</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="orderType" label="æ£éªç±»å«" min-width="150"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="success" v-if="scope.row.orderType === 'Customer-ordered test'" disable-transitions>å§æè¯éª</el-tag> |
| | | <el-tag v-if="scope.row.orderType === 'æ½æ£'" disable-transitions>æ½æ£</el-tag> |
| | | <el-tag type="info" v-if="scope.row.orderType === 'è¿åæ£éª'" disable-transitions>è¿åæ£éª</el-tag> |
| | | <el-tag type="warning" v-if="scope.row.orderType === 'Quarterly inspection'" disable-transitions>å£åº¦æ£éª</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createTime" label="å建æ¶é´" min-width="150"></el-table-column> |
| | | <el-table-column prop="writeUserName" label="æäº¤äºº" min-width="110"></el-table-column> |
| | | <el-table-column prop="writeTime" label="æäº¤æ¶é´" min-width="150"></el-table-column> |
| | | <el-table-column prop="state" label="æäº¤ç¶æ" min-width="110"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="danger" v-if="scope.row.state === 0" disable-transitions>å¾
æäº¤</el-tag> |
| | | <el-tag type="success" v-if="scope.row.state === 1" disable-transitions>å·²æäº¤</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="examineUser" label="å®¡æ ¸äºº" width="110"></el-table-column> |
| | | <el-table-column prop="examineTime" label="å®¡æ ¸æ¶é´" width="180"></el-table-column> |
| | | <el-table-column prop="isExamine" label="å®¡æ ¸ç¶æ" width="110"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="danger" v-if="scope.row.isExamine === 0" disable-transitions>ä¸éè¿</el-tag> |
| | | <el-tag type="success" v-if="scope.row.isExamine === 1" disable-transitions>éè¿</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="examineTell" label="å®¡æ ¸å¤æ³¨" width="180"></el-table-column> |
| | | <el-table-column prop="ratifyUser" label="æ¹å人" width="110"></el-table-column> |
| | | <el-table-column prop="ratifyTime" label="æ¹åæ¶é´" width="180"></el-table-column> |
| | | <el-table-column prop="isRatify" label="æ¹åç¶æ" width="110"> |
| | | <template slot-scope="scope"> |
| | | <el-tag type="danger" v-if="scope.row.isRatify === 0" disable-transitions>䏿¹å</el-tag> |
| | | <el-tag type="success" v-if="scope.row.isRatify === 1" disable-transitions>æ¹å</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="ratifyTell" label="æ¹å夿³¨" width="180"></el-table-column> |
| | | <!-- æä½æé® --> |
| | | <el-table-column label="æä½" fixed="right" min-width="360" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="small" type="text" @click="viewIssued(scope.row)">æ¥çæ¥å</el-button> |
| | | <el-upload ref='upload1' |
| | | style="display: inline" |
| | | :action="fileAction1 +'?id='+ scope.row.id" |
| | | :auto-upload="true" |
| | | :before-upload="fileBeforeUpload1" |
| | | :headers="headers" :on-error="onError1" |
| | | :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> |
| | | <!-- <span>ä¸ä¼ </span>--> |
| | | </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-popover placement="bottom" :width="170" trigger="hover"> |
| | | <template #reference> |
| | | <el-button link type="text" size="small">æ´å¤</el-button> |
| | | </template> |
| | | <div> |
| | | <el-button style="margin-left: 10px" type="text" size="small" @click="download(scope.row)">ä¸è½½</el-button> |
| | | <el-button type="text" size="small" @click="viewInspectInfo(scope.row)">åå§è®°å½</el-button> |
| | | <el-button type="text" size="small" @click="handleFileLook(scope.row)">éä»¶ä¸ä¼ </el-button> |
| | | </div> |
| | | </el-popover> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="page.current" |
| | | style="margin-right: 5%;" :page-sizes="[10, 20, 30, 50, 100]" :page-size="page.size" |
| | | layout="->,total, sizes, prev, pager, next, jumper" :total="total"> |
| | | </el-pagination> |
| | | </div> |
| | | </lims-table> |
| | | </div> |
| | | <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="claimVisible" title="å¨çº¿ç¼å¶" |
| | | width="22cm"> |
| | |
| | | <el-button :loading="loadingVerify" type="primary" @click="handleSubmit">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <div v-if="activeFace >0 && isCopper === null" style="width: 100%;height: 100%;"> |
| | | <Add :active="activeFace" :currentId="currentId" :examine="examine"/> |
| | | </div> |
| | | <div v-if="activeFace >0 && isCopper === 0" style="width: 100%;height: 100%;"> |
| | | <CustomsInspection :active="activeFace" :currentId="currentId" :customsInspection="customsInspection" :isReport="isReport"/> |
| | | </div> |
| | | <div v-if="activeFace >0 && isCopper === 1" style="width: 100%;height: 100%;"> |
| | | <CopperOrder :active="activeFace" :currentId="currentId"></CopperOrder> |
| | | </div> |
| | | <!--产ä¸é¾ä¿¡æ¯æ¥ç--> |
| | | <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo> |
| | | <!-- <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo>--> |
| | | <!--æ¥åæ¥ç--> |
| | | <el-dialog :fullscreen="fullscreen" :modal-append-to-body="false" :visible.sync="viewIssuedVisible" title="æ¥åæ¥ç" |
| | | width="80vw"> |
| | |
| | | <onlyoffice ref="onlyoffice" :options="option" style="width: 100%;height: 100%;" /> |
| | | </div> |
| | | </el-dialog> |
| | | <!--æ£éªä»»å¡ä¿¡æ¯æ¥ç--> |
| | | <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId" |
| | | :sonLaboratory="sonLaboratory" :state="state" |
| | | :typeSource="typeSource" |
| | | @goback="goback" @refreshView="refreshView"/> |
| | | <!--éä»¶æ¥ç--> |
| | | <el-dialog :visible.sync="filesDialogVisible" title="éä»¶æ¥ç" width="80%" @closed="closeFilesLook"> |
| | | <div style="display: flex;justify-content: space-between;"> |
| | | <div style="margin-bottom: 10px"> |
| | | <el-upload ref='upload' |
| | | :action="fileAction" |
| | | :auto-upload="true" |
| | | :before-upload="fileBeforeUpload" :data="{orderId: filesLookInfo.insOrderId}" |
| | | :headers="headers" :on-error="onError" |
| | | :headers="uploadHeader" :on-error="onError" |
| | | :on-success="handleSuccessUp" |
| | | :show-file-list="false" |
| | | accept='.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.zip,.rar' style="width: 80px !important;"> |
| | | <el-button size="small" style="height: 38px" type="primary">éä»¶ä¸ä¼ </el-button> |
| | | </el-upload> |
| | | </div> |
| | | <!-- <div v-if="filesDialogVisible" style="height: 70vh;overflow-y: auto;">--> |
| | | <!-- <ValueTable :key="upIndex"--> |
| | | <!-- ref="fileList"--> |
| | | <!-- :componentData="fileComponentData"--> |
| | | <!-- :delUrl="$api.insOrderPlan.delfile"--> |
| | | <!-- :url="$api.insOrderPlan.getFileList"--> |
| | | <!-- class="value-table"/>--> |
| | | <!-- </div>--> |
| | | <lims-table :tableData="tableDataFile" :column="columnFile" @pagination="paginationFile" height="500px" |
| | | key="tableDataFile" :page="pageFile" :tableLoading="tableLoadingFile"></lims-table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import onlyoffice from "@/components/Onlyoffice/onlyoffice.vue"; |
| | | // import ShowInfo from "../do/b1-material-ins-order/showInfo.vue"; |
| | | import file from "@/utils/file"; |
| | | import { |
| | | downAll, |
| | | examineReport, |
| | | pageInsReport, |
| | | ratifyReport, |
| | | sendBackTask, |
| | | upReportUrl, |
| | | writeReport |
| | | } from "@/api/business/insReport"; |
| | | import {mapGetters} from "vuex"; |
| | | import {selectUserCondition} from "@/api/business/inspectionTask"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {delfile, downFile, getFileList} from "@/api/business/rawMaterialOrder"; |
| | | export default { |
| | | components: {onlyoffice}, |
| | | components: {limsTable, onlyoffice}, |
| | | data() { |
| | | return { |
| | | componentData: { |
| | | entity: { |
| | | queryStatus: null, |
| | | code: null, |
| | | typeSource: null, |
| | | orderBy: { |
| | | field: 'id', |
| | | order: 'desc' |
| | | } |
| | | }, |
| | | isIndex: true, |
| | | showSelect: true, |
| | | select: true, |
| | | selectMethod: 'handleChange', |
| | | do: [ |
| | | { |
| | | id: '', |
| | | font: 'æ¥çæ¥å', |
| | | type: 'text', |
| | | method: 'viewIssued', |
| | | }, |
| | | { |
| | | id: 'download', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'download' |
| | | }, { |
| | | id: 'handleUpload', |
| | | font: 'ä¸ä¼ ', |
| | | type: 'upload', |
| | | uploadConfig: { |
| | | url: this.$api.insReport.inReport, |
| | | accept: '.docx' |
| | | }, |
| | | method: 'handleUpload', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 || userName != row.writeUserName |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleRestore', |
| | | font: 'è¿å', |
| | | type: 'text', |
| | | method: 'handleRestore', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 || JSON.parse(localStorage.getItem("user")).name != row.writeUserName |
| | | } |
| | | }, |
| | | { |
| | | id: 'sendBackTask', |
| | | font: 'éåä»»å¡', |
| | | type: 'text', |
| | | method: 'sendBackTask', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 || JSON.parse(localStorage.getItem("user")).name != row.writeUserName |
| | | } |
| | | }, |
| | | { |
| | | id: 'handle', |
| | | font: 'æäº¤', |
| | | type: 'text', |
| | | method: 'handle', |
| | | disabFun: (row, index) => { |
| | | return row.state != 0 || JSON.parse(localStorage.getItem("user")).name != row.writeUserName |
| | | } |
| | | }, |
| | | { |
| | | id: 'handleIssued', |
| | | font: 'å®¡æ ¸', |
| | | type: 'text', |
| | | method: 'handleIssued', |
| | | disabFun: (row, index) => { |
| | | return row.state == null || row.state == 0 || row.isExamine == 1 || JSON.parse(localStorage.getItem("user")).name != row.examineUser |
| | | } |
| | | }, { |
| | | id: 'handleApprove', |
| | | font: 'æ¹å', |
| | | type: 'text', |
| | | method: 'handleApprove', |
| | | disabFun: (row, index) => { |
| | | return row.state == null || row.state == 0 || row.isExamine == 0 || row.isExamine == null || row.isRatify == 1 || JSON.parse(localStorage.getItem("user")).name != row.ratifyUser |
| | | } |
| | | }, |
| | | { |
| | | id: '', |
| | | font: 'åå§è®°å½', |
| | | type: 'text', |
| | | method: 'viewInspectInfo', |
| | | }, |
| | | { |
| | | id: '', |
| | | font: 'éä»¶ä¸ä¼ ', |
| | | type: 'text', |
| | | method: 'handleFileLook', |
| | | } |
| | | ], |
| | | linkEvent: { |
| | | code: { |
| | | method: 'selectAllByOne' |
| | | } |
| | | }, |
| | | tagField: { |
| | | isRatify: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'danger', |
| | | label: '䏿¹å' |
| | | }, { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'æ¹å' |
| | | }] |
| | | }, |
| | | isExamine: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'ä¸éè¿' |
| | | }, { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'éè¿' |
| | | }] |
| | | }, |
| | | state: { |
| | | select: [{ |
| | | value: 0, |
| | | type: 'danger', |
| | | label: 'å¾
æäº¤' |
| | | }, { |
| | | value: 1, |
| | | type: 'success', |
| | | label: 'å·²æäº¤' |
| | | }] |
| | | }, |
| | | typeSource: { |
| | | select: [{ |
| | | value: 0, |
| | | label: 'æåä¸å', |
| | | type: 'info' |
| | | },{ |
| | | value: 1, |
| | | label: 'åææä¸å', |
| | | type: 'info' |
| | | }] |
| | | }, |
| | | queryStatus: { |
| | | select: [{ |
| | | value: 0, |
| | | label: 'å¾
æäº¤', |
| | | type: 'info' |
| | | },{ |
| | | value: 1, |
| | | label: 'å¾
å®¡æ ¸', |
| | | type: 'info' |
| | | },{ |
| | | value: 2, |
| | | label: 'å¾
æ¹å', |
| | | type: 'info' |
| | | }] |
| | | }, |
| | | orderType: { |
| | | select: [{ |
| | | value: 'Customer-ordered test', |
| | | label: 'å§æè¯éª', |
| | | type: 'success', |
| | | effect: 'plain' |
| | | },{ |
| | | value: 'æ½æ£', |
| | | label: 'æ½æ£', |
| | | type: '', |
| | | effect: 'plain' |
| | | },{ |
| | | value: 'è¿åæ£éª', |
| | | label: 'è¿åæ£éª', |
| | | type: 'info', |
| | | effect: 'plain' |
| | | },{ |
| | | value: 'Quarterly inspection', |
| | | label: 'å£åº¦æ£éª', |
| | | type: 'warning', |
| | | effect: 'plain' |
| | | }] |
| | | } |
| | | }, |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | needSort: ['createTime', 'state', 'writeTime', 'isExamine', 'examineTime', 'ratifyTime'], |
| | | requiredUp: [] |
| | | entity: { |
| | | queryStatus: null, |
| | | code: null, |
| | | typeSource: null, |
| | | }, |
| | | page: { |
| | | current: 1, |
| | | size: 20, |
| | | total: 0 |
| | | }, |
| | | total: null, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | | statusList: [], |
| | | claimVisible: false, |
| | |
| | | sonLaboratory: '', // è¯éªå®¤ |
| | | filesDialogVisible: false, |
| | | filesLookInfo: {}, |
| | | fileComponentData: { |
| | | entity: { |
| | | insOrderId:'' |
| | | }, |
| | | isIndex: true, |
| | | showSelect: false, |
| | | select: false, |
| | | sort: false, |
| | | init:false, |
| | | do: [ |
| | | { |
| | | id: 'parent', |
| | | font: 'ä¸è½½', |
| | | type: 'text', |
| | | method: 'handleDown' |
| | | },{ |
| | | id: 'delete', |
| | | font: 'å é¤', |
| | | type: 'text', |
| | | method: 'doDiy', |
| | | tableDataFile: [], |
| | | tableLoadingFile: false, |
| | | columnFile: [ |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç±»å', |
| | | prop: 'type', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'å¾ç' |
| | | } else if (params == 2) { |
| | | return 'æä»¶' |
| | | } else { |
| | | return '' |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'warning' |
| | | } else { |
| | | return '' |
| | | } |
| | | } |
| | | ], |
| | | isPage: false, |
| | | linkEvent: {}, |
| | | tagField: { |
| | | type:{ |
| | | select:[ |
| | | { |
| | | value: 1, |
| | | label: 'å¾ç' |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: 'æä»¶' |
| | | }, |
| | | { label: 'éä»¶åç§°', prop: 'fileName' }, |
| | | { label: 'ä¸ä¼ 人', prop: 'name' }, |
| | | { label: 'ä¸ä¼ æ¶é´', prop: 'createTime' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: '170px', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDown(row); |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | currentId: '', |
| | | selectField: {}, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.delete(row); |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | pageFile: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | isCopper: null, |
| | | tableLoading: false, |
| | | valueTableData: [], |
| | | userName: '' |
| | | column: [ |
| | | { |
| | | label: "æ¥åç¼å·", |
| | | prop: "code", |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { |
| | | label: "ä¸åç±»å«", |
| | | prop: "typeSource", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "æåä¸å"; |
| | | } else { |
| | | return "åææä¸å"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | label: "æ£éªç±»å", |
| | | prop: "orderType", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | return this.orderTypeList.find((m) => m.value == params).label; |
| | | }, |
| | | formatType: (params) => { |
| | | return this.orderTypeList.find((m) => m.value == params).type; |
| | | }, |
| | | }, |
| | | { label: "å建æ¶é´", prop: "createTime" }, |
| | | { label: "æäº¤äºº", prop: "writeUserName" }, |
| | | { label: "æäº¤æ¶é´", prop: "writeTime" }, |
| | | { |
| | | label: "æäº¤ç¶æ", |
| | | prop: "state", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "å¾
æäº¤"; |
| | | } else { |
| | | return "å·²æäº¤"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "danger"; |
| | | } else { |
| | | return "success"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "å®¡æ ¸äºº", prop: "examineUser" }, |
| | | { label: "å®¡æ ¸æ¶é´", prop: "examineTime" }, |
| | | { |
| | | label: "å®¡æ ¸ç¶æ", |
| | | prop: "isExamine", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "ä¸éè¿"; |
| | | } else { |
| | | return "éè¿"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "danger"; |
| | | } else { |
| | | return "success"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "å®¡æ ¸å¤æ³¨", prop: "examineTell" }, |
| | | { label: "æ¹å人", prop: "ratifyUser" }, |
| | | { label: "æ¹åæ¶é´", prop: "ratifyTime" }, |
| | | { |
| | | label: "æ¹åç¶æ", |
| | | prop: "isRatify", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "䏿¹å"; |
| | | } else { |
| | | return "æ¹å"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "danger"; |
| | | } else { |
| | | return "success"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: "æ¹å夿³¨", prop: "ratifyTell" }, |
| | | { |
| | | fixed: "right", |
| | | dataType: "slot", |
| | | slot: "action", |
| | | width: '360px', |
| | | label: "æä½" |
| | | } |
| | | ], |
| | | userName: '', |
| | | } |
| | | }, |
| | | computed: { |
| | | headers() { |
| | | return { |
| | | 'token': sessionStorage.getItem('token') |
| | | } |
| | | }, |
| | | ...mapGetters(["nickName", "userId"]), |
| | | action() { |
| | | return this.javaApi + this.$api.insReport.upAll |
| | | return this.javaApi + '/insReport/upAll' |
| | | }, |
| | | fileAction() { |
| | | return this.javaApi + this.$api.insOrderPlan.uploadFile |
| | | return this.javaApi + '/unqualifiedHandler/uploadFileByUnqualified' |
| | | }, |
| | | fileAction1() { |
| | | return this.javaApi + this.$api.insReport.inReport |
| | | return this.javaApi + '/insReport/inReport' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.entityCopy = this.HaveJson(this.componentData.entity) |
| | | this.userName = JSON.parse(localStorage.getItem("user")).name |
| | | this.getPower() |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | pageInsReport({ |
| | | ...this.page,...this.entity |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | this.page.total = res.data.body.total |
| | | this.valueTableData = res.data.body.records |
| | | }) |
| | | }, |
| | | pagination({ page, limit }) { |
| | | this.page.current = page; |
| | | this.page.size = limit; |
| | | this.refreshTable(); |
| | | }, |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable(); |
| | | }, |
| | | handleChange(arr){ |
| | | this.mutiList = arr |
| | | }, |
| | |
| | | if(row.userName){ |
| | | inspectorList = row.userName.split(',') |
| | | } |
| | | let user = JSON.parse(localStorage.getItem('user')) |
| | | if(user){ |
| | | inspectorList.push(user.name) |
| | | } |
| | | this.inspectorList = inspectorList |
| | | this.state = 3; |
| | | this.typeSource = row.typeSource |
| | | this.orderId = row.insOrderId |
| | | this.sonLaboratory = row.sonLaboratory |
| | | inspectorList.push(this.nickName) |
| | | this.$router.push({ |
| | | path: "/inspectionTask/inspection", |
| | | query: { |
| | | sonLaboratory: row.sonLaboratory, |
| | | state: 3, |
| | | typeSource: row.typeSource, |
| | | orderId: row.insOrderId, |
| | | inspectorList: inspectorList, |
| | | }, |
| | | }) |
| | | }, |
| | | goback() { |
| | | this.state = 0 |
| | | this.refreshTable('page') |
| | | }, |
| | | // æå¼æ¥çéä»¶å¼¹æ¡ |
| | | handleFileLook (row) { |
| | | this.filesLookInfo = row |
| | | this.filesDialogVisible = true |
| | | this.fileComponentData.entity.insOrderId = row.insOrderId |
| | | this.$nextTick(() => { |
| | | this.$refs['fileList'].selectList() |
| | | this.getFileList() |
| | | }, |
| | | // æ¥è¯¢éä»¶æ¥çå表åè° |
| | | getFileList() { |
| | | this.tableLoadingFile = true |
| | | getFileList({insOrderId: this.filesLookInfo.insOrderId}).then(res => { |
| | | this.tableLoadingFile = false |
| | | if (res.code === 200) { |
| | | this.tableDataFile = res.data.records |
| | | this.pageFile.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoadingFile = false |
| | | }) |
| | | }, |
| | | paginationFile(page) { |
| | | this.pageFile.size = page.limit |
| | | this.getFileList() |
| | | }, |
| | | closeFilesLook () { |
| | | this.filesDialogVisible = false |
| | |
| | | this.upLoading = false; |
| | | if (response.code == 200) { |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | this.$refs.fileList.selectList() |
| | | this.getFileList() |
| | | } |
| | | }, |
| | | handleSuccessUp1(response, ) { |
| | |
| | | this.$message.success('ä¸ä¼ æå'); |
| | | } |
| | | }, |
| | | // ä¸è½½éä»¶çæä»¶ |
| | | handleDown(row){ |
| | | this.$axios.post(this.$api.insOrderPlan.downFile, { |
| | | downFile({ |
| | | id: row.id, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | |
| | | }) |
| | | }, |
| | | // å·æ°é¡µé¢ |
| | | refreshView () { |
| | | this.InspectionKey++ |
| | | // å é¤éä»¶æä»¶ |
| | | delete(row) { |
| | | this.$confirm('æ¯å¦å é¤å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | delfile({ id: row.id }).then(res => { |
| | | if (res.code === 500) { |
| | | return |
| | | } |
| | | this.$message.success('å 餿å') |
| | | this.getList() |
| | | }).catch(e => { |
| | | this.$message.error('å é¤å¤±è´¥') |
| | | }) |
| | | }).catch(() => { }) |
| | | }, |
| | | // æ¥ç产ä¸é¾ä¿¡æ¯ |
| | | openInfoDialog (row) { |
| | |
| | | } |
| | | let str = this.mutiList.map(m=>m.id).join(',') |
| | | this.outLoading = true |
| | | this.$axios.get(this.$api.insReport.downAll+'?ids='+str).then(res => { |
| | | downAll({ids: str}).then(res => { |
| | | this.outLoading = false |
| | | this.$message.success('å¯¼åºæå') |
| | | // const blob = new Blob([res],{ type: 'application/octet-stream' }); |
| | |
| | | this.$message.error('ä¸ä¼ 失败') |
| | | this.$refs.upload1.clearFiles() |
| | | }, |
| | | refreshTable(e) { |
| | | this.tableLoading = false |
| | | this.$axios.post(this.$api.insReport.pageInsReport, { |
| | | page: this.page, |
| | | entity: this.componentData.entity |
| | | }, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | | } |
| | | }).then(res => { |
| | | this.tableLoading = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.total = res.data.body.total |
| | | this.valueTableData = res.data.body.records |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | | this.page.size = val |
| | | this.refreshTable(); |
| | | }, |
| | | handleCurrentChange(val) { |
| | | this.page.current = val |
| | | this.refreshTable(); |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | | this.refreshTable(); |
| | | }, |
| | | async handleWeave(row) { |
| | | let fileName = (row.urlS===null||row.urlS==='')?row.url:row.urlS |
| | | fileName = fileName.replace('/word/','') |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | //åèvabOnlyOfficeç»ä»¶åæ°é
ç½® |
| | | const { href } = this.$router.resolve({ |
| | | path: `/wordEdit`, |
| | | query: { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: true, |
| | | fileType: "docx", |
| | | title: fileName, |
| | | lang: 'zh-CN', |
| | | isPrint: true, |
| | | user_id: 1, |
| | | user_name: userName, |
| | | editUrl: this.javaApi + "/insReport/onlyOffice/save?fileName=" + fileName |
| | | } |
| | | }) |
| | | window.open(href, '_blank'); |
| | | }, |
| | | // æéåé
|
| | | getPower(radio) { |
| | | let power = JSON.parse(sessionStorage.getItem('power')) |
| | | let edit = false |
| | | let up = false |
| | | let res = false |
| | | let sub = false |
| | | let issued = true |
| | | let approve = true |
| | | for (var i = 0; i < power.length; i++) { |
| | | if (power[i].menuMethod == 'upReportFile') { |
| | | edit = true |
| | | } |
| | | if (power[i].menuMethod == 'inReport') { |
| | | up = true |
| | | } |
| | | if (power[i].menuMethod == 'upReportUrl') { |
| | | res = true |
| | | } |
| | | if (power[i].menuMethod == 'writeReport') { |
| | | sub = true |
| | | } |
| | | if (power[i].menuMethod == 'ratifyReport') { |
| | | approve = true |
| | | } |
| | | if (power[i].menuMethod == 'examineReport') { |
| | | issued = true |
| | | } |
| | | } |
| | | if (!approve) { |
| | | this.componentData.do.splice(6, 1) |
| | | } |
| | | if (!issued) { |
| | | this.componentData.do.splice(5, 1) |
| | | } |
| | | if (!sub) { |
| | | this.componentData.do.splice(4, 1) |
| | | } |
| | | if (!res) { |
| | | this.componentData.do.splice(3, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!edit) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | }, |
| | | confirmClaim() { |
| | | // console.log(this.$refs.Word.getValue()) |
| | | }, |
| | | playOrder(num) { |
| | | this.activeFace = num |
| | | }, |
| | | async selectAllByOne(row) { |
| | | selectAllByOne(row) { |
| | | this.isCopper = row.isCopper |
| | | this.customsInspection = row |
| | | this.activeFace = 2; |
| | | this.examine = 1; |
| | | this.isReport = 1 |
| | | this.currentId = parseInt(row.insOrderId) |
| | | switch (row.isCopper) { |
| | | case 0: |
| | | // åææ |
| | | this.$router.push({ |
| | | path: "/materialOrder/customsInspection", query: { |
| | | customsInspection: row, |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId, |
| | | isReport: this.isReport |
| | | } |
| | | }); |
| | | break; |
| | | case null: |
| | | // æå |
| | | this.$router.push({ |
| | | path: "/productOrder/add", query: { |
| | | examine: this.examine, |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId |
| | | } |
| | | }); |
| | | break; |
| | | case 1: |
| | | // éæ |
| | | this.$router.push({ |
| | | path: "/materialOrder/copperOrder", query: { |
| | | active: this.activeFace, |
| | | currentId: row.insOrderId |
| | | } |
| | | }); |
| | | break; |
| | | } |
| | | }, |
| | | download(row) { |
| | | let url = row.urlS ? row.urlS : row.url; |
| | |
| | | }, |
| | | // è¿åæä½ |
| | | handleRestore(row) { |
| | | this.$axios.post(this.$api.insReport.upReportUrl, { |
| | | upReportUrl({ |
| | | id: row.id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | |
| | | fileType = "pdf" |
| | | } |
| | | fileName = fileName.replace('/word/','') |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | const userName = this.nickName |
| | | this.option = { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | |
| | | } |
| | | this.issuedVisible = true; |
| | | }, |
| | | // æ¥çpdfæ¥å |
| | | viewIssuedPdf(row) { |
| | | this.currentInfo = row; |
| | | let url = row.tempUrlPdf |
| | | 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(); |
| | | } |
| | | }, |
| | | // æ¥çæ¥å |
| | | viewIssued(row) { |
| | | this.currentInfo = row; |
| | |
| | | fileType = "pdf" |
| | | } |
| | | fileName = fileName.replace('/word/','') |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | const userName = this.nickName |
| | | this.option = { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | |
| | | type: 'warning' |
| | | }).then(() => { |
| | | this.upLoad = true |
| | | this.$axios.post(this.$api.insReport.sendBackTask+'?id='+row.id).then(res => { |
| | | sendBackTask({id: row.id}).then(res => { |
| | | this.upLoad = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('éåæåï¼') |
| | | this.refreshTable('page') |
| | | }).catch(err => { |
| | |
| | | return |
| | | } |
| | | this.loadingIssued = true; |
| | | this.$axios.post(this.$api.insReport.examineReport, { |
| | | examineReport({ |
| | | id: this.currentInfo.id, |
| | | userId: this.approver, |
| | | isExamine: 1 |
| | | }).then(res => { |
| | | this.loadingIssued = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('æäº¤æå') |
| | | this.refreshTable('page') |
| | | this.currentInfo = null; |
| | |
| | | }, |
| | | // è·å人åå表 |
| | | getAuthorizedPerson() { |
| | | this.$axios.get(this.$api.user.selectQualityUserList).then(res => { |
| | | let data = [] |
| | | let userName = JSON.parse(localStorage.getItem("user")).name; |
| | | res.data.forEach(a => { |
| | | // if(a.name !== userName) { |
| | | selectUserCondition({ type: 0 }).then((res) => { |
| | | let data = []; |
| | | res.data.forEach((a) => { |
| | | data.push({ |
| | | label: a.name, |
| | | value: a.id |
| | | }) |
| | | // } |
| | | }) |
| | | this.approverList = data |
| | | value: a.id, |
| | | }); |
| | | }); |
| | | this.approverList = data; |
| | | }) |
| | | }, |
| | | // æ¹åæé® |
| | |
| | | fileType = "pdf" |
| | | } |
| | | fileName = fileName.replace('/word/','') |
| | | const userName = JSON.parse(localStorage.getItem("user")).name; |
| | | const userName = this.nickName |
| | | this.option = { |
| | | url: this.javaApi + "/word/" + fileName, |
| | | isEdit: false, |
| | |
| | | // æ¹åéè¿ |
| | | subApprove() { |
| | | this.loadingApprove = true; |
| | | this.$axios.post(this.$api.insReport.ratifyReport, { |
| | | ratifyReport({ |
| | | id: this.currentInfo.id, |
| | | isRatify: 1 |
| | | }).then(res => { |
| | | this.loadingApprove = false; |
| | | if (res.code == 201) { |
| | | this.$message.error('æ¹å失败') |
| | | return |
| | | } |
| | | this.$message.success('å·²æ¹å') |
| | | this.refreshTable('page') |
| | | this.currentInfo = null; |
| | |
| | | // æäº¤å®¡æ ¸äººæä½ |
| | | handleSubmit(row) { |
| | | this.loadingVerify = true |
| | | this.$axios.post(this.$api.insReport.writeReport, { |
| | | writeReport({ |
| | | id: this.currentInfo.id, |
| | | userId: this.verifyUser, |
| | | }).then(res => { |
| | | this.loadingVerify = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.addVerifyDia = false |
| | | this.$message.success('æäº¤æå') |
| | | this.refreshTable('page') |
| | |
| | | return this.$message.error('请è¾å
¥åå ') |
| | | } |
| | | this.loadingIssuedReason = true; |
| | | this.$axios.post(this.$api.insReport.examineReport, { |
| | | examineReport({ |
| | | id: this.currentInfo.id, |
| | | isExamine: 0, |
| | | examineTell: this.reason |
| | | }).then(res => { |
| | | this.loadingIssuedReason = false; |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('æä½æå') |
| | | this.refreshTable('page') |
| | | this.currentInfo = null; |
| | |
| | | return this.$message.error('请è¾å
¥åå ') |
| | | } |
| | | this.loadingApproveReason = true |
| | | this.$axios.post(this.$api.insReport.ratifyReport, { |
| | | ratifyReport({ |
| | | id: this.currentInfo.id, |
| | | isRatify: 0, |
| | | examineTell: this.reason |
| | | }).then(res => { |
| | | this.loadingApproveReason = false |
| | | if (res.code === 201) { |
| | | return |
| | | } |
| | | this.$message.success('æä½æå') |
| | | this.refreshTable('page') |
| | | this.currentInfo = null; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div style="width: 100%;height: 100%;overflow-y: auto;" class="detail"> |
| | | <div> |
| | | <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="small" @click="hanldeBack">è¿å</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.sampleCode" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·ååç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.sample" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">æ ·åæ°éï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.num" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">åä½ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.unit" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å
¥åºæ¶é´ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.date" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing"> |
| | | <div class="search_label">å
¥åºäººï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.user" disabled></el-input> |
| | | </div> |
| | | </div> |
| | | <div class="search_thing" > |
| | | <div class="search_label">åºä½å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable |
| | | v-model="entity.code" disabled style="min-width: 230px;"></el-input> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <h4>æ£éªé¡¹ç®</h4> |
| | | <div class="table"> |
| | | <el-table class="el-table" ref="productTable" :data="products" height="380px" tooltip-effect="dark" border> |
| | | <el-table-column type="index" align="center" label="åºå·" width="70" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="inspectionItem" label="æ£éªé¡¹" min-width="100" |
| | | show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="inspectionItemSubclass" label="æ£éªé¡¹åç±»" min-width="100" show-overflow-tooltip v-if="PROJECT=='è£
å¤çµç¼'"></el-table-column> |
| | | <el-table-column prop="laboratory" label="å®éªå®¤" min-min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="unit" label="åä½" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="equipValue" label="设å¤" min-width="100" show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | {{handleData(scope.row.equipValue)}} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="entrustCode" label="å§æç¼å·" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="updateUserName" label="æ£éªäºº" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="updateTime" label="æ£éªæ¶é´" min-width="100" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="insResult" label="ç»è®º" min-width="100"> |
| | | <template slot-scope="scope"> |
| | | <el-tag |
| | | :type="scope.row.insResult==1?'success':'danger'" size="medium">{{scope.row.insResult==1?'åæ ¼':'ä¸åæ ¼'}}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <h4>åºå
¥åºåå²</h4> |
| | | <div class="table" style="margin-bottom: 20px;"> |
| | | <el-table class="el-table" ref="productTable" :data="histories" height="380px" tooltip-effect="dark" border> |
| | | <el-table-column type="index" align="center" label="åºå·" width="70" :key="Math.random()"> |
| | | </el-table-column> |
| | | <el-table-column prop="state" label="ç±»å" |
| | | show-overflow-tooltip> |
| | | <template slot-scope="scope"> |
| | | <el-tag :type="scope.row.state==1?'success':'danger'">{{ scope.row.state==1?'å
¥åº':'åºåº' }}</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="createUserName" label="æä½äºº" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="createTime" label="æä½æ¶é´" show-overflow-tooltip></el-table-column> |
| | | <el-table-column prop="warehouseCode" label="åºä½å·" show-overflow-tooltip></el-table-column> |
| | | <!-- <el-table-column prop="price" label="忾卿ï¼hï¼" show-overflow-tooltip></el-table-column> --> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | props:['id'], |
| | | data(vm) { |
| | | return{ |
| | | entity:{ |
| | | num:1, |
| | | }, |
| | | products:[], |
| | | histories:[] |
| | | } |
| | | }, |
| | | mounted(){ |
| | | this.getInfo() |
| | | }, |
| | | methods:{ |
| | | hanldeBack(){ |
| | | this.$emit('hanldeBack') |
| | | }, |
| | | getInfo(){ |
| | | this.$axios.post(this.$api.warehouse.getSampleRecord, { |
| | | id: this.id |
| | | }).then(res => { |
| | | let {histories,insSample,sampleHistory,products} = res.data; |
| | | this.entity = {num:1,...insSample,...sampleHistory}; |
| | | this.histories = histories; |
| | | this.products = products; |
| | | }) |
| | | }, |
| | | handleData(e){ |
| | | let info = '' |
| | | if(e){ |
| | | info = JSON.parse(e).map(item => { |
| | | return item.v; |
| | | }).join(',') |
| | | } |
| | | return info |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .detail::-webkit-scrollbar{ |
| | | width: 0; |
| | | } |
| | | |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 120px; |
| | | display: flex; |
| | | align-items: center; |
| | | flex-wrap: wrap; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 40px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 120px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | padding: 20px; |
| | | } |
| | | h4{ |
| | | font-size: 16px; |
| | | font-weight: normal; |
| | | margin-top: 10px; |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div v-if="!isDetail"> |
| | | <div style="display: flex;justify-content: space-between"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="ä»åºåç§°" prop="warehouseId"> |
| | | <el-select v-model="entity.warehouseId" placeholder="éæ©ä»åº" size="small" @change="warehouseChange"> |
| | | <el-option v-for="item in warehouse" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="è´§æ¶" prop="shelfId"> |
| | | <el-select v-model="entity.shelfId" placeholder="éæ©è´§æ¶" size="small" @change="handleShelf"> |
| | | <el-option v-for="item in shelf" :key="item.id" :label="item.name" :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åç¼å·" prop="searchSampleCode"> |
| | | <el-input placeholder="请è¾å
¥æ ·åç¼å·" v-model="searchSampleCode" size="small"> |
| | | <el-button slot="append" icon="el-icon-search" @click="handleSearch"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button size="small" style="color:#3A7BFA" @click="keepVisible=true">ç»´æ¤</el-button> |
| | | <el-button size="small" style="color:#3A7BFA" @click="warehouseVisible=true,isEdit=false">æ·»å ä»åº</el-button> |
| | | <el-button size="small" style="color:#3A7BFA" @click="shelvesVisible=true,isEdit=false" |
| | | :disabled="entity.warehouseId==null">æ·»å è´§æ¶</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="storageVisible=true">å
¥åº</el-button> |
| | | <el-button size="small" type="primary" @click="exportVisible=true">åºåº</el-button> |
| | | </div> |
| | | </div> |
| | | <div class="table" v-loading="tableLoading"> |
| | | <table border="1" class="tables" cellpadding="10" style="table-layout:fixed;" v-if="tableList.length>0"> |
| | | <tbody> |
| | | <tr v-for="(item,index) in tableList" :key="index"> |
| | | <td v-for="(m,i) in item" :key="i" class="content"> |
| | | <h4 v-if="m.row!=undefined">{{ m.row }} - {{ m.col }}</h4> |
| | | <ul> |
| | | <el-tooltip |
| | | effect="dark" |
| | | placement="top" |
| | | v-for="(n,j) in m.samples" |
| | | :key="j" :disabled="`${n.sample}${n.model}`.length<10"> |
| | | <div slot="content"><span>{{ n.sample }}</span> |
| | | <span> ({{ n.model }}) [{{ n.sampleCode }}]</span></div> |
| | | <li class="green" |
| | | @click="handelDetail(n)"> |
| | | <i></i> |
| | | <span>{{ n.sample }}</span> |
| | | <span> ({{ n.model }}) [{{ n.sampleCode }}]</span> |
| | | <!-- <span class="num"> x{{ n.num }}</span> --> |
| | | </li> |
| | | </el-tooltip> |
| | | </ul> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td v-for="(item,index) in rowList" :key="index" style="background: ghostwhite;height: 20px;">{{ item }} |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | | </table> |
| | | <span v-else style="color: rgb(144, 147, 153);display: inline-block;position: absolute;top: 60%;left: 50%;transform: translate(-50%,-50%);">ææ æ°æ®</span> |
| | | </div> |
| | | </div> |
| | | <Detail v-else @hanldeBack="isDetail=false" :id="currentId" /> |
| | | <el-dialog title="æ ·åå
¥åº" :visible.sync="storageVisible" width="350px"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="sampleCode" size="small"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-tree :data="storageList" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id" |
| | | :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="storageVisible" |
| | | empty-text="ææ æ°æ®"> |
| | | <div class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <el-row> |
| | | <el-col :span="24"> |
| | | <span><i |
| | | :class="`node_i ${data.warehouseShelfList != undefined ? 'el-icon-folder-opened' : 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="storageVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmStorage" :loading="upLoadStorage">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="æ ·ååºåº" :visible.sync="exportVisible" width="350px"> |
| | | <!-- <div class="shaoma"> |
| | | <img src="../../../static/img/æ«ç .svg" alt="" style="margin-right: 5px;"> |
| | | <span>æ«ç åºåº</span> |
| | | </div> --> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>æ ·åç¼å·ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="sampleCode" size="small"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="exportVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmExport" :loading="upLoadExport">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog title="åºä½ç»´æ¤" :visible.sync="keepVisible" width="350px" :append-to-body="true"> |
| | | <el-tree :data="warehouse" ref="tree" :props="{ children: 'warehouseShelfList', label: 'name' }" node-key="id" |
| | | :filter-node-method="filterNode" @node-click="handleNodeClick" highlight-current @node-expand="nodeOpen" |
| | | @node-collapse="nodeClose" :default-expanded-keys="expandedKeys" v-if="keepVisible" |
| | | empty-text="ææ æ°æ®"> |
| | | <div class="custom-tree-node" style="width: 100%;" slot-scope="{ node, data }"> |
| | | <el-row style="width: 100%;display: flex;align-items: center;"> |
| | | <el-col :span="20"> |
| | | <span><i |
| | | :class="`node_i ${node.level<2 ? 'el-icon-folder-opened': 'el-icon-tickets'}`"></i> |
| | | {{ data.name }}</span> |
| | | </el-col> |
| | | <el-col :span="4" v-if="node.level<3"> |
| | | <el-button type="text" size="mini" icon="el-icon-edit" @click.stop="handleEdit(data,node.level)"> |
| | | </el-button> |
| | | <el-button type="text" size="mini" icon="el-icon-delete" @click.stop="handleDelete(data,node.level)"> |
| | | </el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tree> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="keepVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="keepVisible = false" >ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :title="isEdit?'ä»åºä¿®æ¹':'ä»åºæ°å¢'" :visible.sync="warehouseVisible" width="350px"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>ä»åºåç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="name" size="small" @keyup.enter.native="confirmWarehouse"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="warehouseVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmWarehouse" :loading="upLoadWarehouse">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog :title="isEdit?'è´§æ¶ä¿®æ¹':'è´§æ¶æ°å¢'" :visible.sync="shelvesVisible" width="350px"> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>è´§æ¶åç§°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="shelves.name" size="small"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>è´§æ¶å±æ°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="shelves.row" size="small"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col class="search_thing" :span="24"> |
| | | <div class="search_label"><span class="required-span">* </span>è´§æ¶åæ°ï¼</div> |
| | | <div class="search_input"> |
| | | <el-input v-model="shelves.col" size="small"></el-input> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="shelvesVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="confirmShelves" :loading="upLoadShelves">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import Detail from './components/detail.vue' |
| | | import { |
| | | addShelf, |
| | | addWarehouse, delShelf, delWarehouse, getWarehouse, |
| | | inWarehouse, |
| | | outWarehouse, searchSampleId, |
| | | selectWarehouse, |
| | | upShelf, |
| | | upWarehouse |
| | | } from "@/api/business/sample"; |
| | | export default { |
| | | components: { |
| | | Detail |
| | | }, |
| | | data() { |
| | | return { |
| | | entity: { |
| | | warehouseId: null, |
| | | shelfId: null |
| | | }, |
| | | warehouse: [], |
| | | shelf: [], |
| | | storageList:[], |
| | | storageVisible: false, |
| | | exportVisible: false, |
| | | keepVisible: false, |
| | | warehouseVisible: false, |
| | | shelvesVisible: false, |
| | | upLoadStorage: false, |
| | | upLoadExport: false, |
| | | upLoadWarehouse: false, |
| | | upLoadShelves: false, |
| | | tableList: [], |
| | | rowList: [], |
| | | value: '', |
| | | name:'', |
| | | shelves:{}, |
| | | selectTree: [], |
| | | expandedKeys: [], |
| | | isEdit: false, //å¼¹æ¡--æ¯å¦æ¯ä¿®æ¹,é»è®¤ä¸ºfalse |
| | | isDetail: false, //详æ
--æ¯å¦å±ç¤ºä¸ºè¯¦æ
页é¢ï¼é»è®¤ä¸ºfalse |
| | | currentEdit:null,//å½åè¦ç»´æ¤çä¿¡æ¯ |
| | | tableLoading:false, |
| | | sampleCode:'', |
| | | currentId:null, |
| | | searchSampleCode:'' |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.selectList() |
| | | }, |
| | | methods: { |
| | | selectList() { |
| | | selectWarehouse().then(res => { |
| | | this.warehouse = res.data |
| | | if(res.data.length==0){ |
| | | this.entity.warehouseId = ''; |
| | | this.entity.shelfId = ''; |
| | | this.tableList = [] |
| | | } |
| | | this.storageList = this.HaveJson(res.data).map(item=>{ |
| | | item.warehouseShelfList&&item.warehouseShelfList.length>0&&item.warehouseShelfList.map(m=>{ |
| | | let warehouseShelfList = []; |
| | | for (let i=1;i<m.row+1;i++){ |
| | | let warehouseShelfList0 = [] |
| | | for (let j=1;j<m.col+1;j++){ |
| | | warehouseShelfList0.push({ |
| | | name:j+' å', |
| | | id:j, |
| | | }) |
| | | } |
| | | warehouseShelfList.push({ |
| | | name:i+' å±', |
| | | id:i, |
| | | warehouseShelfList:warehouseShelfList0 |
| | | }) |
| | | } |
| | | m.warehouseShelfList = warehouseShelfList; |
| | | return m; |
| | | }) |
| | | return item; |
| | | }) |
| | | if(!this.entity.warehouseId&&this.warehouse.length>0){ |
| | | this.entity.warehouseId = this.warehouse[0].id |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | if(this.shelf.length>0){ |
| | | this.entity.shelfId = this.shelf[0].id |
| | | this.handleShelf(this.entity.shelfId) |
| | | }else{ |
| | | this.tableList = [] |
| | | } |
| | | }else if(this.warehouse.length>0){ |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | if(this.shelf.length>0){ |
| | | this.entity.shelfId = this.shelf[0].id |
| | | this.handleShelf(this.entity.shelfId) |
| | | }else{ |
| | | this.tableList = [] |
| | | } |
| | | } |
| | | }) |
| | | }, |
| | | // å
¥åº |
| | | confirmStorage() { |
| | | if (!this.sampleCode) { |
| | | this.$message.error('è¯·å¡«åæ ·åç¼å·') |
| | | return |
| | | } |
| | | if (this.selectTree.length < 4) { |
| | | this.$message.error('è¯·éæ©æ ·åå
¥åºä½ç½®') |
| | | return |
| | | } |
| | | this.upLoadStorage = true; |
| | | inWarehouse({ |
| | | trees: this.selectTree.join('-'), |
| | | sampleCode:this.sampleCode |
| | | }).then(res => { |
| | | this.upLoadStorage = false; |
| | | this.storageVisible = false |
| | | this.sampleCode = ''; |
| | | this.selectTree = [] |
| | | this.$message.success('å
¥åºæå') |
| | | this.handleShelf(this.entity.shelfId) |
| | | }).catch(err => { |
| | | this.upLoadStorage = false; |
| | | }) |
| | | }, |
| | | // åºåº |
| | | confirmExport() { |
| | | if (!this.sampleCode) { |
| | | this.$message.error('è¯·å¡«åæ ·åç¼å·') |
| | | return |
| | | } |
| | | this.upLoadExport = true; |
| | | outWarehouse({ |
| | | sampleCode:this.sampleCode |
| | | }).then(res => { |
| | | this.upLoadExport = false; |
| | | this.exportVisible = false |
| | | this.sampleCode = ''; |
| | | this.$message.success('åºåºæå') |
| | | this.handleShelf(this.entity.shelfId) |
| | | }).catch(err => { |
| | | this.upLoadExport = false; |
| | | }) |
| | | }, |
| | | // æ·»å /ä¿®æ¹ä»åº |
| | | confirmWarehouse() { |
| | | if (!this.name) { |
| | | this.$message.error('请填åä»åºåç§°') |
| | | return |
| | | } |
| | | this.upLoadWarehouse = true; |
| | | if(this.currentEdit&&this.currentEdit.id){ |
| | | // ä¿®æ¹ä»åº |
| | | upWarehouse({ |
| | | name: this.name, |
| | | id:this.currentEdit.id |
| | | }).then(res => { |
| | | this.upLoadWarehouse = false; |
| | | this.warehouseVisible = false |
| | | // this.keepVisible = false |
| | | this.currentEdit = null; |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.selectList() |
| | | this.name = '' |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }).catch(err => { |
| | | this.upLoadWarehouse = false; |
| | | }) |
| | | }else{ |
| | | // æ°å¢ä»åº |
| | | addWarehouse({ |
| | | name: this.name |
| | | }).then(res => { |
| | | this.upLoadWarehouse = false; |
| | | this.warehouseVisible = false |
| | | this.$message.success('æ·»å æå') |
| | | this.selectList() |
| | | this.name = '' |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }).catch(err => { |
| | | this.upLoadWarehouse = false; |
| | | }) |
| | | } |
| | | }, |
| | | // æ·»å /ä¿®æ¹è´§æ¶ |
| | | confirmShelves() { |
| | | if (!this.shelves.name) { |
| | | this.$message.error('请填åè´§æ¶åç§°') |
| | | return |
| | | } |
| | | if (!this.shelves.row) { |
| | | this.$message.error('请填åè´§æ¶å±æ°') |
| | | return |
| | | } |
| | | if (!this.shelves.col) { |
| | | this.$message.error('请填åè´§æ¶åæ°') |
| | | return |
| | | } |
| | | this.upLoadShelves = true; |
| | | if(this.currentEdit&&this.currentEdit.id){ |
| | | // ä¿®æ¹ |
| | | upShelf({ |
| | | id:this.currentEdit.id,...this.shelves |
| | | }).then(res => { |
| | | this.upLoadShelves = false; |
| | | this.shelvesVisible = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | this.selectList() |
| | | this.currentEdit ={}; |
| | | }).catch(err => { |
| | | this.upLoadShelves = false; |
| | | }) |
| | | }else{ |
| | | // æ°å¢ |
| | | addShelf({ |
| | | warehouseId: this.entity.warehouseId,...this.shelves |
| | | }).then(res => { |
| | | this.upLoadShelves = false; |
| | | this.shelvesVisible = false |
| | | this.$message.success('æ·»å æå') |
| | | this.selectList() |
| | | this.shelves = {} |
| | | }).catch(err => { |
| | | this.upLoadShelves = false; |
| | | }) |
| | | } |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }, |
| | | filterNode(value, data) { |
| | | if (!value) return true; |
| | | return data.label.indexOf(value) !== -1; |
| | | }, |
| | | handleNodeClick(val, node, el) { //æ çå¼ |
| | | this.selectTree[node.level-1] = val.id; |
| | | }, |
| | | nodeOpen(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder-opened') |
| | | this.selectTree[node.level-1] = data.id; |
| | | }, |
| | | nodeClose(data, node, el) { |
| | | $($(el.$el).find('.node_i')[0]).attr('class', 'node_i el-icon-folder') |
| | | }, |
| | | handleDelete(row, level) { |
| | | this.$confirm('æ¯å¦å½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | if (level == 1) { |
| | | // å é¤ä»åº |
| | | delWarehouse({ |
| | | id: row.id |
| | | }).then(res => { |
| | | this.$message.success('æå') |
| | | this.selectList() |
| | | }).catch(e => { |
| | | this.$message.error('失败') |
| | | }) |
| | | }else{ |
| | | // å é¤è´§æ¶ |
| | | delShelf({ |
| | | id: row.id |
| | | }).then(res => { |
| | | this.$message.success('æå') |
| | | this.selectList() |
| | | }).catch(e => { |
| | | this.$message.error('失败') |
| | | }) |
| | | } |
| | | this.warehouseChange(this.entity.warehouseId) |
| | | }).catch(() => {}) |
| | | }, |
| | | handleEdit(data, level) { |
| | | this.isEdit = true; |
| | | // 夿æ¯ç¬¬å å±çº§ï¼ç¬¬ä¸å±çº§ï¼ä¿®æ¹ä»åºï¼ç¬¬äºå±çº§ä¿®æ¹è´§æ¶ |
| | | if (level == 1) { |
| | | this.warehouseVisible = true; |
| | | this.currentEdit = data; |
| | | this.name = data.name |
| | | } else { |
| | | this.shelvesVisible = true; |
| | | this.currentEdit = data; |
| | | this.shelves = { |
| | | name:data.name, |
| | | row:data.row, |
| | | col:data.col, |
| | | warehouseId:data.warehouseId |
| | | } |
| | | } |
| | | }, |
| | | // æ¥ç详æ
|
| | | handelDetail(row) { |
| | | this.currentId = row.id; |
| | | this.isDetail = true; |
| | | }, |
| | | warehouseChange(val) { |
| | | this.tableList = [] |
| | | let map = this.warehouse.find(a => { |
| | | return a.id === val ? a : null |
| | | }) |
| | | this.shelf = map.warehouseShelfList; |
| | | this.entity.shelfId = ''; |
| | | }, |
| | | handleShelf(e){ |
| | | if(e){ |
| | | this.tableLoading = true; |
| | | getWarehouse({shelfId: e}).then(res => { |
| | | this.tableLoading = false; |
| | | let data = res.data; |
| | | let set =new Set() |
| | | this.tableList = []; |
| | | let arr = [] |
| | | data.forEach(m=>{ |
| | | set.add(m.col) |
| | | if(arr.length>0){ |
| | | if(arr.find(n=>n.row==m.row)){ |
| | | arr.push(m) |
| | | }else{ |
| | | this.tableList.push(arr) |
| | | arr = [] |
| | | arr.push(m) |
| | | } |
| | | }else{ |
| | | arr.push(m) |
| | | } |
| | | }) |
| | | this.tableList.push(arr) |
| | | this.rowList = []; |
| | | for(let i=0;i<set.size;i++){ |
| | | this.rowList.push(`${i+1} å`) |
| | | } |
| | | }).catch(e=>{ |
| | | this.tableLoading = false; |
| | | }) |
| | | } |
| | | }, |
| | | handleSearch(){ |
| | | if(!this.searchSampleCode){ |
| | | this.$message.error('请è¾å
¥æ ·åç¼å·') |
| | | return; |
| | | } |
| | | searchSampleId({sampleCode: this.searchSampleCode}).then(res => { |
| | | if(res.code==200){ |
| | | this.currentId = res.data; |
| | | this.isDetail = true; |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .title { |
| | | height: 60px; |
| | | line-height: 60px; |
| | | } |
| | | |
| | | .search { |
| | | background-color: #fff; |
| | | height: 80px; |
| | | display: flex; |
| | | align-items: center; |
| | | position: relative; |
| | | } |
| | | |
| | | .search_thing { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 50px; |
| | | } |
| | | |
| | | .search_label { |
| | | width: 90px; |
| | | font-size: 14px; |
| | | text-align: right; |
| | | } |
| | | |
| | | .search_input { |
| | | width: calc(100% - 120px); |
| | | } |
| | | |
| | | .table { |
| | | margin-top: 10px; |
| | | background-color: #fff; |
| | | width: calc(100% - 40px); |
| | | height: calc(100% - 60px - 80px - 10px - 40px); |
| | | padding: 20px; |
| | | overflow-y: auto; |
| | | } |
| | | |
| | | .el-form-item { |
| | | margin-bottom: 16px; |
| | | } |
| | | |
| | | .btns { |
| | | position: absolute; |
| | | right: 10px; |
| | | top: 25px; |
| | | display: flex; |
| | | align-items: center; |
| | | z-index: 9; |
| | | } |
| | | |
| | | .tables { |
| | | width: 100%; |
| | | height: 100%; |
| | | border-bottom: none; |
| | | } |
| | | |
| | | .tables th { |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .tables td { |
| | | font-size: 12px; |
| | | text-align: center; |
| | | vertical-align: top; |
| | | border-color: rgb(192, 191, 191) !important; |
| | | padding: 5px; |
| | | box-sizing: border-box; |
| | | height: 120px; |
| | | } |
| | | |
| | | .tables ul { |
| | | list-style-type: none; |
| | | } |
| | | |
| | | .tables ul li { |
| | | border-radius: 3px; |
| | | padding: 4px 10px; |
| | | box-sizing: border-box; |
| | | margin-bottom: 5px; |
| | | font-size: 12px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: start; |
| | | color: #333333; |
| | | cursor: pointer; |
| | | overflow: hidden; /*è¶
åºé¨åéè*/ |
| | | white-space: nowrap; /*ç¦æ¢æ¢è¡*/ |
| | | text-overflow: ellipsis; /*çç¥å·*/ |
| | | } |
| | | |
| | | .tables h4 { |
| | | color: #999999; |
| | | font-size: 14px; |
| | | font-weight: 400; |
| | | padding: 6px 0; |
| | | } |
| | | |
| | | .tables i { |
| | | display: inline-block; |
| | | width: 6px; |
| | | height: 6px; |
| | | border-radius: 50%; |
| | | margin-right: 6px; |
| | | } |
| | | |
| | | li:hover { |
| | | background: rgba(58, 123, 250, 0.18); |
| | | } |
| | | |
| | | li:hover i { |
| | | background: #3A7BFA; |
| | | } |
| | | |
| | | li:hover .num { |
| | | color: #3A7BFA; |
| | | } |
| | | |
| | | .green { |
| | | background: #E0F6EA; |
| | | } |
| | | |
| | | .green i { |
| | | background: #34BD66; |
| | | } |
| | | |
| | | .green .num { |
| | | color: #34BD66; |
| | | } |
| | | |
| | | .el-dialog { |
| | | position: relative; |
| | | } |
| | | |
| | | .shaoma { |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 14px; |
| | | color: #3A7BFA; |
| | | position: absolute; |
| | | top: 23px; |
| | | right: 54px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .node_i { |
| | | color: orange; |
| | | font-size: 18px; |
| | | } |
| | | |
| | | .custom-tree-node .el-button { |
| | | opacity: 0; |
| | | } |
| | | |
| | | .custom-tree-node:hover .el-button { |
| | | opacity: 1; |
| | | } |
| | | >>>.el-loading-mask { |
| | | z-index: 10; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :close-on-press-escape="false" :visible.sync="isShow" title="ä¸åæ ¼å¤ç" |
| | | width="1040px" |
| | | @close="$emit('closeOAProcess')"> |
| | | |
| | | <table :border='true' class="table"> |
| | | <tr> |
| | | <th class="th-title">1æ£éªå</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{oneOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{oneInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{oneName}}<span v-if="oneName">ï¼</span>{{oneTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">2æ£æµä¸»ç®¡ç¡®è®¤</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{twoOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{twoInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{twoName}}<span v-if="twoName">ï¼</span>{{twoTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">3ç©æµé¨ç¡®è®¤</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{threeOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{threeInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{threeName}}<span v-if="threeName">ï¼</span>{{threeTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">4产åå·¥ç¨å¸å¤çæè§</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{fourOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{fourInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{fourName}}<span v-if="fourName">ï¼</span>{{fourTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">5.æ»å·¥æè
å¯ç»ççå¤çæè§</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{fiveOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{fiveInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{fiveName}}<span v-if="fiveName">ï¼</span>{{fiveTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">6è´¨éé¨</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{sixOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{sixInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{sixName}}<span v-if="sixName">ï¼</span>{{sixTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">7è´¨éé¨ç»ç</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{sevenOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{sevenInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{sevenName}}<span v-if="sevenName">ï¼</span>{{sevenTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">8æ ¸ç®å</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{eightOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{eightInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{eightName}}<span v-if="eightName">ï¼</span>{{eightTime}}</th> |
| | | </tr> |
| | | <tr> |
| | | <th class="th-title">9ç©æµé¨ç´¢èµç»æ</th> |
| | | <th class="th-titleSec">å¤çç»æ</th> |
| | | <th class="th-info1">{{nineOperation}}</th> |
| | | <th class="th-titleSec">å¤çæè§</th> |
| | | <th class="th-info" colspan="3">{{nineInfo}}</th> |
| | | <th style="display:none;"></th> |
| | | <th style="display:none;"></th> |
| | | <th >{{nineName}}<span v-if="nineName">ï¼</span>{{nineTime}}</th> |
| | | </tr> |
| | | </table> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "OAProcess", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: { |
| | | OAProcess: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | isShow: this.OAProcess, |
| | | oneInfo: '', |
| | | twoInfo: '', |
| | | threeInfo: '', |
| | | fourInfo: '', |
| | | fiveInfo: '', |
| | | sixInfo: '', |
| | | sevenInfo: '', |
| | | eightInfo: '', |
| | | nineInfo: '', |
| | | oneTime: '', |
| | | twoTime: '', |
| | | threeTime: '', |
| | | fourTime: '', |
| | | fiveTime: '', |
| | | sixTime: '', |
| | | sevenTime: '', |
| | | eightTime: '', |
| | | nineTime: '', |
| | | oneName: '', |
| | | twoName: '', |
| | | threeName: '', |
| | | fourName: '', |
| | | fiveName: '', |
| | | sixName: '', |
| | | sevenName: '', |
| | | eightName: '', |
| | | nineName: '', |
| | | oneOperation: '', |
| | | twoOperation: '', |
| | | threeOperation: '', |
| | | fourOperation: '', |
| | | fiveOperation: '', |
| | | sixOperation: '', |
| | | sevenOperation: '', |
| | | eightOperation: '', |
| | | nineOperation: '', |
| | | } |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | getInfo (id) { |
| | | this.$axios.post(this.$api.unqualifiedHandler.getOaFlow, { |
| | | id: id |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | const data = res.data |
| | | if (data.length > 0) { |
| | | data.forEach(item => { |
| | | if (item.nodeName === '1æ£éªå') { |
| | | this.oneInfo = item.approvalOpinion |
| | | this.oneTime = item.approvalDate |
| | | this.oneName = item.approver |
| | | this.oneOperation = item.operation |
| | | } else if (item.nodeName === '2æ£æµä¸»ç®¡ç¡®è®¤') { |
| | | this.twoInfo = item.approvalOpinion |
| | | this.twoTime = item.approvalDate |
| | | this.twoName = item.approver |
| | | this.twoOperation = item.operation |
| | | } else if (item.nodeName === '3ç©æµé¨ç¡®è®¤') { |
| | | this.threeInfo = item.approvalOpinion |
| | | this.threeTime = item.approvalDate |
| | | this.threeName = item.approver |
| | | this.threeOperation = item.operation |
| | | } else if (item.nodeName === '4产åå·¥ç¨å¸å¤çæè§') { |
| | | this.fourInfo = item.approvalOpinion |
| | | this.fourTime = item.approvalDate |
| | | this.fourName = item.approver |
| | | this.fourOperation = item.operation |
| | | } else if (item.nodeName === '5.æ»å·¥æè
å¯ç»ççå¤çæè§') { |
| | | this.fiveInfo = item.approvalOpinion |
| | | this.fiveTime = item.approvalDate |
| | | this.fiveName = item.approver |
| | | this.fiveOperation = item.operation |
| | | } else if (item.nodeName === '6è´¨éé¨') { |
| | | this.sixInfo = item.approvalOpinion |
| | | this.sixTime = item.approvalDate |
| | | this.sixName = item.approver |
| | | this.sixOperation = item.operation |
| | | } else if (item.nodeName === '7è´¨éé¨ç»ç') { |
| | | this.sevenInfo = item.approvalOpinion |
| | | this.sevenTime = item.approvalDate |
| | | this.sevenName = item.approver |
| | | this.sevenOperation = item.operation |
| | | } else if (item.nodeName === '8æ ¸ç®å') { |
| | | this.eightInfo = item.approvalOpinion |
| | | this.eightTime = item.approvalDate |
| | | this.eightName = item.approver |
| | | this.eightOperation = item.operation |
| | | } else if (item.nodeName === '9ç©æµé¨ç´¢èµç»æ') { |
| | | this.nineInfo = item.approvalOpinion |
| | | this.nineTime = item.approvalDate |
| | | this.nineName = item.approver |
| | | this.nineOperation = item.operation |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }).catch(err => { |
| | | this.submitDeclareLoading = false |
| | | console.log(err) |
| | | }) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table { |
| | | width: 100%; |
| | | height: 500px; |
| | | } |
| | | .th-title { |
| | | width: 160px; |
| | | text-align: left; |
| | | background-color: #e0eaf5; |
| | | font-size: 16px; |
| | | } |
| | | .th-titleSec { |
| | | width: 70px; |
| | | background-color: #e0eaf5; |
| | | font-size: 16px; |
| | | } |
| | | .th-info { |
| | | width: 210px; |
| | | text-align: left; |
| | | font-size: 16px; |
| | | } |
| | | .th-info1 { |
| | | width: 100px; |
| | | text-align: center; |
| | | font-size: 16px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="è§æ ¼åå·" prop="model"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.model" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°" prop="sample"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.sample" |
| | | @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> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <el-dialog |
| | | title="æäº¤" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="dialogVisible" |
| | | width="30%"> |
| | | <span>æ¯å¦ç¡®è®¤æäº¤OAï¼</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitOA" :loading="submitOALoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <el-dialog |
| | | title="å é¤" |
| | | :show-close="false" |
| | | :close-on-press-escape="false" |
| | | :close-on-click-modal="false" |
| | | :visible.sync="deleteVisible" |
| | | width="30%"> |
| | | <span>æ¯å¦ç¡®è®¤<span style="color: #FF4902">å é¤</span>OAï¼</span> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="deleteVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="cancelOA" :loading="cancelOALoading">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <UnPassDialog ref="unPassDialog" v-if="unPassDialog" |
| | | :orderId="orderId" |
| | | @resetForm="resetForm1" |
| | | :unPassDialog="unPassDialog"></UnPassDialog> |
| | | <OAProcess ref="OAProcess" |
| | | :OAProcess="OAProcess" |
| | | @closeOAProcess="closeOAProcess" |
| | | v-if="OAProcess"></OAProcess> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import UnPassDialog from "./components/unPassDialog.vue"; |
| | | import OAProcess from "./components/OAProcess.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {deleteUnqualifiedHandler, page, pushOA} from "@/api/business/unqualifiedHandler"; |
| | | import ValueTable from "@/components/Table/value-table.vue"; |
| | | export default { |
| | | components: { |
| | | limsTable, |
| | | OAProcess, |
| | | UnPassDialog, |
| | | ValueTable |
| | | }, |
| | | data() { |
| | | return { |
| | | handlerId: null, |
| | | entity: { |
| | | sample: null, |
| | | model: null, |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | { label: 'ç¼å·', prop: 'no' }, |
| | | { |
| | | label: "OAå®¡æ ¸ç¶æ", |
| | | prop: "oaState", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return "å¾
å®¡æ ¸"; |
| | | } else if(params == 2) { |
| | | return "å®¡æ ¸ä¸"; |
| | | } else if(params == 3) { |
| | | return "éè¿"; |
| | | } else { |
| | | return "驳å"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return "warning"; |
| | | } else if(params == 2) { |
| | | return "info"; |
| | | } else if(params == 3) { |
| | | return "success"; |
| | | } else { |
| | | return "danger"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { |
| | | label: "é¶ä»¶å·", |
| | | prop: "partNo", |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "openUnPassDialog", |
| | | }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { label: 'ç©æåç§°', prop: 'materialName' }, |
| | | { label: 'çäº§æ¹æ¬¡', prop: 'productionBatch' }, |
| | | { label: 'å°è´§æ°é', prop: 'cargoQuantity' }, |
| | | { label: 'è§æ ¼åå·', prop: 'specsModels' }, |
| | | { label: 'æ¥æ£æ¥æ', prop: 'inspectTime' }, |
| | | { label: 'ç¶æ', prop: 'statusDB' }, |
| | | { label: 'åé¦äºº', prop: 'feedbackUser' }, |
| | | { label: 'è¦æ£éªçéè´æ°é', prop: 'qtyToInspect' }, |
| | | { label: 'å馿¥æ', prop: 'feedbackTime' }, |
| | | { |
| | | label: "åç±»", |
| | | prop: "classification", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "ä¸ç±»ä¸åæ ¼"; |
| | | } else if(params == 1) { |
| | | return "äºç±»ä¸åæ ¼"; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "warning"; |
| | | } else if(params == 1) { |
| | | return "info"; |
| | | } else { |
| | | return "null"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: 'ä¾åºååç§°', prop: 'supplierName' }, |
| | | { |
| | | label: "ä¸åæ ¼å½å±", |
| | | prop: "offGradeAscription", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "ç产åé¦ä¸åæ ¼"; |
| | | } else if(params == 1) { |
| | | return "æ£æµä¸åæ ¼"; |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "warning"; |
| | | } else if(params == 1) { |
| | | return "info"; |
| | | } else { |
| | | return "null"; |
| | | } |
| | | }, |
| | | }, |
| | | { label: 'ä¸åæ ¼æè¿°', prop: 'unqualifiedDesc' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: '180px', |
| | | operation: [ |
| | | { |
| | | name: 'æäº¤OA', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openOA(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.requestId !== null // ærequestId说æå·²ç»æäº¤è¿OAï¼ä¸å¯å次æäº¤ |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¥çOAæµç¨', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.OAView(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.deleteOA(row); |
| | | }, |
| | | disabled: (row, index) => { |
| | | return row.requestId !== null // ærequestId说æå·²ç»æäº¤è¿OAï¼ä¸å¯å次æäº¤ |
| | | } |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | statusList: [], |
| | | dialogVisible: false, // 确认æäº¤OAå¼¹æ¡ |
| | | unPassDialog: false, // ä¸åæ ¼å¤çå¼¹æ¡ |
| | | orderId: '', |
| | | OAProcess: false, // OAæµç¨å¼¹æ¡ |
| | | submitOALoading: false, // OAæµç¨å¼¹æ¡æäº¤æé®loading |
| | | deleteVisible: false, // OAæµç¨å é¤å¼¹æ¡ |
| | | cancelOALoading: false, // OAæµç¨å é¤å¼¹æ¡æäº¤æé®loading |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | methods: { |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | page({ ...this.page, ...this.entity }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | // æå¼ä¸åæ ¼å¤çå¼¹æ¡ |
| | | openUnPassDialog (row) { |
| | | this.unPassDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.unPassDialog.getInsOrder('view', row) |
| | | }) |
| | | }, |
| | | // å
³éä¸åæ ¼å¤çå¼¹æ¡ |
| | | resetForm1 () { |
| | | this.$refs.unPassDialog.$refs['unPassForm'].resetFields(); |
| | | this.unPassDialog = false |
| | | }, |
| | | // æå¼å é¤OAç¡®è®¤å¼¹æ¡ |
| | | deleteOA (row) { |
| | | this.handlerId = row.handlerId |
| | | this.deleteVisible = true |
| | | }, |
| | | // æäº¤å é¤ç³è¯· |
| | | cancelOA () { |
| | | this.de = true |
| | | deleteUnqualifiedHandler({id: this.handlerId,}).then(res => { |
| | | this.cancelOALoading = false |
| | | if (res.code === 200) { |
| | | this.deleteVisible = false |
| | | this.$message.success('å 餿å') |
| | | this.refreshTable('page') |
| | | } |
| | | }).catch(error => { |
| | | this.cancelOALoading = false |
| | | console.error(error); |
| | | }); |
| | | }, |
| | | // æ¥çæäº¤OAçæ°æ® |
| | | openOA (row) { |
| | | this.handlerId = row.handlerId |
| | | this.dialogVisible = true |
| | | }, |
| | | // æ¥çOAæµç¨ |
| | | OAView (row) { |
| | | this.OAProcess = true |
| | | this.$nextTick(() => { |
| | | this.$refs.OAProcess.getInfo(row.handlerId) |
| | | }) |
| | | }, |
| | | // å
³éæ¥çOAæµç¨çå¼¹æ¡ |
| | | closeOAProcess () { |
| | | this.OAProcess = false |
| | | }, |
| | | //æäº¤OA |
| | | submitOA(row) { |
| | | // æäº¤OA |
| | | this.submitOALoading = true |
| | | pushOA({handlerId: this.handlerId,}).then(res => { |
| | | this.submitOALoading = false |
| | | if (res.code === 200) { |
| | | this.dialogVisible = false |
| | | this.$message.success('æäº¤æå') |
| | | this.refreshTable('page') |
| | | } |
| | | }).catch(error => { |
| | | this.submitOALoading = false |
| | | console.error(error); |
| | | }); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="capacity-scope"> |
| | | <div class="search"> |
| | | <div> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="è§æ ¼åå·" prop="model"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.model" |
| | | @keyup.enter.native="refreshTable()"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°" prop="sample"> |
| | | <el-input size="small" placeholder="请è¾å
¥" clearable v-model="entity.sample" |
| | | @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> |
| | | </div> |
| | | <div> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {pageInsUnPass} from "@/api/business/unpass"; |
| | | |
| | | export default { |
| | | components: {limsTable}, |
| | | data() { |
| | | return { |
| | | entity: { |
| | | sample: null, |
| | | model: null, |
| | | }, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | { label: 'ç¼å·', prop: 'no' }, |
| | | { |
| | | label: "OAå®¡æ ¸ç¶æ", |
| | | prop: "oaState", |
| | | width: "100px", |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "å¦"; |
| | | } else { |
| | | return "æ¯"; |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return "danger"; |
| | | } else { |
| | | return "primary"; |
| | | } |
| | | }, |
| | | }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | width: '180px', |
| | | operation: [ |
| | | { |
| | | name: 'ç¼è¾', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.openAdd('edit', row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å é¤', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.delete(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å°ç« 管ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.fileManagement(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 10, |
| | | current: 1 |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | }, |
| | | methods :{ |
| | | refreshTable() { |
| | | this.tableLoading = true |
| | | pageInsUnPass({ ...this.page, ...this.entity }).then(res => { |
| | | this.tableLoading = false |
| | | this.tableData = res.data.records |
| | | this.page.total = res.data.total |
| | | }).catch(err => { |
| | | this.tableLoading = false |
| | | }) |
| | | }, |
| | | // éç½® |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable() |
| | | }, |
| | | // å页忢 |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .search { |
| | | height: 46px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | </style> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | <lims-table :tableData="tableData" :column="column" |
| | | :height="'calc(100vh - 250px)'" @pagination="pagination" |
| | | :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!-- æ°å¢å®éªå®¤--> |
| | | <el-dialog :title="formTitle" :visible.sync="addDia" width="450px"> |