| ¶Ô±ÈÐÂÎļþ |
| | |
| | | //éå®è®¢åæ¥æ£æ¥è¯¢æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // éå®è®¢åæ¥æ£æ¥è¯¢å
¨é¨ |
| | | export function getIfsByAll(query) { |
| | | return request({ |
| | | url: '/ifsOrderInspection/getIfsByAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // éå®è®¢åæ¥æ£æ¥çå·²å®æä¿¡æ¯ |
| | | export function getIfsByFinish(query) { |
| | | return request({ |
| | | url: '/ifsOrderInspection/getIfsByFinish', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | //ifsé¶ä»¶å±æ§æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // æ°å¢æä¿åé¶ä»¶å±æ§ |
| | | export function saveOrUpdateProps(data) { |
| | | return request({ |
| | | url: '/ifsPartProps/saveOrUpdateProps', |
| | | method: 'post', |
| | | data: data |
| | | }) |
| | | } |
| | | // æ¥è¯¢ifs订åçé¶ä»¶å±æ§è®°å½ |
| | | export function getOneByIfsId(ifsId) { |
| | | return request({ |
| | | url: '/ifsPartProps/getOneByIfsId/' + ifsId, |
| | | method: 'get' |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | // å¤è´ä¸å页é¢ç¸å
³æ¥å£ |
| | | import request from '@/utils/request' |
| | | |
| | | // æ¥è¯¢IFS订å-å¾
æ¥æ£ |
| | | export function getWarehouseSubmit(query) { |
| | | return request({ |
| | | url: '/outsourcingFinishProduct/getWarehouseSubmit', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | |
| | | // æ¥è¯¢IFS订å-å¾
æ£éª |
| | | export function getIfsByStateOne(query) { |
| | | return request({ |
| | | url: '/outsourcingFinishProduct/getIfsByStateOne', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢åææä¸å-å·²æ£éª |
| | | export function getIfsByOver(query) { |
| | | return request({ |
| | | url: '/outsourcingFinishProduct/getIfsByOver', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | | // æ¥è¯¢åææä¸å-å
¨é¨ |
| | | export function getIfsByAll(query) { |
| | | return request({ |
| | | url: '/outsourcingFinishProduct/getIfsByAll', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| | |
| | | data: query |
| | | }) |
| | | } |
| | | // æ ¹æ®ifsIdæ¥è¯¢ä¸åæ°é |
| | | export function getOrderCountByIfsId(ifsId) { |
| | | return request({ |
| | | url: '/rawMaterialOrder/getOrderCountByIfsId/'+ifsId, |
| | | method: 'get', |
| | | }) |
| | | } |
| | |
| | | import { getToken } from "@/utils/auth"; |
| | | // æ¶é´è½¬æ¢ |
| | | import Moment from "moment"; |
| | | |
| | | import Big from 'big.js' |
| | | // å
¨å±æ¹æ³æè½½ |
| | | Vue.prototype.$Big = Big; |
| | | Vue.prototype.getDicts = getDicts; |
| | | Vue.prototype.getConfigKey = getConfigKey; |
| | | Vue.prototype.parseTime = parseTime; |
| | |
| | | name: "AddOrder", |
| | | meta: { title: "è¿è¡æåä¸å", activeMenu: "/business/productOrder",keepAlive: true }, |
| | | }, |
| | | { |
| | | // å¤è´ä¸å-è¿è¡å¤è´ä¸å |
| | | path: "customsInspectionOrder", |
| | | component: () => |
| | | import("@/views/business/productOrder/components/addOrder.vue"), |
| | | name: "CustomsInspectionOrder", |
| | | meta: { |
| | | title: "è¿è¡å¤è´æåä¸å", |
| | | activeMenu: "/business/outsourcingFinishProduct", |
| | | keepAlive: true |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | // å¤è´æåä¸å |
| | | path: "/outsourcingFinishProduct", |
| | | component: Layout, |
| | | hidden: true, |
| | | permissions: ["business:outsourcingFinishProduct"], |
| | | children: [ |
| | | { |
| | | // æ¥çæåä¸å详æ
|
| | | path: "addView", |
| | | component: () => |
| | | import("@/views/business/productOrder/components/addView.vue"), |
| | | name: "AddView", |
| | | meta: { title: "æ¥çæåä¸å详æ
", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true }, |
| | | }, |
| | | { |
| | | // è¿è¡ä¸å-æåä¸å |
| | | path: "addOrder", |
| | | component: () => |
| | | import("@/views/business/productOrder/components/addOrder.vue"), |
| | | name: "AddOrder", |
| | | meta: { title: "è¿è¡æåä¸å", activeMenu: "/business/outsourcingFinishProduct",keepAlive: true }, |
| | | }, |
| | | { |
| | | // å¤è´ä¸å-è¿è¡å¤è´ä¸å |
| | | path: "customsInspectionOrder", |
| | | component: () => |
| | | import("@/views/business/materialOrder/customsInspectionOrder"), |
| | | name: "CustomsInspectionOrder", |
| | | meta: { |
| | | title: "è¿è¡å¤è´æåä¸å", |
| | | activeMenu: "/business/outsourcingFinishProduct", |
| | | keepAlive: true |
| | | }, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import Big from "big.js"; |
| | | |
| | | /** |
| | | * å®å
¨è®¡ç®å¨ï¼æ¯æ + - * / 忬å·ï¼ |
| | | * @param {string} expr æ°å¦è¡¨è¾¾å¼ï¼å¦ "(0.1 + 0.2) * 3" |
| | | * @returns {string} 计ç®ç»æå符串 |
| | | */ |
| | | export function bigEval(expr) { |
| | | console.log(expr) |
| | | // æ¥éª¤1ï¼è¯æ³åæ |
| | | const tokens = tokenize(expr); |
| | | // æ¥éª¤2ï¼è½¬æ¢ä¸ºéæ³¢å
°è¡¨è¾¾å¼ï¼åç¼è¡¨è¾¾å¼ï¼ |
| | | const rpn = shuntingYard(tokens); |
| | | // æ¥éª¤3ï¼æ§è¡è®¡ç® |
| | | return evaluateRPN(rpn); |
| | | } |
| | | |
| | | // è¯æ³åæå¨ |
| | | function tokenize(expr) { |
| | | const tokens = []; |
| | | let numBuffer = ""; |
| | | let prevToken = null; |
| | | |
| | | const flushNumber = () => { |
| | | if (numBuffer) { |
| | | // æ°å¢ï¼éªè¯æ°åæ ¼å¼ï¼æ¯æè´æ°ãå°æ°ï¼ |
| | | if (!/^-?(\d+(\.\d*)?|\.\d+)$/.test(numBuffer)) { |
| | | throw new Error(`æ ææ°åæ ¼å¼: ${numBuffer}`); |
| | | } |
| | | if (numBuffer.startsWith(".")) numBuffer = "0" + numBuffer; |
| | | tokens.push({ type: "number", value: numBuffer }); |
| | | numBuffer = ""; |
| | | } |
| | | }; |
| | | |
| | | for (let i = 0; i < expr.length; i++) { |
| | | const c = expr[i]; |
| | | if (/\d|\./.test(c)) { |
| | | numBuffer += c; |
| | | } else if ("+-*/()".includes(c)) { |
| | | // ä¿®æ¹ï¼å¢å numBuffer 为空ç夿ï¼ç¡®ä¿è´å·åªè½ä½ä¸ºæ°ååç¼ï¼å
³é®ä¿®å¤ï¼ |
| | | if (c === "-" && numBuffer === "" && ( |
| | | !prevToken || |
| | | (prevToken.type === "operator" && prevToken.value !== ")") |
| | | )) { |
| | | numBuffer += c; |
| | | } else { |
| | | flushNumber(); |
| | | tokens.push({ type: "operator", value: c }); |
| | | } |
| | | prevToken = tokens[tokens.length - 1]; |
| | | } else if (c !== " ") { |
| | | throw new Error(`éæ³å符: ${c}`); |
| | | } |
| | | } |
| | | |
| | | flushNumber(); |
| | | return tokens; |
| | | } |
| | | |
| | | // è°åº¦åºç®æ³çæéæ³¢å
°è¡¨è¾¾å¼ |
| | | function shuntingYard(tokens) { |
| | | const output = []; |
| | | const stack = []; |
| | | const precedence = { "+": 1, "-": 1, "*": 2, "/": 2 }; |
| | | |
| | | for (const token of tokens) { |
| | | if (token.type === "number") { |
| | | output.push(token.value); |
| | | } else if (token.value === "(") { |
| | | stack.push(token.value); |
| | | } else if (token.value === ")") { |
| | | while (stack.length && stack[stack.length - 1] !== "(") { |
| | | output.push(stack.pop()); |
| | | } |
| | | stack.pop(); // å¼¹åºå·¦æ¬å· |
| | | } else { |
| | | while ( |
| | | stack.length && |
| | | stack[stack.length - 1] !== "(" && |
| | | precedence[stack[stack.length - 1]] >= precedence[token.value] |
| | | ) { |
| | | output.push(stack.pop()); |
| | | } |
| | | stack.push(token.value); |
| | | } |
| | | } |
| | | |
| | | while (stack.length) output.push(stack.pop()); |
| | | return output; |
| | | } |
| | | |
| | | // æ§è¡éæ³¢å
°è¡¨è¾¾å¼è®¡ç® |
| | | function evaluateRPN(rpn) { |
| | | const stack = []; |
| | | |
| | | for (const token of rpn) { |
| | | if (/[-]?\d|\./.test(token)) { |
| | | stack.push(new Big(token)); |
| | | } else { |
| | | const b = stack.pop(); |
| | | const a = stack.pop(); |
| | | |
| | | switch (token) { |
| | | case "+": stack.push(a.plus(b)); break; |
| | | case "-": stack.push(a.minus(b)); break; |
| | | case "*": stack.push(a.times(b)); break; |
| | | case "/": |
| | | if (b.eq(0)) throw new Error("餿°ä¸è½ä¸ºé¶"); |
| | | stack.push(a.div(b)); |
| | | break; |
| | | default: throw new Error(`æªç¥è¿ç®ç¬¦: ${token}`); |
| | | } |
| | | } |
| | | } |
| | | |
| | | return stack.pop().toString(); |
| | | } |
| | |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "æåä¸å"; |
| | | } else { |
| | | return "å¤è´ä¸å"; |
| | | } else if(params==1) { |
| | | return "åææä¸å"; |
| | | }else{ |
| | | return "å§æä¸å"; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | currentTime: null, |
| | | sonLaboratoryList: [], |
| | | typeSourceList: [ |
| | | { label: 'æåä¸å', value: 0 }, |
| | | { label: 'å§æä¸å', value: -1 }, |
| | | { label: 'å¤è´ä¸å', value: 0 }, |
| | | { label: 'åææä¸å', value: 1 }, |
| | | ], |
| | | isCopper: null, |
| | |
| | | }, |
| | | claimVisible: false, |
| | | tabList: [ |
| | | { label: "å§æ", value: 0 }, |
| | | { label: "å§æ", value: -1 }, |
| | | { label: "åææ", value: 1 }, |
| | | { label: "å¤è´", value: 0 }, |
| | | ], |
| | | active: 1, |
| | | tabIndex: 0, |
| | |
| | | planTotal: 0, |
| | | insStateList: [], |
| | | state: 0, // 0:å°è´¦é¡µï¼1ï¼æ£éªé¡µé¢,2æ£éªé¡µé¢(夿 ¸)ï¼é»è®¤ä¸º0,3æ°æ®æ¥ç |
| | | typeSource: null, // 0:æåä¸åï¼1ï¼åææä¸å |
| | | typeSource: -1, // 0:å¤è´æåä¸åï¼1ï¼åææä¸å |
| | | sonLaboratory: null, // 0:å§æï¼1ï¼åææ |
| | | activeFace: 0, // 1ï¼ä¸åï¼2ï¼æ¥çï¼3ï¼å®¡æ ¸ï¼é»è®¤ä¸º0 |
| | | currentId: null, |
| | |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "æåä¸å"; |
| | | } else { |
| | | return "å¤è´ä¸å"; |
| | | } else if(params==1) { |
| | | return "åææä¸å"; |
| | | }else{ |
| | | return "å§æä¸å"; |
| | | } |
| | | }, |
| | | }, |
| | |
| | | lookTableLoading: false, |
| | | // æ°æ®æ¥çç¸å
³å段---ç»æ |
| | | retestVisible: false, |
| | | upIndex: 0 |
| | | upIndex: 0, |
| | | tabLabel: '' |
| | | }; |
| | | }, |
| | | mounted() { |
| | | this.getAuthorizedPerson(); |
| | | this.queryParams.userId = this.userId; |
| | | this.queryParams.typeSource = this.typeSource |
| | | this.currentTime = getYearAndMonthAndDays(); |
| | | this.getDicts("urgency_level").then((response) => { |
| | | this.urgencyLevel = this.dictToValue(response.data); |
| | |
| | | this.getDicts("inspection_task_state").then((response) => { |
| | | this.inspectionTaskState = this.dictToValue(response.data); |
| | | }); |
| | | this.queryParams.typeSource = this.typeSource |
| | | this.refreshTable(); |
| | | }, |
| | | methods: { |
| | |
| | | }, |
| | | refreshTable(e) { |
| | | this.page.current = 1; |
| | | this.queryParams.typeSource = this.tabIndex; |
| | | this.queryParams.tabLabel = this.tabLabel; |
| | | this.queryParams.typeSource = this.typeSource; |
| | | this.getList(); |
| | | }, |
| | | // ä¸è½½æ¥å |
| | |
| | | }, |
| | | handleTab(m, i) { |
| | | this.tabIndex = i; |
| | | this.typeSource =m.value; |
| | | this.queryParams.sonLaboratory = ""; |
| | | this.refreshTable(); |
| | | }, |
| | |
| | | <template> |
| | | <div v-loading="loading" class="inspection" style="background-color: rgb(245, 247, 251);"> |
| | | <el-row class="title"> |
| | | <el-col :span="8" style="text-align: left"> |
| | | <el-col v-if="insOrder.ifsOrderType!=='02wg'" :span="8" style="text-align: left"> |
| | | <el-form :inline="true" :model="otherForm" class="form-inline" label-width="50px" |
| | | style="text-align: right; padding-top: 0; display: inline"> |
| | | <el-form-item label="温度:" style="margin-bottom: 0"> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="16" style="text-align: right"> |
| | | <el-col :span="insOrder.ifsOrderType!=='02wg'?16:24" style="text-align: right"> |
| | | <el-button v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'" size="small" type="primary" @click="showMaterialPropsDialog">IFSç©æå±æ§æ´æ°</el-button> |
| | | <el-button size="small" type="primary" @click="refreshView">å·æ°</el-button> |
| | | <el-button v-if="typeSource == 1" size="small" type="primary" @click="openPurchase">è¿è´§éªè¯</el-button> |
| | | <el-button v-if="state == 1 && typeSource == 1" size="small" type="primary" |
| | | <el-button v-if="state == 1 && [0,1].includes(Number(typeSource))" size="small" type="primary" |
| | | @click="openUnPassDialog('add')">ä¸åæ ¼å¤ç</el-button> |
| | | <el-button size="small" type="primary" @click="sampleVisible = true; uploadSample();">æ ·å忢</el-button> |
| | | <!-- <el-button v-if="state == 1" size="small" type="primary" @click="taskVisible = true">ä»»å¡åæ¢</el-button>--> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | <div class="search"> |
| | | <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px"> |
| | | <el-form-item label="å§æç¼å·:"> |
| | | <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åç¼å·:"> |
| | | <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode"> |
| | | <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååç§°:"> |
| | | <el-input v-model="currentSample.sample" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·åæ°é:"> |
| | | <el-input v-model="sampleProduct.length" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ·ååå·:"> |
| | | <el-input v-model="currentSample.model" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åæ¶é´:"> |
| | | <el-input v-model="insOrder.sendTime" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ç´§æ¥ç¨åº¦:"> |
| | | <el-input v-model="insOrder.typeName" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="çº¦å®æ¶é´:"> |
| | | <el-input v-model="insOrder.appointed" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="typeSource === 1" label="æ½æ£æ°é:"> |
| | | <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item v-if="typeSource === 1" label="åå®¶å¯åº¦:"> |
| | | <el-input v-model="supplierDensity" clearable disabled placeholder="请è¾å
¥" size="small"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½åæ ·å使°:" label-width="120px"> |
| | | <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag> |
| | | </el-form-item> |
| | | <el-form-item label="夿³¨:"> |
| | | <!-- <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>--> |
| | | <!-- <el-form :inline="true" :model="searchForm" class="form-inline" label-position="right" label-width="100px">--> |
| | | <!-- <el-form-item label="å§æç¼å·:">--> |
| | | <!-- <el-input v-model="insOrder.entrustCode" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ ·åç¼å·:">--> |
| | | <!-- <el-tooltip :content="currentSample.sampleCode" :disabled="!currentSample.sampleCode">--> |
| | | <!-- <el-input v-model="currentSample.sampleCode" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-tooltip>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ ·ååç§°:">--> |
| | | <!-- <el-input v-model="currentSample.sample" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ ·åæ°é:">--> |
| | | <!-- <el-input v-model="sampleProduct.length" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="æ ·ååå·:">--> |
| | | <!-- <el-input v-model="currentSample.model" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="ä¸åæ¶é´:">--> |
| | | <!-- <el-input v-model="insOrder.sendTime" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="ç´§æ¥ç¨åº¦:">--> |
| | | <!-- <el-input v-model="insOrder.typeName" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="çº¦å®æ¶é´:">--> |
| | | <!-- <el-input v-model="insOrder.appointed" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-if="typeSource === 1" label="æ½æ£æ°é:">--> |
| | | <!-- <el-input v-model="insOrder.testQuantity" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item v-if="typeSource === 1" label="åå®¶å¯åº¦:">--> |
| | | <!-- <el-input v-model="supplierDensity" clearable disabled placeholder="请è¾å
¥" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="å½åæ ·å使°:" label-width="120px">--> |
| | | <!-- <el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="夿³¨:">--> |
| | | <!-- <!– <span style="color:red">{{ insOrder.remark?insOrder.remark:'-' }}</span>–>--> |
| | | <!-- <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请è¾å
¥" size="small"--> |
| | | <!-- @blur="subOtherForm(insOrder.remark, 'remark')"></el-input>--> |
| | | <!-- <!– <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> –>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <template v-if="insOrder.isSplitOrder && insOrder.isSplitOrder===1">--> |
| | | <!-- <el-form-item label="夿¤é¢è²:">--> |
| | | <!-- <el-input v-model="insOrder.outerColor" clearable disabled placeholder="" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="ç»ç¼é¢è²:">--> |
| | | <!-- <el-input v-model="insOrder.insulationColor" clearable disabled placeholder="" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- <el-form-item label="çå·:">--> |
| | | <!-- <el-input v-model="insOrder.drumNo" clearable disabled placeholder="" size="small"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <!-- </template>--> |
| | | <!-- </el-form>--> |
| | | <el-descriptions title="æ£éªåæ¦åµ" :column="4" border> |
| | | <template v-if="insOrder.ifsOrderType"> |
| | | <el-descriptions-item label="é¶ä»¶å·">{{insOrder.partNo}}</el-descriptions-item> |
| | | <el-descriptions-item label="é¶ä»¶åç§°">{{insOrder.partDetail}}</el-descriptions-item> |
| | | <el-descriptions-item label="æ¹æ¬¡å·">{{ insOrder.lotBatchNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ ·ååå·" >{{currentSample.model}}</el-descriptions-item> |
| | | <el-descriptions-item label="æ½æ£æ°é">{{insOrder.testQuantity}}</el-descriptions-item> |
| | | <el-descriptions-item label="åå®¶å¯åº¦">{{supplierDensity}}</el-descriptions-item> |
| | | <template v-if="insOrder.ifsOrderType && insOrder.ifsOrderType==='02wg'"> |
| | | <el-descriptions-item label="è½½å
·ç¼å·">{{insOrder.drumNo}}</el-descriptions-item> |
| | | <el-descriptions-item label="èµ·å§ç±³æ (km)">{{insOrder.startMeterMark}}</el-descriptions-item> |
| | | <el-descriptions-item label="æªæ¢ç±³æ (km)">{{insOrder.endMeterMark}}</el-descriptions-item> |
| | | <el-descriptions-item label="å
¥åºé¿åº¦(km)">{{calcInbondLength(insOrder.startMeterMark,insOrder.endMeterMark)}}</el-descriptions-item> |
| | | <el-descriptions-item label="ç»ç¼é¢è²">{{insOrder.insulationColor}}</el-descriptions-item> |
| | | <el-descriptions-item label="夿¤é¢è²">{{insOrder.outerColor}}</el-descriptions-item> |
| | | <el-descriptions-item label="å°åä¿¡æ¯">{{insOrder.letteringInfo}}</el-descriptions-item> |
| | | </template> |
| | | </template> |
| | | <template v-else> |
| | | <el-descriptions-item label="å§æç¼å·">{{ insOrder.entrustCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ ·åç¼å·">{{ currentSample.sampleCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ ·ååç§°">{{ currentSample.sample }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ ·åæ°é">{{ sampleProduct.length }}</el-descriptions-item> |
| | | <el-descriptions-item label="æ ·ååå·">{{ currentSample.model }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¸åæ¶é´">{{ insOrder.sendTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="ç´§æ¥ç¨åº¦">{{ insOrder.typeName }}</el-descriptions-item> |
| | | <el-descriptions-item label="çº¦å®æ¶é´">{{ insOrder.appointed }}</el-descriptions-item> |
| | | </template> |
| | | <el-descriptions-item label="å½åæ ·å使°"><el-tag v-if="currentKey">{{ `NO.${currentKey}` }}</el-tag></el-descriptions-item> |
| | | <el-descriptions-item label="夿³¨"> |
| | | <el-input v-model="insOrder.remark" :disabled="state != 1" clearable placeholder="请è¾å
¥" size="small" |
| | | @blur="subOtherForm(insOrder.remark, 'remark')"></el-input> |
| | | <!-- <el-tag v-if="currentKey">{{ insOrder.remark }}</el-tag> --> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | <div class="center"> |
| | | <div class="search" style=" |
| | |
| | | :purchaseDialog="purchaseDialog" @resetPurchaseDialog="resetPurchaseDialog"></purchase-verification> |
| | | <!--æ¥çå·¥æ¶å¼¹æ¡--> |
| | | <viewManHourDia ref="viewManHourDia" @submit="openAddVerifyDia"></viewManHourDia> |
| | | <!-- IFSç©æå±æ§ç¼è¾å¼¹æ¡--> |
| | | <el-dialog |
| | | title="æ´æ°IFSåºåç©ææ¹æ¬¡å±æ§" |
| | | :visible.sync="ifsMaterialPropsVisible" |
| | | width="20%"> |
| | | <el-form style="width:100%" :model="ifsMaterialPropsForm"> |
| | | <el-form-item label="è½½å
·ç¼å·(Attr1):"> |
| | | <el-input placeholder="è½½å
·ç¼å·" size="small" v-model="ifsMaterialPropsForm.drumNo"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="èµ·å§ç±³æ (Attr2):"> |
| | | <el-input @blur="validateQuality()" placeholder="èµ·å§ç±³æ " size="small" v-model="ifsMaterialPropsForm.startMeterMark"> |
| | | <span slot="suffix">km</span> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æªæ¢ç±³æ (Attr3):"> |
| | | <el-input @blur="validateQuality()" placeholder="æªæ¢ç±³æ " size="small" v-model="ifsMaterialPropsForm.endMeterMark"> |
| | | <span slot="suffix">km</span> |
| | | </el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item label="å
¥åºé¿åº¦">--> |
| | | <!-- <el-input v-model="ifsMaterialPropsForm.inboundLength"></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item label="夿¤é¢è²(Attr4):"> |
| | | <el-select size="small" v-model="ifsMaterialPropsForm.outerColor"> |
| | | <el-option v-for="(item,index) in outerColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ç»ç¼é¢è²(Attr5):"> |
| | | <el-select size="small" v-model="ifsMaterialPropsForm.insulationColor"> |
| | | <el-option v-for="(item,index) in insulationColorList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="å°åä¿¡æ¯(Attr8):"> |
| | | <el-select size="small" v-model="ifsMaterialPropsForm.letteringInfo" placeholder="è¯·éæ©"> |
| | | <el-option v-for="(item,index) in letteringInfoList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="closePartPropDialog()">å æ¶</el-button> |
| | | <el-button type="primary" @click="saveOrUpdatePartProp()">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import AddUnPass from "../unpass/components/addUnPass.vue"; |
| | | import InspectionWord from "./components/InspectionWord.vue"; |
| | | import PurchaseVerification from "../unpass/components/PurchaseVerification.vue"; |
| | | import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js"; |
| | | import { |
| | | doInsOrder, |
| | | getCableTag, |
| | |
| | | import html2canvas from "html2canvas"; |
| | | import { mapGetters } from "vuex"; |
| | | import viewManHourDia from "@/views/business/inspectionTask/components/viewManHourDia.vue"; |
| | | import {getDicts} from "@/api/system/dict/data"; |
| | | export default { |
| | | name: 'Inspection', |
| | | components: { |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | outerColorList:[], |
| | | insulationColorList:[], |
| | | letteringInfoList: [], |
| | | ifsMaterialPropsForm:{ |
| | | id:null, |
| | | ifsInventoryId: null, |
| | | drumNo: '', // è½½å
·ç¼å· |
| | | startMeterMark: '', // èµ·å§ç±³æ |
| | | endMeterMark: '', // æªæ¢ç±³æ |
| | | insulationColor: '', // ç»ç¼é¢è² |
| | | outerColor: '', // 夿¤é¢è² |
| | | inboundLength: '', // å
¥åºé¿åº¦ |
| | | letteringInfo: '', // å°åä¿¡æ¯ |
| | | }, |
| | | ifsMaterialPropsVisible:false, |
| | | sonLaboratory: null, |
| | | orderId: null, |
| | | state: null, |
| | |
| | | this.stopWorker(); |
| | | }, |
| | | methods: { |
| | | validateQuality(){ |
| | | let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark)); |
| | | let testQuantity = Number(this.insOrder.testQuantity); |
| | | if(inboundLength!=null && testQuantity!==inboundLength){ |
| | | this.$message.warning(`å
¥åºé¿åº¦(${inboundLength}km)䏿£éªæ°é(${testQuantity}km)ä¸ç¬¦ï¼è¯·ç¡®è®¤ï¼`); |
| | | } |
| | | }, |
| | | calcInbondLength(startMeterMark,endMeterMark){ |
| | | let inboundLength = null; |
| | | if((startMeterMark!=null && startMeterMark!=='') && (endMeterMark!=null&&endMeterMark!=='')){ |
| | | let minus = this.$Big(endMeterMark).minus(this.$Big(startMeterMark)); |
| | | inboundLength = Math.abs(minus) |
| | | } |
| | | return inboundLength; |
| | | }, |
| | | getLetteringInfoDicts(){ |
| | | getDicts("lettering_info_type").then(res=>{ |
| | | if(res.code==200){ |
| | | this.letteringInfoList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | getInsulationColorDicts(){ |
| | | getDicts("insulation_color_type").then(res=>{ |
| | | if(res.code==200){ |
| | | this.insulationColorList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | getOuterColorDicts(){ |
| | | getDicts("outer_color_type").then(res=>{ |
| | | if(res.code==200){ |
| | | this.outerColorList = res.data |
| | | } |
| | | }) |
| | | }, |
| | | closePartPropDialog(){ |
| | | this.ifsMaterialPropsForm = { |
| | | id:null, |
| | | ifsInventoryId: null, |
| | | drumNo: '', // è½½å
·ç¼å· |
| | | startMeterMark: '', // èµ·å§ç±³æ |
| | | endMeterMark: '', // æªæ¢ç±³æ |
| | | insulationColor: '', // ç»ç¼é¢è² |
| | | outerColor: '', // 夿¤é¢è² |
| | | inboundLength: '', // å
¥åºé¿åº¦ |
| | | letteringInfo: '', // å°åä¿¡æ¯ |
| | | } |
| | | this.ifsMaterialPropsVisible = false; |
| | | }, |
| | | getPartProps(ifsId){ |
| | | getOneByIfsId(ifsId).then((res)=>{ |
| | | if(res.code==200 && res.data){ |
| | | this.ifsMaterialPropsForm = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | saveOrUpdatePartProp(){ |
| | | this.ifsMaterialPropsForm.ifsInventoryId = this.insOrder.ifsInventoryId |
| | | saveOrUpdateProps({ |
| | | ...this.ifsMaterialPropsForm, |
| | | partNo: this.insOrder.partNo, |
| | | lotBatchNo: this.insOrder.lotBatchNo, |
| | | }).then((res)=>{ |
| | | if(res.code==200){ |
| | | this.$message.success("ä¿åæå"); |
| | | this.ifsMaterialPropsVisible = false; |
| | | this.refreshView() |
| | | } |
| | | }) |
| | | }, |
| | | //æå¼IFSç©æå±æ§å¼¹æ¡ |
| | | showMaterialPropsDialog(){ |
| | | this.getPartProps(this.insOrder.ifsInventoryId) |
| | | this.getOuterColorDicts() |
| | | this.getInsulationColorDicts() |
| | | this.getLetteringInfoDicts() |
| | | this.$nextTick(()=>{ |
| | | this.ifsMaterialPropsVisible = true; |
| | | }) |
| | | }, |
| | | // æä»¶ç®¡ç--å¼å§ |
| | | getList() { |
| | | this.tableLoading = true; |
| | |
| | | laboratory: this.sonLaboratory, |
| | | }).then(async (res) => { |
| | | this.insOrder = res.data.insOrder; |
| | | if(res.data.insOrder.ifsOrderType==='02wg'){ |
| | | //æ¥è¯¢é¶ä»¶å±æ§ |
| | | this.getPartProps(res.data.insOrder.ifsInventoryId) |
| | | } |
| | | this.supplierDensity = res.data.supplierDensity; |
| | | this.getList() |
| | | this.urgentList.forEach((m) => { |
| | |
| | | this.$message.error("请æå®å¤æ ¸äººå"); |
| | | return; |
| | | } |
| | | if (!this.otherForm.humidity) { |
| | | if (!this.otherForm.humidity && this.insOrder.ifsOrderType!=='02wg') { |
| | | this.$message.error("请è¾å
¥æ¹¿åº¦"); |
| | | return; |
| | | } |
| | | if (!this.otherForm.temperature) { |
| | | if (!this.otherForm.temperature && this.insOrder.ifsOrderType!=='02wg') { |
| | | this.$message.error("请è¾å
¥æ¸©åº¦"); |
| | | return; |
| | | } |
| | | if (!this.insOrder.lotPartId && this.insOrder.ifsOrderType==='02wg') { |
| | | this.$message.error("请填åIFSåºåç©ææ¹æ¬¡å±æ§"); |
| | | return; |
| | | } |
| | | this.submitLoading = true; |
| | |
| | | background-color: #fff; |
| | | border-radius: 3px; |
| | | margin-bottom: 10px; |
| | | padding: 10px; |
| | | } |
| | | |
| | | .search .form-inline { |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <div class="header"> |
| | | <div> |
| | | <span>éè´è®¢åä¿¡æ¯</span> |
| | |
| | | <el-button v-show="active==1" size="small" @click="templateDia=true"> |
| | | <span style="color: #3A7BFA;">ä¿å模æ¿</span> |
| | | </el-button> |
| | | <el-button v-if="active==1&&addObj.sample!=undefined&&(addObj.sample.indexOf('çµç¼')>-1 ||addObj.sample.indexOf('综å')>-1)" size="small" type="primary" @click="openCableConfig">çµç¼é
ç½®</el-button> |
| | | <el-button v-if="active==1&&addObj.sample!=undefined&&addObj.sample.indexOf('çµç¼')>-1" size="small" type="primary" @click="openAuxiliaryCore">è¾
å©çº¿è¯é
ç½®</el-button> |
| | | <el-button v-show="active==1 && addObj.orderType === 'è¿åæ£éª'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">å
æ£</el-button> |
| | | <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">æäº¤</el-button> |
| | | <el-button size="small" @click="goBack"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="search"> |
| | | <div class="search" v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <div v-show="!cableConfigShow&&!auxiliaryShow"> |
| | | <div style="display: flex;justify-content: space-between;background-color: #F5F7FB;margin-bottom: 6px"> |
| | | <div v-if="active==1"> |
| | | <el-form :inline="true" :model="addObj1" label-width="90px"> |
| | |
| | | <el-button :loading="noNeedCheckLoad" type="primary" @click="handleNoNeedCheck">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!--çµç¼é
ç½®--> |
| | | <cableConfig v-if="cableConfigShow" ref="cableConfigShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd="goBackAdd"/> |
| | | <!--è¾
å©çº¿è¯é
ç½®--> |
| | | <auxiliary-wire-core v-if="auxiliaryShow" :active="active" :isSpecial="isSpecial" :sampleSelectionList="sampleSelectionList" @goBackAdd2="goBackAdd2"></auxiliary-wire-core> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | selectStandardProductList, |
| | | selectStandardTreeListByPartNo |
| | | } from "@/api/business/rawMaterialOrder"; |
| | | import {dateFormat} from "@/utils/date"; |
| | | import {bigEval} from "@/utils/bigEval"; |
| | | import AuxiliaryWireCore from "../productOrder/components/auxiliaryWireCore.vue"; |
| | | import cableConfig from "../productOrder/components/cable-config.vue"; |
| | | |
| | | export default { |
| | | name: "CustomsInspectionOrder", |
| | | dicts: ['check_type', 'urgency_level'], |
| | | components: {}, |
| | | components: {cableConfig, AuxiliaryWireCore}, |
| | | props: { |
| | | }, |
| | | data() { |
| | | return { |
| | | cableConfigShow: false, |
| | | auxiliaryShow: false, |
| | | isSpecial: false, |
| | | sampleSelectionList: [],//æ ·åè¡¨æ ¼é䏿°æ® |
| | | isOutsourcing: 'f',//æ¯å¦å¤è´æå |
| | | customsInspection: {}, |
| | | orderType: '', |
| | | active: 0, |
| | |
| | | // this.addObj.method = null |
| | | // this.productList = [] |
| | | // }, |
| | | isOutsourcing:{ |
| | | deep: true, |
| | | handler(newVal){ |
| | | if(newVal && newVal==='t'){ |
| | | this.addObj.appointed = dateFormat(new Date(),'yyyy-MM-dd') |
| | | this.addObj.testQuantity = this.customsInspection.qtyArrived |
| | | this.addObj.orderType = 'è¿åæ£éª' |
| | | this.addObj.typeSource = 0 |
| | | } |
| | | } |
| | | }, |
| | | productList: { |
| | | deep: true, |
| | | handler(val) { |
| | |
| | | created() { |
| | | this.active = this.$route.query.active |
| | | this.orderType = this.$route.query.orderType |
| | | this.isOutsourcing = this.$route.query.isOutsourcing |
| | | this.currentId = this.$route.query.currentId |
| | | this.isReport = this.$route.query.isReport |
| | | this.customsInspection = this.$route.query.customsInspection |
| | |
| | | activated() { |
| | | this.active = this.$route.query.active |
| | | this.orderType = this.$route.query.orderType |
| | | this.isOutsourcing = this.$route.query.isOutsourcing |
| | | this.currentId = this.$route.query.currentId |
| | | this.isReport = this.$route.query.isReport |
| | | this.customsInspection = this.$route.query.customsInspection |
| | |
| | | // this.getInfo() // è·åæ°æ® |
| | | // }, |
| | | methods: { |
| | | goBackAdd () { |
| | | this.cableConfigShow = false |
| | | }, |
| | | goBackAdd2 () { |
| | | this.auxiliaryShow = false |
| | | }, |
| | | // ç¼è¾è¦æ±å¼è¡¨æ ¼ |
| | | editSpecial () { |
| | | this.isSpecial = true |
| | | this.$nextTick(() => { |
| | | this.$refs.productTable.doLayout(); |
| | | }); |
| | | }, |
| | | areObjectsValuesEqual (objects, property) { |
| | | if (!objects || objects.length === 0) return false; |
| | | const firstValue = objects[0][property]; |
| | | return objects.every(obj => obj[property] === firstValue); |
| | | }, |
| | | // è¾
å©çº¿è¯é
ç½® |
| | | openAuxiliaryCore () { |
| | | if (this.active == 1) { |
| | | if (this.sampleIds.length === 0) { |
| | | this.$message.error("æªéæ©æ ·å") |
| | | } else if (this.sampleIds.length === 1) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId) { |
| | | this.$message.error("æ ·åæªéæ©æ£éªæ å") |
| | | return |
| | | } |
| | | this.auxiliaryShow = true |
| | | } else { |
| | | // åæ¶é
ç½®å¤ä¸ªæ ·åççµç¼é
ç½®æ¶å¿
须鿩ç¸åçæ£éªæ å |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId)) { |
| | | this.$message.error("æ ·åæªéæ©æ£éªæ å") |
| | | } else { |
| | | if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) { |
| | | this.$message.error("è¯·éæ©ç¸åçæ£éªæ å") |
| | | return |
| | | } |
| | | this.auxiliaryShow = true |
| | | } |
| | | } |
| | | } else { |
| | | if (this.sampleId === null) { |
| | | this.$message.error('æªé䏿 ·å') |
| | | } |
| | | } |
| | | }, |
| | | //æå¼çµç¼é
ç½®å¼¹æ¡ |
| | | openCableConfig() { |
| | | if (this.active == 1) { |
| | | if (this.sampleIds.length === 0) { |
| | | this.$message.error("æªéæ©æ ·å") |
| | | } else if (this.sampleIds.length === 1) { |
| | | if (!this.sampleSelectionList[0].standardMethodListId) { |
| | | this.$message.error("æ ·åæªéæ©æ£éªæ å") |
| | | return |
| | | } |
| | | this.cableConfigShow = true |
| | | } else { |
| | | // åæ¶é
ç½®å¤ä¸ªæ ·åççµç¼é
ç½®æ¶å¿
须鿩ç¸åçæ£éªæ å |
| | | if (!this.sampleSelectionList.every(value => value.standardMethodListId)) { |
| | | this.$message.error("æ ·åæªéæ©æ£éªæ å") |
| | | } else { |
| | | if (!this.areObjectsValuesEqual(this.sampleSelectionList, 'standardMethodListId')) { |
| | | this.$message.error("è¯·éæ©ç¸åçæ£éªæ å") |
| | | return |
| | | } |
| | | this.cableConfigShow = true |
| | | } |
| | | } |
| | | } else { |
| | | if (this.sampleId === null) { |
| | | this.$message.error('æªé䏿 ·å') |
| | | } |
| | | } |
| | | }, |
| | | save1 () { |
| | | if (this.bsm1DiaList.length > 0) { |
| | | this.bsm1DiaList.forEach(item => { |
| | |
| | | this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate) |
| | | this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo) |
| | | this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser) |
| | | if(this.isOutsourcing==='f'){ |
| | | this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity) |
| | | } |
| | | this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity) |
| | | this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas) |
| | | this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo) |
| | |
| | | this.saveLoad = false |
| | | }) |
| | | }, |
| | | /** |
| | | * è·åå°æ°çæå¤§ä½æ° |
| | | * @param number åå·åæ° |
| | | * @param ask è¦æ±å¼ |
| | | * @param calcNum 计ç®å¼ |
| | | */ |
| | | getDecimalPlaces(number, ask, calcNum) { |
| | | console.log("计ç®å°æ°ç¹-->", number, ask, calcNum); |
| | | let count1 = 0; |
| | | let count2 = 0; |
| | | const reg = /(\d+\.)(\d+)/g; |
| | | let matches = []; |
| | | if (ask) { |
| | | matches = ask.match(reg); |
| | | } |
| | | if ( |
| | | matches && |
| | | matches.length > 0 && |
| | | matches[0].toString().indexOf(".") > -1 |
| | | ) { |
| | | count1 = matches[0].toString().split(".")[1].length; |
| | | } |
| | | if (number.toString().indexOf(".") > -1) { |
| | | count2 = number.toString().split(".")[1].length; |
| | | } |
| | | if (calcNum.toString().indexOf(".") > -1) { |
| | | const pointLength2 = calcNum.toString().split(".")[1].length; |
| | | count2 = count2 > pointLength2 ? count2 : pointLength2; |
| | | } |
| | | return count1 > count2 ? count1 : count2; |
| | | }, |
| | | handleAsk(ask,symbolItem, value) { |
| | | try{ |
| | | let code = [">", "<", "=", "ï¼", "ï¼", "â¥", "â¤", "±", "*", "/"]; |
| | |
| | | let index = code.findIndex(b => m.includes(b)) |
| | | if (index > -1) { |
| | | let arr = m.split(code[index]).filter(b => !!b) |
| | | let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | let calcNum = this.$Big( |
| | | bigEval(this.replaceAll(arr[0], symbolItem, value)) |
| | | ); |
| | | let num = calcNum.toFixed( |
| | | this.getDecimalPlaces(value, ask, calcNum) |
| | | ); |
| | | // let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | m = code[index] + '' + num |
| | | arr1.push(m) |
| | | } |
| | |
| | | let index = code.findIndex(b => ask.includes(b)) |
| | | if (index > -1) { |
| | | let arr = ask.split(code[index]).filter(b => !!b) |
| | | let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | let calcNum = this.$Big( |
| | | bigEval(this.replaceAll(arr[0], symbolItem, value)) |
| | | ); |
| | | let num = calcNum.toFixed( |
| | | this.getDecimalPlaces(value, ask, calcNum) |
| | | ); |
| | | // let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | return code[index] + '' + num |
| | | } |
| | | } |
| | |
| | | }) |
| | | }, |
| | | getProNum() { |
| | | this.sampleSelectionList.forEach((m, i) => { |
| | | this.$set(this.sampleSelectionList[i], 'proNum', m.insProduct.filter(a => a.state == 1).length) |
| | | }) |
| | | this.$refs.sampleTable.doLayout() |
| | | }, |
| | | methodFocus() { |
| | |
| | | val.forEach(a => { |
| | | this.sampleIds.push(a.id) |
| | | }) |
| | | this.sampleSelectionList = val |
| | | }, |
| | | // éä¸è¡¨æ ¼è¡çåè° |
| | | rowClick(row, column, event) { |
| | |
| | | this.sampleId = row.id |
| | | if (this.active !== 1) { |
| | | this.sampleIds = [] |
| | | this.sampleSelectionList.forEach(ele=>{ |
| | | if(ele.id == row.id){ |
| | | this.sampleIds.push(row.id) |
| | | } |
| | | }) |
| | | } |
| | | // this.productList = row.insProduct |
| | | if (this.productList !== null) { |
| | | setTimeout(() => { |
| | |
| | | repealEnterRawOrder, |
| | | repealQuarterRawOrder, |
| | | revokeInspectionReport, |
| | | updateEntrustCode |
| | | updateEntrustCode, |
| | | getOrderCountByIfsId |
| | | } from "@/api/business/rawMaterialOrder"; |
| | | import { getWarehouseSubmit } from "@/api/business/materialInspection"; |
| | | import {mapGetters} from "vuex"; |
| | |
| | | }, |
| | | // ä¸å |
| | | playOrder(row) { |
| | | this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } }); |
| | | //æ¥è¯¢å½åæ¹æ¬¡æ¯å¦å·²ç»ä¸å |
| | | getOrderCountByIfsId(row.id).then(res=>{ |
| | | if(res.code===200 && res.data>0){ |
| | | this.$message.warning('è¯¥æ¹æ¬¡å·²ä¸åï¼è¯·å¿éå¤ä¸å') |
| | | this.refreshTable('page') |
| | | return |
| | | } |
| | | this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 0, customsInspection: row, active: 1 } }); |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | // å£åº¦æ£éªä¸å |
| | | playOrderSec(row) { |
| | | this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } }); |
| | | this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 1, customsInspection: row, active: 1 } }); |
| | | }, |
| | | // ç¹å»æ ·ååç§°æ¥ç详æ
|
| | | selectAllByOne(row) { |
| | |
| | | } else { |
| | | params = {...this.entity} |
| | | } |
| | | params.orderType = "01raw"; |
| | | rawAllExport(params).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-dialog :visible.sync="isShow" title="æ ç¾æå°" top="5vh" width="600px" @close="$emit('closePrintDialog')"> |
| | | <div style="width:100%;height: 400px;overflow-y: auto;text-align: left"> |
| | | <div class="dia_body"> |
| | | <el-checkbox |
| | | v-model="checkAll" |
| | | :indeterminate="isIndeterminate" |
| | | style="margin: 10px 5px;" |
| | | @change="handleCheckAllChange">å
¨é</el-checkbox> |
| | | <el-checkbox-group v-model="checkIndexList" @change="changePrintCode()"> |
| | | <el-card v-for="(item, i) in barcodeData" :key="i" class="box-card" style="margin-bottom: 15px; font-size: 16px !important;"> |
| | | <el-checkbox :key="i" :label="i" style="position: relative;top:0;left:10px"><br></el-checkbox> |
| | | <div> |
| | | <div class="titleH1" style="text-align: center; margin-bottom: 2px;font-size: 16px">æ£æµä¸å¿æ ·åæ è¯å¡</div> |
| | | <div style="text-align: center;"> |
| | | <barcode :displayValue="false" :height="34" :value="item.barcode" :width="2"></barcode> |
| | | </div> |
| | | <div style="margin-left: 20px;text-align: left"> |
| | | <div class="item"> |
| | | <span class="full-title">æ ·ååç§°</span>: |
| | | <span class="info">{{ item.sampleView }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title">ç产åä½</span>: |
| | | <span class="info">{{ item.production }}</span> |
| | | </div> |
| | | <div class="item2"> |
| | | <span class="full-title">è§æ ¼åå·</span>: |
| | | <span class="info">{{ item.sampleModel }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title">å§ææ¥æ</span>: |
| | | <span class="info">{{ item.sendTime }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title">å§æäºº</span>: |
| | | <span class="info2">{{ item.prepareUser }}</span> |
| | | <span class="full-title">æ£æµç¼å·</span>: |
| | | <span class="info">{{ item.entrustCode }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title">æ ·åæ°é</span>: |
| | | <span class="info2">{{ item.testQuantity }}</span> |
| | | </div> |
| | | <div style="font-weight: bold;display: flex;align-items: center;"> |
| | | <span class="full-title">æ ·åç¶æ</span>: |
| | | <el-radio-group v-model="item.insState" v-removeAriaHidden style="margin-top: 7px;margin-left: 4px;"> |
| | | <el-radio :label="0" style="font-weight: bold;margin-right: 7px;">å¾
æ£</el-radio> |
| | | <el-radio :label="1" style="font-weight: bold;margin-right: 7px;">卿£</el-radio> |
| | | <el-radio :label="2" style="font-weight: bold;margin-right: 7px;">å·²æ£</el-radio> |
| | | </el-radio-group> |
| | | <span> |
| | | <el-radio v-model="item.isLeave" |
| | | :label="true" |
| | | size="small" style="margin-left: 14px;margin-top: 3px;" @click.native.prevent="changeIsLeave(item)">çæ ·</el-radio> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-checkbox-group> |
| | | </div> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="$emit('closePrintDialog')">å æ¶</el-button> |
| | | <el-button type="primary" @click="submitPrint">æ å°</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <div class="el-dialog-body" style="overflow-y: auto;margin-top: 0;position: fixed;top: 20px;right: 10px;z-index: 99999;"> |
| | | <div id="printOrder" ref="printOrder" class="printOrder"> |
| | | <el-card v-for="(item, i) in checkDataList" :key="i" class="box-card" style="font-size: 0.29cm !important;font-weight: 700;page-break-after: always;color: #000;box-shadow: none;margin: 0 !important;padding: 0 !important;"> |
| | | <div> |
| | | <div class="titleH1" style="text-align: center;margin-bottom: 1px">æ£æµä¸å¿æ ·åæ è¯å¡</div> |
| | | <div style="text-align: center;"> |
| | | <barcode :displayValue="false" :height="22" :value="item.barcode" :width="1.6"></barcode> |
| | | </div> |
| | | <div style="margin-left: 12px;text-align: left"> |
| | | <div class="item"> |
| | | <span class="full-title4">æ ·ååç§°:</span> |
| | | <span class="info4">{{ item.sampleView }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title2">ç产åä½</span>: |
| | | <span class="info">{{ item.production }}</span> |
| | | </div> |
| | | <div class="item2"> |
| | | <span class="full-title4">è§æ ¼åå·:</span> |
| | | <span class="info4">{{ item.sampleModel }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title2">å§ææ¥æ</span>: |
| | | <span class="info">{{ item.sendTime }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title2">å§æäºº</span>: |
| | | <span class="info3">{{ item.prepareUser }}</span> |
| | | <span class="full-title2">æ£æµç¼å·</span>: |
| | | <span class="info">{{ item.entrustCode }}</span> |
| | | </div> |
| | | <div class="item"> |
| | | <span class="full-title2">æ ·åæ°é</span>: |
| | | <span class="info3">{{ item.testQuantity }}</span> |
| | | </div> |
| | | <div> |
| | | <span class="full-title2">æ ·åç¶æ</span>: |
| | | <span style="white-space: nowrap;margin-left: 2px"> |
| | | å¾
æ£<span v-if="item.insState!==0" class="scor"></span><span v-if="item.insState===0" class="checked">â</span> |
| | | 卿£<span v-if="item.insState!==1" class="scor"></span><span v-if="item.insState===1" class="checked">â</span> |
| | | å·²æ£<span v-if="item.insState!==2" class="scor"></span><span v-if="item.insState===2" class="checked">â</span> |
| | | çæ ·<span v-if="!item.isLeave" class="scor"></span><span v-if="item.isLeave" class="checked">â</span> |
| | | </span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import PrintJS from "print-js"; |
| | | import {labelOrderPrinting} from "@/api/business/productOrder"; |
| | | |
| | | export default { |
| | | name: "printDialog", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: {}, |
| | | props: { |
| | | printDialog: { |
| | | type: Boolean, |
| | | default: () => false |
| | | }, |
| | | }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | isShow: this.printDialog, |
| | | loadPint: false, |
| | | isIndeterminate: false, // å¤éæ¡æ ·å¼ |
| | | checkAll: false, |
| | | checkIndexList: [], // éæ©è¦æå°çæ°æ® |
| | | barcodeData: [], |
| | | printLoading: false, |
| | | checkDataList: [] |
| | | } |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // è·åè¦æå°çæ°æ® |
| | | getLabelPrinting(selection) { |
| | | try { |
| | | this.loadPint = true; |
| | | let ids = [] |
| | | selection.map(m => { |
| | | ids.push(m.id) |
| | | }) |
| | | labelOrderPrinting({ |
| | | ids: ids |
| | | }).then(res => { |
| | | if (res.code === 200 && res.data.length > 0) { |
| | | res.data.forEach(item => { |
| | | item.sendTime = item.sendTime && item.sendTime.substring(0, 10) |
| | | item.sampleNumber = item.qtyArrived + item.buyUnitMeas |
| | | this.$set(item, 'barcode', item.entrustCode) |
| | | this.$set(item, 'isLeave', item.insState === '2') |
| | | }) |
| | | this.barcodeData = res.data |
| | | } |
| | | }) |
| | | } catch (e) { |
| | | console.log('è·åè¦æå°çæ°æ®---', e) |
| | | } |
| | | |
| | | }, |
| | | changeIsLeave(item) { |
| | | const index = this.barcodeData.findIndex(val => val.entrustCode === item.entrustCode) |
| | | if (index > -1) { |
| | | this.barcodeData[index].isLeave = !this.barcodeData[index].isLeave |
| | | } |
| | | }, |
| | | // å
¨éå¤éæ¡åè° |
| | | handleCheckAllChange(val) { |
| | | if (val) { |
| | | for (var i = 0; i < this.barcodeData.length; i++) { |
| | | this.checkIndexList.push(i) |
| | | } |
| | | this.checkDataList = this.barcodeData |
| | | } else { |
| | | this.checkIndexList = [] |
| | | this.checkDataList = [] |
| | | } |
| | | this.isIndeterminate = false; |
| | | }, |
| | | changeType(type) { |
| | | type = type === '1' ? '0' : '1' |
| | | }, |
| | | //éæ©è¦æå°çäºç»´ç |
| | | changePrintCode() { |
| | | let indexList = this.checkIndexList |
| | | let arr = [] |
| | | indexList.forEach(i => { |
| | | if (i !== undefined) { |
| | | arr.push(this.barcodeData[i]) |
| | | } |
| | | }) |
| | | console.log('arr---', arr) |
| | | this.checkDataList = arr |
| | | }, |
| | | // æäº¤æå° |
| | | submitPrint() { |
| | | if (this.checkDataList.length < 1) { |
| | | this.$message.warning("è¯·éæ©è¦æå°çæ¡å½¢ç ") |
| | | return |
| | | } |
| | | this.printDialogVisible = false; |
| | | PrintJS({ |
| | | targetStyles: ["*"], // 使ç¨domçæææ ·å¼ï¼å¾éè¦ |
| | | printable: 'printOrder',//é¡µé¢ |
| | | type: "html",//ææ¡£ç±»å |
| | | maxWidth: 360, |
| | | header: '', |
| | | style: |
| | | `@page { |
| | | margin: 0.4cm; |
| | | margin-right: 0.4cm; |
| | | margin-top: 0.4cm; |
| | | margin-bottom: 0.4cm; |
| | | padding-bottom: 0px; |
| | | size: 400px 75px collapse; |
| | | } |
| | | html{ |
| | | zoom:100%; |
| | | |
| | | } |
| | | @media print{ |
| | | width: 400px; |
| | | height: 75px; |
| | | margin:0; |
| | | }`, |
| | | onPrintDialogClose: this.erexcel = false, |
| | | font_size: '0.29cm', |
| | | }); |
| | | }, |
| | | }, |
| | | watch: { |
| | | printDialog(newVal) { |
| | | if (!newVal) { |
| | | this.barcodeData = [] |
| | | this.checkIndexList = [] |
| | | this.checkDataList = [] |
| | | this.isIndeterminate = true; |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .item { |
| | | margin-bottom: 4px; |
| | | } |
| | | |
| | | .item2 { |
| | | margin-bottom: 8px; |
| | | vertical-align: top; |
| | | } |
| | | |
| | | .full-title { |
| | | display: inline-block; |
| | | width: 80px; |
| | | text-align-last: justify; |
| | | } |
| | | |
| | | .full-title2 { |
| | | display: inline-block; |
| | | width: 50px; |
| | | text-align-last: justify; |
| | | } |
| | | |
| | | .full-title4 { |
| | | display: inline-block; |
| | | width: 53px; |
| | | text-align-last: justify; |
| | | vertical-align: top; |
| | | } |
| | | |
| | | .info { |
| | | margin-left: 2px; |
| | | } |
| | | |
| | | .info2 { |
| | | margin-left: 2px; |
| | | margin-right: 30px; |
| | | width: 80px; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .info3 { |
| | | margin-left: 2px; |
| | | margin-right: 8px; |
| | | width: 44px; |
| | | display: inline-block; |
| | | } |
| | | |
| | | .info4 { |
| | | display: inline-block; |
| | | margin-left: 2px; |
| | | white-space: normal; |
| | | width: 260px; |
| | | } |
| | | |
| | | .checkboxInfo { |
| | | display: inline-block; |
| | | margin-left: 10px; |
| | | } |
| | | |
| | | .scor { |
| | | width: 0.06cm; |
| | | height: 0.06cm; |
| | | border-radius: 1px; |
| | | border: 1px solid #000; |
| | | display: inline-block; |
| | | margin-right: 14px; |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | .checked { |
| | | margin-right: 14px; |
| | | margin-left: 4px; |
| | | } |
| | | |
| | | >>> .el-checkbox { |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | >>> .el-card { |
| | | border: none; |
| | | } |
| | | |
| | | >>> .el-card__body { |
| | | padding: 4px 2px 6px 14px; |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div> |
| | | <div class="search"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="æ¹å·" prop="updateBatchNo"> |
| | | <el-input v-model="entity.updateBatchNo" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å§æç¼å·" prop="entrustCode" v-if="tabIndex !== 0"> |
| | | <el-input v-model="entity.entrustCode" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¶ä»¶å·" prop="partNo"> |
| | | <el-input v-model="entity.partNo" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é¶ä»¶æè¿°" prop="partDesc"> |
| | | <el-input v-model="entity.partDesc" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="ä¾åºååç§°" prop="supplierName" > |
| | | <el-input v-model="entity.supplierName" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 4" |
| | | :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text" |
| | | @click="more = !more">{{ !more ? 'æ´å¤' : 'æ¶èµ·' }}</el-button> |
| | | <el-button size="mini" type="primary" @click="goSearch">æ¥è¯¢</el-button> |
| | | <el-button size="mini" @click="refresh()">éç½®</el-button> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="æ ·ååå·" prop="sampleModel" |
| | | v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-input v-model="entity.sampleModel" clearable placeholder="请è¾å
¥" size="small" |
| | | @keyup.enter.native="goSearch"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ£éªç¶æ" prop="inspectStatus" |
| | | v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-select v-model="entity.inspectStatus" clearable size="small" @change="goSearch"> |
| | | <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="ä¸åæ¶é´" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-date-picker v-model="entity.date" end-placeholder="ç»ææ¥æ" format="yyyy-MM-dd" placeholder="éæ©æ¥æ" @change="goSearch" |
| | | range-separator="è³" size="small" start-placeholder="å¼å§æ¥æ" type="daterange" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table"> |
| | | <div class="table-tab"> |
| | | <div> |
| | | <ul class="tab"> |
| | | <li :class="{ active: tabIndex === 0 }" v-if="checkPermi(['get:raw:await'])" @click="handleTab(0)">å¾
ä¸å</li> |
| | | <li :class="{ active: tabIndex === 1 }" v-if="checkPermi(['get:raw:testing'])" @click="handleTab(1)">æ£éªä¸</li> |
| | | <li :class="{ active: tabIndex === 2 }" v-if="checkPermi(['get:raw:check'])" @click="handleTab(2)">å·²æ£éª</li> |
| | | <li :class="{ active: tabIndex === 3 }" v-if="checkPermi(['get:Ifs:ByAll'])" @click="handleTab(3)">å
¨é¨</li> |
| | | </ul> |
| | | </div> |
| | | <div> |
| | | <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary" |
| | | @click="handleOut">导åº</el-button> |
| | | <el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">æ ç¾æå°</el-button> |
| | | </div> |
| | | </div> |
| | | <!--å¾
ä¸å--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination" |
| | | ref="tableData" :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" |
| | | key="tableData" :page="page" :tableLoading="tableLoading"></lims-table> |
| | | </div> |
| | | <!--æ£éªä¸--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData1" :column="column1" v-if="tabIndex === 1" :isSelection="true" |
| | | :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination1" |
| | | :height="'calc(100vh - 290px)'" key="tableData1" :page="page1" :tableLoading="tableLoading1"></lims-table> |
| | | </div> |
| | | <!--å·²æ£éª--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData2" :column="column2" v-if="tabIndex === 2" :isSelection="true" |
| | | :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination2" |
| | | :height="'calc(100vh - 290px)'" key="tableData2" :page="page2" :tableLoading="tableLoading2"></lims-table> |
| | | </div> |
| | | <!--å
¨é¨--> |
| | | <div class="table"> |
| | | <lims-table :tableData="tableData3" :column="column3" v-if="tabIndex === 3" :isSelection="true" |
| | | :rowClassName="changeRowClass" :handleSelectionChange="selectMethod" @pagination="pagination3" |
| | | :height="'calc(100vh - 290px)'" key="tableData3" :page="page3" :tableLoading="tableLoading3"></lims-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <!-- 确认å
æ£å¼¹æ¡ --> |
| | | <el-dialog :visible.sync="exemptionVisible" title="确认å
æ£" width="42%"> |
| | | <div style="display: flex"> |
| | | <span style="width: 90px; line-height: 32px">è§æ ¼åå·ï¼</span> |
| | | <el-input v-model="exemptionInfo.partDetail" clearable placeholder="请è¾å
¥" size="small"></el-input> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="exemptionVisible = false">å æ¶</el-button> |
| | | <el-button :loading="exemptionLoading" type="primary" @click="submitExemption">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ¤éæ¥æ£ --> |
| | | <el-dialog :visible.sync="declareDialogVisible" title="æ¥æ£æ¤é" width="30%"> |
| | | <p style="font-size:16px;color:#333333">æ¹å·<span style="color:#34BD66">{{ this.insOrderRow.updateBatchNo |
| | | }}</span>çä¿¡æ¯æ¯å¦<span style="color: #FF4902">æ¤éæ¥æ£</span> |
| | | </p> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="declareDialogVisible = false">å æ¶</el-button> |
| | | <el-button :loading="upLoad" type="primary" @click="submitDeclare">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- æ¤éä¸å --> |
| | | <el-dialog :visible.sync="quashDialogVisible" title="ä¸åæ¤é" width="30%"> |
| | | <el-button size="small" type="primary" @click="cancelQuashOrder('enterOrderId')">æ¤éè¿åæ£éªä¸å</el-button> |
| | | <el-button size="small" type="primary" @click="cancelQuashOrder('quarterOrderId')">æ¤éå£åº¦æ£éªä¸å</el-button> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="quashDialogVisible = false">å æ¶</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- ä¿®æ¹å§æç¼å·å¼¹æ¡ --> |
| | | <el-dialog :visible.sync="entrustCodeVisible" title="æç¤º" width="30%"> |
| | | <el-input v-model="entrustCodeInfo.entrustCode"></el-input> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="entrustCodeVisible = false">å æ¶</el-button> |
| | | <el-button :loading="submitCodeLoading" type="primary" @click="submitCode">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!--æ ç¾æå°å¼¹æ¡--> |
| | | <print-dialog v-if="printDialog" ref="printDialog" :printDialog="printDialog" |
| | | @closePrintDialog="closePrintDialog"></print-dialog> |
| | | <!--æ°æ®æ¥çå¼¹æ¡--> |
| | | <data-look-visible v-if="dataDialogVisible" ref="dataDialogVisible" :dataDialogVisible="dataDialogVisible" |
| | | :dataLookInfo="dataLookInfo" @closeDataLook="closeDataLook"></data-look-visible> |
| | | <!--éä»¶æ¥çå¼¹æ¡--> |
| | | <files-look-visible v-if="filesDialogVisible" ref="filesDialogVisible" :filesDialogVisible="filesDialogVisible" |
| | | :filesLookInfo="filesLookInfo" @closeFilesLook="closeFilesLook"></files-look-visible> |
| | | <!--æ¥åä¸è½½å¼¹æ¡--> |
| | | <down-file-dialog v-if="downFileDialogVisible" ref="downFileDialogVisible" |
| | | :downFileDialogVisible="downFileDialogVisible" :downLoadInfo="downLoadInfo" |
| | | @closeDownFileDialog="closeDownFileDialog"></down-file-dialog> |
| | | <!--产ä¸é¾ä¿¡æ¯æ¥ç--> |
| | | <ShowInfo v-if="showInfoDialog" ref="showInfoDialog" :showInfoDialog="showInfoDialog"></ShowInfo> |
| | | <!--æ£éªä»»å¡ä¿¡æ¯æ¥ç--> |
| | | <el-dialog :visible.sync="InspectInfoDialog" title="æ°æ®æ¥ç" width="400px" @closed="closeInsInfoDialog"> |
| | | <div style="margin-bottom: 8px"> |
| | | <span style="font-size: 16px;">è¿åæ£éªåå§æ°æ®</span> |
| | | <el-link :disabled="!insInfo.enterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px" |
| | | type="primary" @click="viewInsInfo0">æ¥ç</el-link> |
| | | </div> |
| | | <div> |
| | | <span style="font-size: 16px;">å£åº¦æ£éªåå§æ°æ®</span> |
| | | <el-link :disabled="!insInfo.quarterOrderId" :underline="false" style="vertical-align: bottom;margin-left: 6px" |
| | | type="primary" @click="viewInsInfo1">æ¥ç</el-link> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- <Inspection v-if="state>0" :key="InspectionKey" :inspectorList="inspectorList" :orderId="orderId"--> |
| | | <!-- :sonLaboratory="'åææ'" :state="state"--> |
| | | <!-- :typeSource="typeSource"--> |
| | | <!-- @goback="goback" @refreshView="refreshView"/>--> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import PrintDialog from "@/views/business/materialOrderComponents/materialOrder/printDialog.vue"; |
| | | import ShowInfo from "@/views/business/materialOrderComponents/materialOrder/showInfo.vue"; |
| | | import DataLookVisible from "@/views/business/materialOrderComponents/materialOrder/dataLookVisible.vue"; |
| | | import FilesLookVisible from "@/views/business/materialOrderComponents/materialOrder/filesLookVisible.vue"; |
| | | import DownFileDialog from "@/views/business/materialOrderComponents/materialOrder/downFileDialog.vue"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import { |
| | | concessionRelease, |
| | | getIfsByQuarter, |
| | | rawAllExport, |
| | | rawOrderRelease, |
| | | repealEnterRawOrder, |
| | | repealQuarterRawOrder, |
| | | revokeInspectionReport, |
| | | updateEntrustCode |
| | | } from "@/api/business/rawMaterialOrder"; |
| | | import {getWarehouseSubmit,getIfsByStateOne,getIfsByOver,getIfsByAll} from "@/api/business/outsourcingFinishProductInspection"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "MaterialOrder", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog }, |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | | { label: 'é¶ä»¶å·', prop: 'partNo' }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç©æç±»å', |
| | | prop: 'isExpire', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'è¿æç©æ' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: 'æµè¾¾çéè´æ°é', prop: 'purQtyInStore',width: '130px' }, |
| | | { label: 'åä½', prop: 'buyUnitMeas' }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { label: 'æ¥æ¶æ¶é´', prop: 'receiverDate' }, |
| | | { label: 'æ¥æ£æ¶é´', prop: 'declareDate' }, |
| | | { |
| | | dataType: 'action', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'ä¸å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.playOrder(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'å
æ£', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.exemption(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¤éæ¥æ£', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.cancelDeclare(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | tableData1: [], |
| | | tableLoading1: false, |
| | | column1: [ |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | | { |
| | | label: 'å§æç¼å·', |
| | | prop: 'entrustCode', |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "changeEntrustCode", |
| | | }, |
| | | { label: 'é¶ä»¶å·', prop: 'partNo' }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { |
| | | label: 'æ ·ååç§°', |
| | | prop: 'sampleName', |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { label: 'æ ·ååå·', prop: 'sampleModel' }, |
| | | { label: 'æ£éªäºº', prop: 'userName' }, |
| | | { label: 'ä¸åæ¶é´', prop: 'sendTime' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç©æç±»å', |
| | | prop: 'isExpire', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'è¿æç©æ' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: 'æµè¾¾çéè´æ°é', prop: 'purQtyInStore',width: '130px' }, |
| | | { label: 'åä½', prop: 'buyUnitMeas' }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { label: 'æ¥æ¶æ¶é´', prop: 'receiverDate' }, |
| | | { label: 'æ¥æ£æ¶é´', prop: 'declareDate' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ°æ®æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDataLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'éä»¶æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleFileLook(row); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¤éä¸å', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.cancelOrder(row); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page1: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | tableData2: [], |
| | | tableLoading2: false, |
| | | column2: [ |
| | | { |
| | | label: 'å§æç¼å·', |
| | | prop: 'entrustCode', |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "changeEntrustCode", |
| | | }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ£éªç¶æ', |
| | | prop: 'inspectStatus', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'æ£éªä¸' |
| | | } else if (params == 1) { |
| | | return 'åæ ¼' |
| | | } else if (params == 2) { |
| | | return 'ä¸åæ ¼' |
| | | } else if (params == 3) { |
| | | return 'æªä¸å' |
| | | } else if (params == 4) { |
| | | return 'è®©æ¥æ¾è¡' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'warning' |
| | | } else if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return 'info' |
| | | } else if (params == 4) { |
| | | return '' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { label: 'æµè¾¾çéè´æ°é', prop: 'purQtyInStore',width: '130px' }, |
| | | { label: 'ä¸åæ¶é´', prop: 'sendTime' }, |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | | { label: 'é¶ä»¶å·', prop: 'partNo' }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { label: 'ä¾åºååç§°', prop: 'supplierName' }, |
| | | { label: 'ä¸åæ ¼æè¿°', prop: 'unqualifiedDesc' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'å
æ£', |
| | | prop: 'isExemption', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'å
æ£' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ ·ååç§°', |
| | | prop: 'sampleName', |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { label: 'æ ·ååå·', prop: 'sampleModel' }, |
| | | { label: 'æ£éªäºº', prop: 'userName' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç©æç±»å', |
| | | prop: 'isExpire', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'è¿æç©æ' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: 'åä½', prop: 'buyUnitMeas' }, |
| | | { label: 'æ¥æ¶æ¶é´', prop: 'receiverDate' }, |
| | | { label: 'æ¥æ£æ¶é´', prop: 'declareDate' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ°æ®æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDataLook(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'éä»¶æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleFileLook(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'æ¥åä¸è½½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.download(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'åå§è®°å½', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.viewInspectInfo(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.sampleName === null |
| | | }, |
| | | }, |
| | | { |
| | | name: 'æ¾è¡', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.goPass(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.inspectStatus != 2 |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "get:raw:check:operation", |
| | | ]); |
| | | }, |
| | | }, |
| | | { |
| | | name: 'å£åº¦æ¤é', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.repealQuarter(row); |
| | | }, |
| | | disabled: (row) => { |
| | | return row.quarterOrderId == null || row.quarterReportId != null |
| | | }, |
| | | showHide: (row) => { |
| | | return this.checkPermi([ |
| | | "get:raw:check:operation", |
| | | ]); |
| | | }, |
| | | }, |
| | | ] |
| | | } |
| | | ], |
| | | page2: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | tableData3: [], |
| | | tableLoading3: false, |
| | | column3: [ |
| | | { label: 'å§æç¼å·', prop: 'entrustCode',width: "160px", }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'æ£éªç¶æ', |
| | | prop: 'inspectStatus', |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return 'æ£éªä¸' |
| | | } else if (params == 1) { |
| | | return 'åæ ¼' |
| | | } else if (params == 2) { |
| | | return 'ä¸åæ ¼' |
| | | } else if (params == 3) { |
| | | return 'æªä¸å' |
| | | } else if (params == 4) { |
| | | return 'è®©æ¥æ¾è¡' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 0) { |
| | | return 'warning' |
| | | } else if (params == 1) { |
| | | return 'success' |
| | | } else if (params == 2) { |
| | | return 'danger' |
| | | } else if (params == 3) { |
| | | return 'info' |
| | | } else if (params == 4) { |
| | | return '' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { label: 'æµè¾¾çéè´æ°é', prop: 'purQtyInStore',width: '130px' }, |
| | | { label: 'ä¸åæ¶é´', prop: 'sendTime' }, |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | | { label: 'é¶ä»¶å·', prop: 'partNo' }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { label: 'ä¾åºååç§°', prop: 'supplierName' }, |
| | | { label: 'ä¸åæ ¼æè¿°', prop: 'unqualifiedDesc' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'å
æ£', |
| | | prop: 'isExemption', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'å
æ£' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'success' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { |
| | | label: 'æ ·ååç§°', |
| | | prop: 'sampleName', |
| | | width: "160px", |
| | | dataType: "link", |
| | | linkMethod: "selectAllByOne", |
| | | }, |
| | | { label: 'æ ·ååå·', prop: 'sampleModel' }, |
| | | { label: 'æ£éªäºº', prop: 'userName' }, |
| | | { |
| | | dataType: 'tag', |
| | | label: 'ç©æç±»å', |
| | | prop: 'isExpire', |
| | | formatData: (params) => { |
| | | if (params == 1) { |
| | | return 'è¿æç©æ' |
| | | } else { |
| | | return null |
| | | } |
| | | }, |
| | | formatType: (params) => { |
| | | if (params == 1) { |
| | | return 'info' |
| | | } else { |
| | | return null |
| | | } |
| | | } |
| | | }, |
| | | { label: 'åä½', prop: 'buyUnitMeas' }, |
| | | { label: 'æ¥æ¶æ¶é´', prop: 'receiverDate' }, |
| | | { label: 'æ¥æ£æ¶é´', prop: 'declareDate' }, |
| | | { |
| | | dataType: 'action', |
| | | fixed: 'right', |
| | | label: 'æä½', |
| | | operation: [ |
| | | { |
| | | name: 'æ°æ®æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleDataLook(row); |
| | | } |
| | | }, |
| | | { |
| | | name: 'éä»¶æ¥ç', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.handleFileLook(row); |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | page3: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | entity: { |
| | | updateBatchNo: null, |
| | | entrustCode: null, |
| | | partDesc: null, |
| | | supplierName: null, |
| | | sampleModel: null, |
| | | partNo: null, |
| | | inspectStatus: null, |
| | | date: null, |
| | | beginDeclareDate: null, |
| | | endDeclareDate: null, |
| | | }, |
| | | tabList: [ |
| | | { |
| | | label: 'å¾
ä¸å', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: 'æ£éªä¸', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'å·²æ£éª', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: 'å£åº¦æ£éª', |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: 3 |
| | | } |
| | | ], |
| | | more: false, |
| | | tabIndex: '', |
| | | multipleSelection: [], |
| | | active: 0, //1ï¼ä¸åï¼2ï¼æ¥ç |
| | | orderType: 0, //0ï¼åææä¸åï¼1ï¼å£åº¦æ£éªä¸å |
| | | currentId: null, |
| | | btnLoading: false, |
| | | quashDialogVisible: false, // æ¤éä¸åæéå¼¹æ¡ |
| | | declareDialogVisible: false, // æ¤éæ¥æ£æéå¼¹æ¡ |
| | | insOrderRow: {}, |
| | | upLoad: false, |
| | | filesDialogVisible: false, // éä»¶æ¥çå¼¹æ¡ |
| | | printDialog: false, // æ ç¾æå°å¼¹æ¡ |
| | | showInfoDialog: false, // 产ä¸é¾ä¿¡æ¯æ¥ç |
| | | dataDialogVisible: false, // æ°æ®æ¥çå¼¹æ¡ |
| | | dataLookInfo: {}, // æ°æ®æ¥çå¼¹æ¡æ°æ® |
| | | filesLookInfo: {}, // éä»¶æ¥çå¼¹æ¡æ°æ® |
| | | downFileDialogVisible: false, // æ¥åä¸è½½å¼¹æ¡ |
| | | downLoadInfo: {}, // æ¥åä¸è½½å¼¹æ¡ |
| | | entrustCodeVisible: false, // ä¿®æ¹å§æç¼å·å¼¹æ¡ |
| | | entrustCodeInfo: {}, |
| | | submitCodeLoading: false, |
| | | exemptionVisible: false, // å
æ£ç¡®è®¤å¼¹æ¡ |
| | | exemptionLoading: false, |
| | | exemptionInfo: {}, |
| | | inspectStatusList: [ |
| | | { label: 'æ£éªä¸', value: 0 }, |
| | | { label: 'åæ ¼', value: 1 }, |
| | | { label: 'ä¸åæ ¼', value: 2 }, |
| | | { label: 'æªä¸å', value: 3 }, |
| | | { label: 'è®©æ¥æ¾è¡', value: 4 }, |
| | | ], |
| | | state: 0, |
| | | orderId: 0, |
| | | inspectorList: [],//æ£éªäººåå表 |
| | | InspectionKey: 1, |
| | | typeSource: null,// 0:æåä¸åï¼1ï¼åææä¸å, 2: éåä¸ä¸å |
| | | InspectInfoDialog: false, // æ°æ®æ¥çå¼¹æ¡ |
| | | insInfo: {}, |
| | | outLoading: false |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['nickName']) |
| | | }, |
| | | mounted() { |
| | | if (this.checkPermi(['get:raw:await'])) { |
| | | this.tabIndex = 0 |
| | | } else { |
| | | this.tabIndex = 2 |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | activated () { |
| | | this.refreshTable() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | // ç¹å»æ¥è¯¢åè° |
| | | goSearch() { |
| | | this.page.current = 1 |
| | | this.page1.current = 1 |
| | | this.page2.current = 1 |
| | | this.page3.current = 1 |
| | | this.refreshTable() |
| | | }, |
| | | // æ¥è¯¢åè° |
| | | refreshTable() { |
| | | if (this.tabIndex === 0) { |
| | | // å¾
ä¸åæ¥è¯¢ |
| | | this.getPurchaseOrderList() |
| | | } else if (this.tabIndex === 1) { |
| | | // æ£éªä¸æ¥è¯¢ |
| | | this.getIfsByStateOneList() |
| | | } else if (this.tabIndex === 2) { |
| | | // å·²æ£éªæ¥è¯¢ |
| | | this.getIfsByOverList() |
| | | } else if (this.tabIndex === 4) { |
| | | // æ¥è¯¢å£åº¦æ£éª |
| | | this.getIfsByQuarterList() |
| | | } else { |
| | | // å
¨é¨æ¥è¯¢ |
| | | this.getIfsByAllList() |
| | | } |
| | | }, |
| | | // å¾
ä¸åæ¥è¯¢ |
| | | getPurchaseOrderList() { |
| | | this.tableLoading = true |
| | | const params = { ...this.entity, isInspect: 1, state: 0, ...this.page } |
| | | getWarehouseSubmit(params).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 |
| | | }) |
| | | }, |
| | | // æ£éªä¸æ¥è¯¢ |
| | | getIfsByStateOneList() { |
| | | this.tableLoading1 = true |
| | | const params = { ...this.entity, orderState: 1, state: 1, ...this.page1 } |
| | | getIfsByStateOne(params).then(res => { |
| | | this.tableLoading1 = false |
| | | if (res.code === 200) { |
| | | this.tableData1 = res.data.records |
| | | this.page1.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading1 = false |
| | | }) |
| | | }, |
| | | // å·²æ£éªæ¥è¯¢ |
| | | getIfsByOverList() { |
| | | this.tableLoading2 = true |
| | | if(null != this.entity.date){ |
| | | this.entity.beginDeclareDate = this.entity.date[0] |
| | | this.entity.endDeclareDate = this.entity.date[1] |
| | | } else { |
| | | this.entity.beginDeclareDate = '' |
| | | this.entity.endDeclareDate = '' |
| | | } |
| | | const params = { ...this.entity, orderState: 4, state: 2, ...this.page2 } |
| | | getIfsByOver(params).then(res => { |
| | | this.tableLoading2 = false |
| | | if (res.code === 200) { |
| | | this.tableData2 = res.data.records |
| | | this.page2.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading2 = false |
| | | }) |
| | | }, |
| | | // æ¥è¯¢å£åº¦æ£éª |
| | | getIfsByQuarterList() { |
| | | this.tableLoading4 = true |
| | | if(null != this.entity.date){ |
| | | this.entity.beginDeclareDate = this.entity.date[0] |
| | | this.entity.endDeclareDate = this.entity.date[1] |
| | | } else { |
| | | this.entity.beginDeclareDate = '' |
| | | this.entity.endDeclareDate = '' |
| | | } |
| | | const params = { ...this.entity, ...this.page4 } |
| | | getIfsByQuarter(params).then(res => { |
| | | this.tableLoading4 = false |
| | | if (res.code === 200) { |
| | | this.tableData4 = res.data.records |
| | | this.page4.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading4 = false |
| | | }) |
| | | }, |
| | | // å
¨é¨ |
| | | getIfsByAllList() { |
| | | this.tableLoading3 = true |
| | | if(null != this.entity.date){ |
| | | this.entity.beginDeclareDate = this.entity.date[0] |
| | | this.entity.endDeclareDate = this.entity.date[1] |
| | | } else { |
| | | this.entity.beginDeclareDate = '' |
| | | this.entity.endDeclareDate = '' |
| | | } |
| | | const params = { ...this.entity, isInspect: 1, ...this.page3 } |
| | | getIfsByAll(params).then(res => { |
| | | this.tableLoading3 = false |
| | | if (res.code === 200) { |
| | | this.tableData3 = res.data.records |
| | | this.page3.total = res.data.total |
| | | } |
| | | }).catch(err => { |
| | | this.tableLoading3 = false |
| | | }) |
| | | }, |
| | | // é ç½® |
| | | refresh() { |
| | | this.resetForm('entity') |
| | | this.refreshTable() |
| | | }, |
| | | pagination(page) { |
| | | this.page.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination1(page) { |
| | | this.page1.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination2(page) { |
| | | this.page2.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination3(page) { |
| | | this.page3.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | pagination4(page) { |
| | | this.page4.size = page.limit |
| | | this.refreshTable() |
| | | }, |
| | | // æ¥çæ£éªæ°æ® |
| | | viewInspectInfo(row) { |
| | | //å½åæ£éªä»»å¡çæ£éªäººå表 |
| | | let inspectorList = [] |
| | | if (row.userName) { |
| | | inspectorList = row.userName.split(',') |
| | | } |
| | | inspectorList.push(this.nickName) |
| | | this.inspectorList = inspectorList |
| | | this.insInfo = row |
| | | this.InspectInfoDialog = true |
| | | }, |
| | | closeInsInfoDialog() { |
| | | this.InspectInfoDialog = false |
| | | }, |
| | | // ç´æ¥æ¾è¡ |
| | | goPass(row) { |
| | | this.$confirm('æ¯å¦æ¾è¡å½åæ°æ®?', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | concessionRelease({ ifsInventoryId: row.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'æ¾è¡æå!' |
| | | }); |
| | | this.refresh() |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'error', |
| | | message: 'æ¾è¡å¤±è´¥' |
| | | }); |
| | | }); |
| | | }, |
| | | // å£åº¦æ¤é |
| | | repealQuarter(row) { |
| | | this.$confirm('æ¯å¦æ¤éå£åº¦ä¸å?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æ¤éæå') |
| | | this.refreshTable('page') |
| | | } |
| | | }) |
| | | }).catch(() => { }) |
| | | }, |
| | | viewInsInfo0() { |
| | | let inspectorList = [] |
| | | inspectorList.push(this.nickName) |
| | | this.InspectInfoDialog = false |
| | | if (this.checkPermi(['business:inspectionView'])) { |
| | | this.$router.push({ |
| | | name: "InspectionView", |
| | | query: { |
| | | sonLaboratory: 'åææ', |
| | | state: 3, |
| | | typeSource: this.insInfo.typeSource, |
| | | orderId: this.insInfo.enterOrderId, |
| | | inspectorList: inspectorList, |
| | | }, |
| | | }) |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/inspectionTask/inspection", |
| | | query: { |
| | | sonLaboratory: 'åææ', |
| | | state: 3, |
| | | typeSource: this.insInfo.typeSource, |
| | | orderId: this.insInfo.enterOrderId, |
| | | inspectorList: inspectorList, |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | viewInsInfo1() { |
| | | let inspectorList = [] |
| | | inspectorList.push(this.nickName) |
| | | this.InspectInfoDialog = false |
| | | if (this.checkPermi(['business:inspectionView'])) { |
| | | this.$router.push({ |
| | | name: "InspectionView", |
| | | query: { |
| | | sonLaboratory: 'åææ', |
| | | state: 3, |
| | | typeSource: this.insInfo.typeSource, |
| | | orderId: this.insInfo.quarterOrderId, |
| | | inspectorList: inspectorList, |
| | | }, |
| | | }) |
| | | } else { |
| | | this.$router.push({ |
| | | path: "/inspectionTask/inspection", |
| | | query: { |
| | | sonLaboratory: 'åææ', |
| | | state: 3, |
| | | typeSource: this.insInfo.typeSource, |
| | | orderId: this.insInfo.quarterOrderId, |
| | | inspectorList: inspectorList, |
| | | }, |
| | | }) |
| | | } |
| | | }, |
| | | goback() { |
| | | this.state = 0 |
| | | this.refreshTable('page') |
| | | }, |
| | | // å·æ°é¡µé¢ |
| | | refreshView() { |
| | | this.InspectionKey++ |
| | | }, |
| | | // éææä¸å |
| | | copper() { |
| | | this.$router.push({ path: "/materialOrder/copperOrder", query: { active: 1 } }); |
| | | }, |
| | | // æå¼æ ç¾æå°å¼¹æ¡ |
| | | openPrint() { |
| | | if (this.multipleSelection.length > 0) { |
| | | this.printDialog = true |
| | | this.$nextTick(() => { |
| | | let selection = this.multipleSelection |
| | | this.$refs.printDialog.getLabelPrinting(selection) |
| | | }) |
| | | } else { |
| | | this.$message.error('è¯·éæ©éè¦æå°çæ°æ®') |
| | | } |
| | | }, |
| | | // å
³éæ ç¾æå°å¼¹æ¡ |
| | | closePrintDialog() { |
| | | this.printDialog = false |
| | | }, |
| | | // ä¸å |
| | | playOrder(row) { |
| | | this.$router.push({ path: "/outsourcingFinishProduct/customsInspectionOrder", query: {isOutsourcing:'t', orderType: 0, customsInspection: row, active: 1 } }); |
| | | }, |
| | | // ç¹å»æ ·ååç§°æ¥ç详æ
|
| | | selectAllByOne(row) { |
| | | if (row.isCopper == 1) { |
| | | this.currentId = row.enterOrderId |
| | | this.$router.push({ path: "/materialOrder/CopperView", query: { customsInspection: row, active: 2, currentId: this.currentId } }); |
| | | } else { |
| | | this.currentId = row.insOrderId |
| | | this.$router.push({ path: "/materialOrder/customsInspectionView", query: { customsInspection: row, active: 2, currentId: this.currentId } }); |
| | | } |
| | | }, |
| | | // æå¼å
æ£å¼¹æ¡ |
| | | exemption(row) { |
| | | this.exemptionVisible = true |
| | | this.exemptionInfo = row |
| | | this.$set(this.exemptionInfo, 'partDetail', row.partDesc) |
| | | }, |
| | | // æäº¤å
æ£ä¿¡æ¯ |
| | | submitExemption() { |
| | | this.exemptionLoading = true |
| | | rawOrderRelease({ |
| | | ifsInventoryId: this.exemptionInfo.id, |
| | | partDetail: this.exemptionInfo.partDetail |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.exemptionVisible = false |
| | | this.$message.success('æä½æå') |
| | | this.refresh() |
| | | } |
| | | this.exemptionLoading = false |
| | | }).catch(err => { |
| | | console.log(err) |
| | | this.exemptionLoading = false |
| | | }) |
| | | }, |
| | | // æå¼æ¤éæ¥æ£å¼¹æ¡ |
| | | cancelDeclare(row) { |
| | | this.declareDialogVisible = true |
| | | this.insOrderRow = row |
| | | }, |
| | | // æäº¤æ¤éæ¥æ£ç³è¯· |
| | | submitDeclare() { |
| | | revokeInspectionReport({ id: this.insOrderRow.id }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogVisible = false |
| | | this.refreshTable() |
| | | this.$message.success("æ¤éæ¥æ£æå") |
| | | } |
| | | }).catch(err => { |
| | | console.log(err) |
| | | }) |
| | | }, |
| | | // æå¼æ¤éä¸åçå¼¹æ¡ |
| | | cancelOrder(row) { |
| | | if (row.enterOrderId && row.quarterOrderId) { |
| | | this.quashDialogVisible = true |
| | | } else if (row.enterOrderId && !row.quarterOrderId) { |
| | | this.$confirm('æ¯å¦æ¤éè¿åä¸å?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | repealEnterRawOrder({ enterOrderId: row.enterOrderId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æ¤éæå') |
| | | this.refreshTable('page') |
| | | } |
| | | }) |
| | | }).catch(() => { }) |
| | | } else if (!row.enterOrderId && row.quarterOrderId) { |
| | | this.$confirm('æ¯å¦æ¤éå£åº¦ä¸å?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | repealQuarterRawOrder({ quarterOrderId: row.quarterOrderId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æ¤éæå') |
| | | this.refreshTable('page') |
| | | } |
| | | }) |
| | | }).catch(() => { }) |
| | | } |
| | | this.insOrderRow = row |
| | | }, |
| | | cancelQuashOrder(type) { |
| | | if (type === 'enterOrderId') { |
| | | this.$confirm('æ¯å¦æ¤éå½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | repealEnterRawOrder({ enterOrderId: this.insOrderRow.enterOrderId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æ¤éæå') |
| | | this.refreshTable('page') |
| | | } |
| | | }) |
| | | }).catch(() => { }) |
| | | } else { |
| | | this.$confirm('æ¯å¦æ¤éå½åæ°æ®?', "è¦å", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning" |
| | | }).then(() => { |
| | | repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => { |
| | | if (res.code === 200) { |
| | | this.$message.success('æ¤éæå') |
| | | this.refreshTable() |
| | | } |
| | | }) |
| | | }).catch(() => { }) |
| | | } |
| | | }, |
| | | // æ°æ®æ¥ç |
| | | handleDataLook(row) { |
| | | this.dataLookInfo = row |
| | | this.dataDialogVisible = true; |
| | | }, |
| | | // å
³éæ°æ®æ¥çå¼¹æ¡ |
| | | closeDataLook() { |
| | | this.dataDialogVisible = false |
| | | }, |
| | | // éä»¶æ¥ç |
| | | handleFileLook(row) { |
| | | this.filesDialogVisible = true |
| | | this.filesLookInfo = row |
| | | }, |
| | | // å
³ééä»¶æ¥çå¼¹æ¡ |
| | | closeFilesLook() { |
| | | this.filesDialogVisible = false |
| | | }, |
| | | // æ¥åä¸è½½ |
| | | download(row) { |
| | | this.downFileDialogVisible = true |
| | | this.downLoadInfo = row |
| | | }, |
| | | // å
³éæ¥åä¸è½½å¼¹æ¡ |
| | | closeDownFileDialog() { |
| | | this.downFileDialogVisible = false |
| | | }, |
| | | // æ¥ç产ä¸é¾ä¿¡æ¯ |
| | | openInfoDialog(row) { |
| | | this.showInfoDialog = true |
| | | this.$nextTick(() => { |
| | | this.$refs.showInfoDialog.getInfo(row.id) |
| | | }) |
| | | }, |
| | | // ä¿®æ¹å§æç¼å· |
| | | changeEntrustCode(row) { |
| | | this.entrustCodeVisible = true |
| | | this.entrustCodeInfo = { ...row } |
| | | }, |
| | | // å¯¼åº |
| | | handleOut() { |
| | | this.outLoading = true |
| | | let params = {} |
| | | if (this.multipleSelection.length > 0) { |
| | | params.ids = this.multipleSelection.map(item => item.id).join(','); |
| | | } else { |
| | | params = {...this.entity} |
| | | } |
| | | params.orderType = "02wg"; |
| | | rawAllExport(params).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, 'å¤è´æåæ£æµä¿¡æ¯å¯¼åº.xlsx'); |
| | | }) |
| | | }, |
| | | // æäº¤ä¿®æ¹å§æç¼å·ä¿¡æ¯ |
| | | submitCode() { |
| | | this.submitCodeLoading = true |
| | | try { |
| | | updateEntrustCode({ |
| | | id: this.entrustCodeInfo.id, |
| | | entrustCode: this.entrustCodeInfo.entrustCode, |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.entrustCodeVisible = false |
| | | this.$message.success('ä¿®æ¹æå') |
| | | } |
| | | this.refreshTable() |
| | | this.submitCodeLoading = false |
| | | }) |
| | | } catch (e) { |
| | | this.submitCodeLoading = false |
| | | } |
| | | }, |
| | | // 忢ä¸åtabè¡¨æ ¼ |
| | | handleTab(m) { |
| | | this.tabIndex = m; |
| | | this.multipleSelection = [] |
| | | this.refreshTable() |
| | | }, |
| | | // è¡¨æ ¼éæ©æ¹æ³ |
| | | selectMethod(val) { |
| | | this.multipleSelection = val |
| | | }, |
| | | changeRowClass({ row, rowIndex }) { |
| | | if (row.isFirst == 1) { |
| | | return 'highlight-danger-row-border' |
| | | } |
| | | return '' |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .table-tab { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .tab { |
| | | list-style-type: none; |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | margin-top: 0; |
| | | padding-left: 0; |
| | | } |
| | | |
| | | .tab li { |
| | | line-height: 24px; |
| | | padding: 6px 14px; |
| | | font-size: 14px; |
| | | color: #333333; |
| | | border: 1px solid #EEEEEE; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .tab li:nth-child(1) { |
| | | border-radius: 8px 0 0 8px; |
| | | } |
| | | |
| | | .tab li:nth-child(4) { |
| | | border-radius: 0 8px 8px 0; |
| | | } |
| | | |
| | | .tab li.active { |
| | | border-color: #3A7BFA; |
| | | color: #3A7BFA; |
| | | } |
| | | </style> |
| | |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectCustomPageList} from "@/api/system/customer"; |
| | | import {mapGetters} from "vuex"; |
| | | import { bigEval } from "@/utils/bigEval"; |
| | | import {addQuarter, updateQuarterOnOrder} from "@/api/business/finishedProductSampling"; |
| | | |
| | | export default { |
| | |
| | | this.getInfo(); |
| | | }, |
| | | methods: { |
| | | /** |
| | | * è·åå°æ°çæå¤§ä½æ° |
| | | * @param number åå·åæ° |
| | | * @param ask è¦æ±å¼ |
| | | * @param calcNum 计ç®å¼ |
| | | */ |
| | | getDecimalPlaces(number, ask, calcNum) { |
| | | console.log("计ç®å°æ°ç¹-->", number, ask, calcNum); |
| | | let count1 = 0; |
| | | let count2 = 0; |
| | | const reg = /(\d+\.)(\d+)/g; |
| | | let matches = []; |
| | | if (ask) { |
| | | matches = ask.match(reg); |
| | | } |
| | | if ( |
| | | matches && |
| | | matches.length > 0 && |
| | | matches[0].toString().indexOf(".") > -1 |
| | | ) { |
| | | count1 = matches[0].toString().split(".")[1].length; |
| | | } |
| | | if (number.toString().indexOf(".") > -1) { |
| | | count2 = number.toString().split(".")[1].length; |
| | | } |
| | | if (calcNum.toString().indexOf(".") > -1) { |
| | | const pointLength2 = calcNum.toString().split(".")[1].length; |
| | | count2 = count2 > pointLength2 ? count2 : pointLength2; |
| | | } |
| | | return count1 > count2 ? count1 : count2; |
| | | }, |
| | | getInfo() { |
| | | this.selectStandardTreeList() |
| | | this.getAuthorizedPerson(); |
| | |
| | | let index = code.findIndex(b => m.includes(b)) |
| | | if (index > -1) { |
| | | let arr = m.split(code[index]).filter(b => !!b) |
| | | let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | let calcNum = this.$Big( |
| | | bigEval(this.replaceAll(arr[0], symbolItem, value)) |
| | | ); |
| | | let num = calcNum.toFixed( |
| | | this.getDecimalPlaces(value, ask, calcNum) |
| | | ); |
| | | // let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | m = code[index] + '' + num |
| | | arr1.push(m) |
| | | } |
| | |
| | | let index = code.findIndex(b => ask.includes(b)) |
| | | if (index > -1) { |
| | | let arr = ask.split(code[index]).filter(b => !!b) |
| | | let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | let calcNum = this.$Big( |
| | | bigEval(this.replaceAll(arr[0], symbolItem, value)) |
| | | ); |
| | | let num = calcNum.toFixed( |
| | | this.getDecimalPlaces(value, ask, calcNum) |
| | | ); |
| | | // let num = eval(this.replaceAll(arr[0], symbolItem, value)) |
| | | return code[index] + '' + num |
| | | } |
| | | } |
| | |
| | | }) |
| | | }else{ |
| | | // å¸¸è§æäº¤ |
| | | addInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => { |
| | | addInsOrder({insOrder: {...this.addObj,typeSource:-1}, sampleList: sampleList}).then(res => { |
| | | this.saveLoad = false |
| | | this.$message.success('å·²æäº¤') |
| | | this.bsm3Dia = false; |
| | |
| | | @keyup.enter.native="refreshTable"> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="éå®è®¢ååç±»" prop="orderType" v-if="(tabIndex === 3 || tabIndex === 4) && more"> |
| | | <el-select v-model="componentData.orderType" clearable size="small" |
| | | @keyup.enter.native="refreshTable"> |
| | | <el-option v-for="(item,index) in orderTypeList" :label="item.dictLabel" :value="item.dictValue" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | |
| | | @click="handleDown">导åº</el-button> |
| | | <el-button v-if="tabIndex === 0" :loading="btnLoading" size="small" type="primary" |
| | | @click="openIFS">è·åIFS订å</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">æ¥æ£</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="declareS">æ¹éæ¥æ£</el-button> |
| | | <el-button v-if="tabIndex === 0" size="small" type="primary" @click="addDeclare">æ°å¢æ¥æ£ä¿¡æ¯</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | </div> |
| | | <!-- æ¹éæ¥æ£ --> |
| | | <el-dialog :visible.sync="declareDialogSVisible" title="ç¡®è®¤æ¥æ£" width="30%"> |
| | | <p style="font-size:16px;color:#333333">æ¯å¦ç¡®è®¤æ¥æ£éæ©çæ°æ®ï¼</p> |
| | | <el-dialog :visible.sync="declareDialogSVisible" title="æ¹éæ¥æ£" width="30%" :before-close="resetBatchFormData"> |
| | | <el-form ref="declareBatchObj" :inline="true" :model="declareBatchObj" :rules="declareObjBatchRules" label-width="130px" |
| | | label-position="right"> |
| | | <el-form-item class="declareObj-form-item" label="éå®è®¢ååç±»ï¼" prop="orderType"> |
| | | <el-select v-model="declareBatchObj.orderType" prop="orderType" clearable size="small"> |
| | | <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-row> |
| | | <el-button @click="declareDialogSVisible = false">å æ¶</el-button> |
| | | <el-button @click="resetBatchFormData()">å æ¶</el-button> |
| | | <el-button :loading="submitDeclareLoading" type="primary" @click="submitDeclareS">ç¡® å®</el-button> |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- ç¡®è®¤æ¥æ£ --> |
| | | <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? 'æ°å¢æ¥æ£ä¿¡æ¯' : 'åæææ¥æ£'" |
| | | <el-dialog :close-on-click-modal="false" :title="declareType === 'add' ? 'æ°å¢æ¥æ£ä¿¡æ¯' : 'éå®è®¢åæ¥æ£'" |
| | | :visible.sync="declareDialogVisible" width="800px" @close="resetFormData"> |
| | | <el-form ref="declareObj" :inline="true" :model="declareObj" :rules="declareObjRules" label-width="130px" |
| | | label-position="right"> |
| | |
| | | <el-select v-model="declareObj.isExpire" prop="isExpire" :disabled="declareType !== 'add'" clearable |
| | | size="small"> |
| | | <el-option :value="1" label="è¿æç©æ"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item class="declareObj-form-item" label="éå®è®¢ååç±»ï¼" prop="orderType"> |
| | | <el-select v-model="declareObj.orderType" clearable size="small"> |
| | | <el-option v-for="(item,index) in orderTypeList" :value="item.dictValue" :label="item.dictLabel" :key="index"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | addIfsInventoryQuantity, |
| | | advancedGodown, |
| | | concessionRelease, delIfsInventory, |
| | | getIfsByAll, |
| | | getIfsByFinish, |
| | | getIfsOrder, |
| | | getWarehouseSubmit, inspectionReport, inspectionReportOne, rawAllExport, |
| | | revokeInspectionReport,downloadTemplate,confirmSplitOrder |
| | | } from '@/api/business/materialInspection' |
| | | import { |
| | | getIfsByAll, |
| | | getIfsByFinish, |
| | | } from '@/api/business/ifsOrderInspection' |
| | | import { getDicts } from "@/api/system/dict/data"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {transformExcel} from '@/utils/file' |
| | | |
| | |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | declareBatchObj:{ |
| | | orderType:'' |
| | | }, |
| | | declareObjBatchRules:{ |
| | | orderType: [ |
| | | { required: true, message: 'è¯·éæ©éå®è®¢ååç±»', trigger: 'change' } |
| | | ], |
| | | }, |
| | | confirmSplitOrderLoading: false, |
| | | detailDataLoading: false, |
| | | pushToMes:false,//æ¯å¦åæ¥å°mes |
| | |
| | | } |
| | | }, |
| | | { label: '订åå·', prop: 'orderNo' }, |
| | | { label: '订ååç±»', prop: 'orderTypeName' }, |
| | | { label: 'æµè¾¾çéè´æ°é', prop: 'purQtyInStore' }, |
| | | { label: 'æ¥æ£æ¶é´', prop: 'declareDate' }, |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | |
| | | receiverDate: '', // æ¥æ¶æ¶é´ |
| | | buyUnitMeas: '', // åä½ |
| | | isExpire: '', // åä½ |
| | | orderType: null, // éå®è®¢ååç±» |
| | | }, |
| | | componentData: { // è¡¨æ ¼æ°æ® |
| | | updateBatchNo: null, |
| | |
| | | date: null, |
| | | entrustCode: '', |
| | | inspectStatus: '', |
| | | orderType: null, // éå®è®¢ååç±» |
| | | }, |
| | | declareDialogVisible1: false, |
| | | upLoad: false, |
| | |
| | | buyUnitMeas: [ |
| | | { required: false, message: '请填ååä½', trigger: 'blur' } |
| | | ], |
| | | orderType: [ |
| | | { required: true, message: 'è¯·éæ©éå®è®¢ååç±»', trigger: 'change' } |
| | | ], |
| | | }, |
| | | tabList: [ |
| | | { |
| | |
| | | ], |
| | | outLoading: false, |
| | | upLoading: false, |
| | | orderTypeList: [], |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.refreshTable() |
| | | this.getOrderTypeList() |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | getOrderTypeList(){ |
| | | getDicts('inspection_type').then(res=>{ |
| | | if(res.code === 200){ |
| | | this.orderTypeList = res.data |
| | | } |
| | | }).catch(error=>{ |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | resetOrderSplitData(){ |
| | | this.orderSplitBasicData = [] |
| | | this.orderSplitDetailData = [] |
| | |
| | | // 忢tabè¡¨æ ¼ |
| | | handleTab(m) { |
| | | this.tabIndex = m; |
| | | if([0,1].includes(this.tabIndex)){ |
| | | this.componentData.orderType = null |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | // æ¥è¯¢åè° |
| | |
| | | }, |
| | | // æäº¤æ¹éæ¥æ£ |
| | | submitDeclareS() { |
| | | this.$refs.declareBatchObj.validate(valid=>{ |
| | | if(valid){ |
| | | let ids = [] |
| | | this.multipleSelection.forEach(item => { |
| | | ids.push(item.id) |
| | | }) |
| | | this.declareDialogSVisible = true |
| | | inspectionReport({ ids: ids }).then(res => { |
| | | inspectionReport({ |
| | | ids: ids, |
| | | orderType: this.declareBatchObj.orderType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogSVisible = false |
| | | this.$message.success('æ¥æ£æå') |
| | |
| | | }).catch(err => { |
| | | this.submitDeclareLoading = false |
| | | console.log(err) |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | // æå¼æ¥æ£ç¡®è®¤å¼¹æ¡ |
| | |
| | | if (valid) { |
| | | inspectionReportOne({ |
| | | id: this.declareObj.id, |
| | | updateBatchNo: this.declareObj.updateBatchNo |
| | | updateBatchNo: this.declareObj.updateBatchNo, |
| | | orderType: this.declareObj.orderType |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | this.declareDialogVisible = false |
| | |
| | | } |
| | | }, |
| | | resetFormData() { |
| | | this.$refs['declareObj'].resetFields(); |
| | | this.$refs.declareObj.resetFields(); |
| | | this.declareDialogVisible = false |
| | | }, |
| | | resetBatchFormData() { |
| | | this.$refs.declareBatchObj.resetFields(); |
| | | this.declareDialogSVisible = false |
| | | }, |
| | | // æå¼å é¤å¼¹æ¡ |
| | | deleteMaterial(row) { |
| | |
| | | receiverDate: '', // æ¥æ¶æ¶é´ |
| | | buyUnitMeas: '', // åä½ |
| | | isExpire: '', // åä½ |
| | | orderType: null, // éå®è®¢ååç±» |
| | | } |
| | | } |
| | | }, |
| | |
| | | verifyUser: null, // å®¡æ ¸äººå |
| | | loadingVerify: false, // å®¡æ ¸äººå |
| | | typeSourceList: [ |
| | | { label: 'æåä¸å', value: 0 }, |
| | | { label: 'å§æä¸å', value: -1 }, |
| | | { label: 'å¤è´ä¸å', value: 0 }, |
| | | { label: 'åææä¸å', value: 1 }, |
| | | ], |
| | | orderTypeList: [ |
| | |
| | | dataType: "tag", |
| | | formatData: (params) => { |
| | | if (params == 0) { |
| | | return "æåä¸å"; |
| | | } else { |
| | | return "å¤è´ä¸å"; |
| | | } else if(params==1) { |
| | | return "åææä¸å"; |
| | | }else{ |
| | | return "å§æä¸å"; |
| | | } |
| | | }, |
| | | }, |