| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div> |
| | | <div class="search"> |
| | | <el-form :model="entity" ref="entity" size="small" :inline="true"> |
| | | <el-form-item label="IFSå" prop="contract"> |
| | | <el-select @keyup.enter.native="refreshTable" v-model="entity.contract" clearable placeholder="è¯·éæ©" size="small"> |
| | | <el-option label="ZTNS" value="ZTNS"/> |
| | | <el-option label="KJNS" value="KJNS"/> |
| | | </el-select> |
| | | </el-form-item> |
| | | <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="materialProp"> |
| | | <el-select clearable size="small" v-model="entity.materialProp" style="width: 100%" @change="refreshTable()"> |
| | | <el-option v-for="dict in dict.type.material_prop_type" :key="dict.value" :label="dict.label" |
| | | :value="dict.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </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 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 HH:mm:ss" value-format="yyyy-MM-dd HH:mm:ss" placeholder="éæ©æ¥æ" |
| | | :default-time="['00:00:00','23:59:59']" |
| | | @change="goSearch" range-separator="è³" size="small" start-placeholder="å¼å§æ¥æ" type="datetimerange"> |
| | | </el-date-picker> |
| | | </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> |
| | | </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="50" :more="more" 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="50" :more="more" 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="50" :more="more" 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="50" :more="more" 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> |
| | | <!-- IFSç©æå±æ§ç¼è¾å¼¹æ¡--> |
| | | <el-dialog |
| | | title="æ´æ°IFSåºåç©ææ¹æ¬¡å±æ§" |
| | | :visible.sync="ifsMaterialPropsVisible" |
| | | :close-on-click-modal="false" |
| | | 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="夿¤é¢è²(Attr4):"> |
| | | <el-select style="width:100%" 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 style="width:100%" 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 style="width:100%" 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> |
| | | |
| | | <script> |
| | | import PrintDialog from "@/views/business/outsourcingFinishProduct/components/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 {getDicts} from "@/api/system/dict/data"; |
| | | import { |
| | | concessionRelease, |
| | | getIfsByQuarter, |
| | | rawAllExport, |
| | | rawOrderRelease, |
| | | repealEnterRawOrder, |
| | | repealQuarterRawOrder, |
| | | revokeInspectionReport, |
| | | updateEntrustCode, |
| | | getOrderCountByIfsId |
| | | } from "@/api/business/rawMaterialOrder"; |
| | | import { getWarehouseSubmit, getIfsByStateOne, getIfsByOver, getIfsByAll } from "@/api/business/outsourcingOrder"; |
| | | import {getOneByIfsId,saveOrUpdateProps} from "@/api/business/ifsPartProps.js"; |
| | | import { mapGetters } from "vuex"; |
| | | |
| | | export default { |
| | | name: "OutsourcingOrder", |
| | | // import å¼å
¥çç»ä»¶éè¦æ³¨å
¥å°å¯¹è±¡ä¸æè½ä½¿ç¨ |
| | | components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog }, |
| | | dicts: ['material_prop_type'], |
| | | data() { |
| | | // è¿éåæ¾æ°æ® |
| | | return { |
| | | selectedRow:{}, |
| | | outerColorList:[], |
| | | insulationColorList:[], |
| | | letteringInfoList: [], |
| | | ifsMaterialPropsForm:{ |
| | | id:null, |
| | | ifsInventoryId: null, |
| | | drumNo: '', // è½½å
·ç¼å· |
| | | startMeterMark: '', // èµ·å§ç±³æ |
| | | endMeterMark: '', // æªæ¢ç±³æ |
| | | insulationColor: '', // ç»ç¼é¢è² |
| | | outerColor: '', // 夿¤é¢è² |
| | | inboundLength: '', // å
¥åºé¿åº¦ |
| | | letteringInfo: '', // å°åä¿¡æ¯ |
| | | }, |
| | | ifsMaterialPropsVisible:false, |
| | | tableData: [], |
| | | tableLoading: false, |
| | | column: [ |
| | | { |
| | | label: 'IFSå', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 'ZTNS') { |
| | | return '' |
| | | } else if (params === 'KJNS') { |
| | | return 'success' |
| | | }else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | }, |
| | | { label: 'æ¹å·', prop: 'updateBatchNo' }, |
| | | { label: 'é¶ä»¶å·', prop: 'partNo' }, |
| | | { label: 'é¶ä»¶æè¿°', prop: 'partDesc' }, |
| | | { |
| | | label: 'ç©æå±æ§', |
| | | prop: 'materialProp', |
| | | formatData: (params) => { |
| | | if (!params) return null |
| | | |
| | | for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | const item = this.dict.type.material_prop_type[i] |
| | | if (item.value == params) { |
| | | return item.label |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | }, |
| | | { |
| | | 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: 'IFSå', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 'ZTNS') { |
| | | return '' |
| | | } else if (params === 'KJNS') { |
| | | return 'success' |
| | | }else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | }, |
| | | { 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' }, |
| | | { |
| | | label: 'ç©æå±æ§', |
| | | prop: 'materialProp', |
| | | formatData: (params) => { |
| | | if (!params) return null |
| | | |
| | | for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | const item = this.dict.type.material_prop_type[i] |
| | | if (item.value == params) { |
| | | return item.label |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | }, |
| | | { |
| | | 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: 'IFSå', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 'ZTNS') { |
| | | return '' |
| | | } else if (params === 'KJNS') { |
| | | return 'success' |
| | | }else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | }, |
| | | { |
| | | 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' }, |
| | | { |
| | | label: 'ç©æå±æ§', |
| | | prop: 'materialProp', |
| | | formatData: (params) => { |
| | | if (!params) return null |
| | | |
| | | for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | const item = this.dict.type.material_prop_type[i] |
| | | if (item.value == params) { |
| | | return item.label |
| | | } |
| | | } |
| | | 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: 'IFSå', |
| | | prop: 'contract', |
| | | width: '120px', |
| | | dataType: 'tag', |
| | | formatData: (params) => { |
| | | return params |
| | | }, |
| | | formatType: (params) => { |
| | | if (params === 'ZTNS') { |
| | | return '' |
| | | } else if (params === 'KJNS') { |
| | | return 'success' |
| | | }else { |
| | | return null |
| | | } |
| | | } |
| | | |
| | | }, |
| | | { 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' }, |
| | | { |
| | | label: 'ç©æå±æ§', |
| | | prop: 'materialProp', |
| | | formatData: (params) => { |
| | | if (!params) return null |
| | | |
| | | for (let i = 0; i < this.dict.type.material_prop_type.length; i++) { |
| | | const item = this.dict.type.material_prop_type[i] |
| | | if (item.value == params) { |
| | | return item.label |
| | | } |
| | | } |
| | | return null |
| | | } |
| | | }, |
| | | { |
| | | 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: 'æ´æ°IFSæ¹æ¬¡å±æ§', |
| | | type: 'text', |
| | | clickFun: (row) => { |
| | | this.showMaterialPropsDialog(row); |
| | | }, |
| | | } |
| | | ] |
| | | } |
| | | ], |
| | | page3: { |
| | | total: 0, |
| | | size: 20, |
| | | current: 1 |
| | | }, |
| | | entity: { |
| | | contract: null, |
| | | updateBatchNo: null, |
| | | entrustCode: null, |
| | | partDesc: null, |
| | | supplierName: null, |
| | | sampleModel: null, |
| | | partNo: null, |
| | | inspectStatus: null, |
| | | date: null, |
| | | beginDeclareDate: null, |
| | | endDeclareDate: null, |
| | | materialProp: null |
| | | }, |
| | | tabList: [ |
| | | { |
| | | label: 'å¾
ä¸å', |
| | | value: 0 |
| | | }, |
| | | { |
| | | label: 'æ£éªä¸', |
| | | value: 1 |
| | | }, |
| | | { |
| | | label: 'å·²æ£éª', |
| | | value: 2 |
| | | }, |
| | | { |
| | | label: 'å£åº¦æ£éª', |
| | | value: 4 |
| | | }, |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: 3 |
| | | } |
| | | ], |
| | | more: false, |
| | | tabIndex: '', |
| | | multipleSelection: [], |
| | | orderCheckVersion: 0, |
| | | 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']), |
| | | // 两个å¤åèåå嫿çå®éå®è®¢ååç±»æ¥è¯¢ã |
| | | salesOrderType() { |
| | | return this.$route.path.includes('/incoming') ? '03incoming' : '04subcontract' |
| | | } |
| | | }, |
| | | watch: { |
| | | // 忢å¤åèåæ¶éç½®çéãå页åé䏿°æ®ã |
| | | '$route.path'(path) { |
| | | if (path.includes('/outsourcingOrder/')) { |
| | | this.resetForm('entity') |
| | | this.multipleSelection = [] |
| | | this.goSearch() |
| | | } |
| | | } |
| | | }, |
| | | mounted() { |
| | | if (this.checkPermi(['get:raw:await'])) { |
| | | this.tabIndex = 0 |
| | | } else { |
| | | this.tabIndex = 2 |
| | | } |
| | | this.refreshTable() |
| | | }, |
| | | activated() { |
| | | this.refreshTable() |
| | | }, |
| | | // 离å¼é¡µé¢æè¿å
¥ç¼ååï¼ä½¿å°æªå®æçä¸åæ ¡éªå¤±æã |
| | | beforeRouteLeave(to, from, next) { |
| | | this.orderCheckVersion++ |
| | | next() |
| | | }, |
| | | deactivated() { |
| | | this.orderCheckVersion++ |
| | | }, |
| | | beforeDestroy() { |
| | | this.orderCheckVersion++ |
| | | }, |
| | | // æ¹æ³éå |
| | | methods: { |
| | | validateQuality(){ |
| | | let inboundLength = Number(this.calcInbondLength(this.ifsMaterialPropsForm.startMeterMark,this.ifsMaterialPropsForm.endMeterMark)); |
| | | let testQuantity = Number(this.selectedRow.purQtyInStore); |
| | | 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; |
| | | }, |
| | | saveOrUpdatePartProp(){ |
| | | this.ifsMaterialPropsForm.ifsInventoryId = this.selectedRow.id |
| | | saveOrUpdateProps({ |
| | | ...this.ifsMaterialPropsForm, |
| | | partNo: this.selectedRow.partNo, |
| | | lotBatchNo: this.selectedRow.updateBatchNo, |
| | | contract: this.selectedRow.contract |
| | | }).then((res)=>{ |
| | | if(res.code==200){ |
| | | this.$message.success("ä¿åæå"); |
| | | this.ifsMaterialPropsVisible = false; |
| | | this.refreshView() |
| | | } |
| | | }) |
| | | }, |
| | | getPartProps(ifsId){ |
| | | getOneByIfsId(ifsId).then((res)=>{ |
| | | if(res.code==200 && res.data){ |
| | | this.ifsMaterialPropsForm = res.data; |
| | | } |
| | | }) |
| | | }, |
| | | //æå¼IFSç©æå±æ§å¼¹æ¡ |
| | | showMaterialPropsDialog(row){ |
| | | this.selectedRow = row |
| | | this.getPartProps(row.id) |
| | | this.getOuterColorDicts() |
| | | this.getInsulationColorDicts() |
| | | this.getLetteringInfoDicts() |
| | | this.$nextTick(()=>{ |
| | | this.ifsMaterialPropsVisible = true; |
| | | }) |
| | | }, |
| | | 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.selectedRow = {} |
| | | this.ifsMaterialPropsVisible = false; |
| | | }, |
| | | // ç¹å»æ¥è¯¢åè° |
| | | 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, orderType: this.salesOrderType, 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, orderType: this.salesOrderType, 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, orderType: this.salesOrderType, 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, orderType: this.salesOrderType, ...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, orderType: this.salesOrderType, 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.refreshTable() |
| | | } |
| | | }) |
| | | }).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) { |
| | | const orderType = row.orderType |
| | | if (!['03incoming', '04subcontract'].includes(orderType)) { |
| | | this.$message.error('éæ³çå¤å订ååç±»ï¼è¯·å·æ°å表') |
| | | return |
| | | } |
| | | if (orderType === '04subcontract' && !['åæå', 'æå'].includes(row.materialProp)) { |
| | | this.$message.error('å§å¤å å·¥çç©æå±æ§åªè½ä¸ºåæåææå') |
| | | return |
| | | } |
| | | const currentPath = this.$route.path |
| | | const requestVersion = ++this.orderCheckVersion |
| | | getOrderCountByIfsId(row.id).then(res => { |
| | | // ä»
å½å页颿æ°ä¸æ¬¡æ ¡éªå¯ä»¥å¯¼èªï¼åæµä½¿ç¨ç¹å»æ¶ççå®è®¢ååç±»ã |
| | | if (this._isDestroyed || this._inactive || requestVersion !== this.orderCheckVersion |
| | | || this.$route.path !== currentPath) return |
| | | if (res.code !== 200) return |
| | | if (res.data > 0) { |
| | | this.$message.warning('è¯¥æ¹æ¬¡å·²ä¸åï¼è¯·å¿éå¤ä¸å') |
| | | this.refreshTable() |
| | | return |
| | | } |
| | | const isProduct = orderType === '04subcontract' && row.materialProp === 'æå' |
| | | this.$router.push({ |
| | | path: isProduct ? '/outsourcingFinishProduct/customsInspectionOrder' : '/materialOrder/customsInspectionOrder', |
| | | query: { isOutsourcing: isProduct ? 't' : 'f', orderType: 0, customsInspection: row, active: 1 } |
| | | }) |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | }, |
| | | // ç¹å»æ ·ååç§°æ¥ç详æ
|
| | | 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.refreshTable() |
| | | } |
| | | 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 = this.salesOrderType; |
| | | rawAllExport(params).then(res => { |
| | | this.outLoading = false |
| | | const blob = new Blob([res], { type: 'application/octet-stream' }); |
| | | this.$download.saveAs(blob, this.salesOrderType === '03incoming' ? 'å¤åæ¥æå å·¥æ£æµä¿¡æ¯å¯¼åº.xlsx' : 'å¤åå§å¤å å·¥æ£æµä¿¡æ¯å¯¼åº.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> |