You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
2280 lines
78 KiB
2280 lines
78 KiB
<template>
|
|
<div>
|
|
<el-form label-position="top" style="margin-top: -0px">
|
|
<el-row :gutter="20">
|
|
<el-col :span="20">
|
|
|
|
<el-button v-if="notifyNo===''" @click="addNotify()" type="primary" class="yzzButtonAn">新建申请单</el-button>
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="chooseSOSModal()" class="yzzButtonAn">选择工单</el-button>
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="xiadaNotify()" class="yzzButtonAn">下达申请单</el-button>
|
|
<el-button v-if="notifyNo!=''" type="primary" @click="deleteNotify()" class="yzzButtonAn">删除申请单</el-button>
|
|
|
|
<el-button v-if="notifyNo!=''" @click="importModel()" type="primary"
|
|
style="margin-left: 2px;margin-top: 0px">{{'导入'}}</el-button>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="10" v-if="notifyNo!=''">
|
|
<el-col :span="3">
|
|
<el-form-item :label="'工厂编码'">
|
|
<el-input v-model="notifyData.site" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item :label="'申请单号'">
|
|
<el-input v-model="notifyData.notifyNo" disabled style="width: 100%;"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item :label="'申请账号'">
|
|
<el-input v-model="notifyData.username" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item :label="'申请时间'">
|
|
<el-input v-model="notifyData.notifyDate" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="3">
|
|
<el-form-item :label="'状态'">
|
|
<el-select v-model="notifyData.status" style="width: 100%" disabled>
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option v-for="item in notifyStatusList" :key="item.listValue" :label="item.listDesc"
|
|
:value="item.listValue"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
|
|
<el-tabs style="font-size: 12px;min-height: 200px" class="customer-tab" v-model="activeName" type="border-card"
|
|
v-if="notifyNo!=''" @tab-click="tabClick">
|
|
<el-tab-pane label="已申请工单" name="sos">
|
|
<el-table :height="height" :data="dataList" border style="width: 100%;" @row-click="changeData">
|
|
<el-table-column v-for="(item,index) in columnList" :key="index" :sortable="item.columnSortable"
|
|
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px" /></span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column fixed="right" header-align="center" align="center" width="100" label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="enterSOSDetail(scope.row)">物料</a>
|
|
<a type="text" size="small" @click="deleteNotifySOS(scope.row)">删除</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="材料明细" name="sub">
|
|
<el-table
|
|
:data="materialDetailList"
|
|
:height="height"
|
|
border
|
|
:row-class-name="materialDetailTableRowClassName"
|
|
v-loading="dataListLoading"
|
|
style="width: 100%; ">
|
|
|
|
<!-- <el-table-column-->
|
|
<!-- header-align="center"-->
|
|
<!-- align="center"-->
|
|
<!-- width="80"-->
|
|
<!-- label="操作">-->
|
|
<!-- <template slot-scope="scope">-->
|
|
<!-- <a type="text" size="small" v-if="currentRow.status==='ISSUE'" @click="deleteNotifyMaterial(scope.row)">删除</a>-->
|
|
|
|
<!-- </template>-->
|
|
<!-- </el-table-column>-->
|
|
<el-table-column
|
|
v-for="(item,index) in materialDetailColumnList" :key="index"
|
|
:sortable="item.columnSortable"
|
|
:prop="item.columnProp"
|
|
:header-align="item.headerAlign"
|
|
:show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align"
|
|
:fixed="item.fixed==''?false:item.fixed"
|
|
:min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<span v-if="!item.columnHidden"> {{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px"/></span>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
<el-dialog title="选择工单物料" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1200px">
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="4">
|
|
<el-form-item :label="'Order No'">
|
|
<el-input v-model="seqNoData.orderNo" @keyup.enter.native="searchSOSRouting()"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="'Release No'">
|
|
<el-input v-model="seqNoData.releaseNo"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="'Sequence No'">
|
|
<el-input v-model="seqNoData.sequenceNo"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item>
|
|
<el-button type="primary" @click="searchSOSRouting()" style="margin-top: 5px" class="" :loading="seqNoModalLoading">添加</el-button>
|
|
<el-button type="danger" @click="deleteSeqNoByOrderNo()" style="margin-top: 5px" class="">删除</el-button>
|
|
<el-button type="danger" @click="deleteSelectedSeqNo()" style="margin-top: 5px" class="" :disabled="selectedSeqNoRows.length === 0">删除勾选</el-button>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-table :height="400" :data="seqNoList" border style="width: 100%;" class="choose-sos-table"
|
|
@selection-change="handleSeqNoSelectionChange" ref="seqNoTable">
|
|
<el-table-column type="selection" width="55" header-align="center" align="center"></el-table-column>
|
|
<el-table-column v-for="(item,index) in columnList2" :key="index" :sortable="item.columnSortable"
|
|
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<div v-if="item.columnProp === 'applyQty'">
|
|
<el-input class="applyQtyClass" v-model="scope.row.applyQty" style="height: 11px; width: 98%;"></el-input>
|
|
</div>
|
|
<!-- rqrq - 可用库存特殊显示:加粗,小于需求数量时红色 -->
|
|
<span v-else-if="item.columnProp === 'availableQty'" :style="{fontWeight: 'bold', color: (scope.row.availableQty < scope.row.qtyRequired) ? '#F56C6C' : ''}">
|
|
{{ scope.row.availableQty }}
|
|
</span>
|
|
<span v-else-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px" /></span>
|
|
</template>
|
|
</el-table-column>
|
|
<!-- <el-table-column fixed="left" header-align="center" align="center" width="80" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-button type="primary" size="mini" plain class="choose-sos-btn" :loading="chooseLoading"
|
|
@click="chooseSOS(scope.row)">选择</el-button>
|
|
</template>
|
|
</el-table-column> -->
|
|
</el-table>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="saveNewSoIssueNotify" :loading="saveNewLoading">保存</el-button>
|
|
<el-button type="primary" @click="seqNoModalFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<!-- 同一订单号对应多个site时,先选具体contract再查物料 - rqrq -->
|
|
<el-dialog title="选择工单Site" :close-on-click-modal="false" v-drag :visible.sync="shopOrderSiteSelectFlag" width="900px" append-to-body>
|
|
<el-table :height="360" :data="shopOrderCandidateList" border style="width: 100%;" highlight-current-row>
|
|
<el-table-column prop="contract" label="Site" min-width="100" header-align="center" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="orderNo" label="OrderNo" min-width="120" header-align="center" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="releaseNo" label="ReleaseNo" min-width="90" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="sequenceNo" label="SequenceNo" min-width="90" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="partNo" label="产品编码" min-width="120" header-align="center" align="center" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="partDesc" label="产品名称" min-width="160" header-align="center" align="left" show-overflow-tooltip></el-table-column>
|
|
<el-table-column prop="objstate" label="状态" min-width="90" header-align="center" align="center"></el-table-column>
|
|
<el-table-column prop="lotSize" label="工单数量" min-width="90" header-align="center" align="right"></el-table-column>
|
|
<el-table-column fixed="right" header-align="center" align="center" width="90" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-button type="primary" size="mini" plain :loading="seqNoModalLoading" @click="confirmShopOrderSite(scope.row)">选择</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="shopOrderSiteSelectFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<el-dialog title="保存工单" :close-on-click-modal="false" v-drag :visible.sync="saveSeqNoModalFlag" width="750px">
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'OrderNo'">
|
|
<el-input v-model="notifyOrderData.orderNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'ReleaseNo'">
|
|
<el-input v-model="notifyOrderData.releaseNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'SequenceNo'">
|
|
<el-input v-model="notifyOrderData.sequenceNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'工单数量'">
|
|
<el-input v-model="notifyOrderData.qtyRequired" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'物料'">
|
|
<el-input v-model="notifyOrderData.partNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="18">
|
|
<el-form-item :label="'物料名称'">
|
|
<el-input v-model="notifyOrderData.partDesc" disabled style="width: 100%"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'要求发料时间'">
|
|
<el-date-picker style="width: 100%" v-model="notifyOrderData.needDate" type="datetime"
|
|
value-format="yyyy-MM-dd HH:mm" placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="saveSOS()">保存</el-button>
|
|
<el-button type="primary" @click="saveSeqNoModalFlag=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<el-dialog title="申请明细" :close-on-click-modal="false" v-drag :visible.sync="materialModalFlag" width="900px">
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'生产订单号'">
|
|
<el-input v-model="sobomData.orderNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'产品编码'">
|
|
<el-input v-model="sobomData.partNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<div class="yzzTable">
|
|
<el-table :height="400" :data="sobomList" border v-loading="bomLoadFlag" style="width: 100%;">
|
|
<el-table-column v-for="(item,index) in columnList3" :key="index" :sortable="item.columnSortable"
|
|
:prop="item.columnProp" :header-align="item.headerAlign" :show-overflow-tooltip="item.showOverflowTooltip"
|
|
:align="item.align" :fixed="item.fixed==''?false:item.fixed" :min-width="item.columnWidth"
|
|
:label="item.columnLabel">
|
|
<template slot-scope="scope">
|
|
<div v-if="item.columnProp === 'qtyToIssue'">
|
|
<el-input v-model="scope.row.qtyToIssue" type="number" style="height: 11px; width: 98%;" :step="0"
|
|
:min="0"></el-input>
|
|
</div>
|
|
<div v-else-if="item.columnProp === 'remark'">
|
|
<el-input v-model="scope.row.remark" style="padding: 0;width: 100%"></el-input>
|
|
</div>
|
|
<!-- rqrq - 可用库存特殊显示:加粗,小于需求数量时红色 -->
|
|
<div v-else-if="item.columnProp === 'availableQty'">
|
|
<span :style="{fontWeight: 'bold', color: (scope.row.availableQty < scope.row.qtyRequired) ? '#F56C6C' : ''}">
|
|
{{ scope.row.availableQty }}
|
|
</span>
|
|
</div>
|
|
<div v-else>
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
|
|
style="width: 100px; height: 80px" /></span>
|
|
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="" header-align="center" align="center" min-width="50" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-button type="primary" @click="qtyAllForBom(scope.row)" style="width: 100%">全数领料</el-button>
|
|
</template>
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
</div>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="saveMaterialDetail()">保存</el-button>
|
|
<el-button type="primary" @click="materialModalFlag=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="保存物料" :close-on-click-modal="false" v-drag :visible.sync="saveOtherPartModalFlag" width="600px">
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'物料编码'">
|
|
<el-input v-model="otherPartData.componentPartNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="18">
|
|
<el-form-item :label="'物料描述'">
|
|
<el-input v-model="otherPartData.partDesc" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="6">
|
|
<el-form-item :label="'计量单位'">
|
|
<el-input v-model="otherPartData.umid" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'需求数量'">
|
|
<el-input-number v-model="otherPartData.qtyToIssue" style="padding: 0;width: 100%" :step="0" :min="0"
|
|
:controls="false"></el-input-number>
|
|
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-form-item :label="'备注'">
|
|
<el-input v-model="otherPartData.remark"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="saveOtherPart()">保存</el-button>
|
|
<el-button type="primary" @click="saveOtherPartModalFlag=false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<el-dialog title="下达申请单" :close-on-click-modal="false" v-drag :visible.sync="showXiadaNotifyDialog"
|
|
width="400px">
|
|
<el-form :inline="true" label-position="top" label-width="500px" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-form-item label="要求发料时间">
|
|
<el-date-picker
|
|
v-model="xiadaNotifyData.planIssueDate"
|
|
type="datetime"
|
|
value-format="yyyy-MM-dd HH:mm:ss"
|
|
format="yyyy-MM-dd HH:mm:ss"
|
|
placeholder="选择日期时间"
|
|
style="width: 100%">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" class="issueNotify">
|
|
<el-input type="textarea" v-model="xiadaNotifyData.remark" :rows="3" placeholder="请输入内容"
|
|
style="width: 100%"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:30px;text-align:center;">
|
|
<el-button type="primary" @click="confirmXiadaNotify()">下达</el-button>
|
|
<el-button type="primary" @click="showXiadaNotifyDialog=false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<el-dialog title="选择申请类型" :close-on-click-modal="false" v-drag :visible.sync="showAddNotifyTypeDialog"
|
|
width="400px">
|
|
<el-form :inline="true" label-position="top" label-width="500px" style="margin-left: 7px;margin-top: -5px;">
|
|
<el-row :gutter="20">
|
|
<el-col :span="24">
|
|
<el-form-item label="申请类型">
|
|
<el-radio-group v-model="selectedNotifyType">
|
|
<el-radio label="production">生产领料单</el-radio>
|
|
<el-radio label="outsourced">委外领料单</el-radio>
|
|
</el-radio-group>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" class="issueNotify">
|
|
<el-input type="textarea" v-model="selectedNotifyRemark" :rows="3" placeholder="请输入内容"
|
|
style="width: 100%"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-footer style="height:30px;text-align:center;">
|
|
<el-button type="primary" @click="confirmAddNotify()">确认</el-button>
|
|
<el-button type="primary" @click="showAddNotifyTypeDialog=false">取消</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
<walUploadExcel ref="walUploadExcel" @refreshTable="searchTable" v-drag></walUploadExcel>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
haiAnGetUserNotifyNo,
|
|
haiAnCreateNotify,
|
|
haiAnDeleteNotify,
|
|
haiAnGetNotifyNoDetail,
|
|
haiAnSaveSOIssueNotifyOrderList,
|
|
haiAnSaveMaterialDetail,
|
|
haiAnDeleteNotifySOS,
|
|
haiAnXiadaNotify,
|
|
haiAnGetSOSBOMForIssureNew,
|
|
haiAnGetShopOrderAndMaterialByShoporder,
|
|
haiAnSaveNewSoIssueNotify,
|
|
haiAnSearchNotifyMaterialListNew,
|
|
getAllNotifyStatus,
|
|
haiAnGetShopOrderFromIFSWithOrderNo,
|
|
} from '@/api/haianWarehouse/shopOrderIssueNotify.js'
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'
|
|
import walUploadExcel from '@/views/modules/orderIssure/walmart_upload_excel.vue'
|
|
|
|
export default {
|
|
name: 'ShopOrderIssueNotify54',
|
|
components: {
|
|
Chooselist,
|
|
walUploadExcel,
|
|
},
|
|
watch: {
|
|
// notifyOrderData: {
|
|
// deep: true,
|
|
// handler: function (newV, oldV) {
|
|
// this.notifyOrderData.locationNo = this.notifyOrderData.locationNo.toUpperCase()
|
|
// }
|
|
// },
|
|
},
|
|
data() {
|
|
return {
|
|
activeName: 'sos',
|
|
noControlPartModelFlag: false,
|
|
buList: [],
|
|
partList: [],
|
|
partList2: [],
|
|
notifyStatusList: [],
|
|
notifyNo: '',
|
|
notifyData: {
|
|
site: '',
|
|
bu: '',
|
|
notifyNo: '',
|
|
notifyDate: '',
|
|
enteredDate: '',
|
|
userName: '',
|
|
userDisplay: '',
|
|
remark: '',
|
|
planIssueDate: '',
|
|
},
|
|
dataList2: [],
|
|
dataList3: [],
|
|
materialDetailList: [],
|
|
currentRow: '',
|
|
dataListLoading: false,
|
|
// 是否收藏
|
|
favorite: false,
|
|
changeBuFlag: false,
|
|
partModelFlag: false,
|
|
newBu: '',
|
|
// 导出 start
|
|
exportData: [],
|
|
exportName: '设备分组' + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ['设备分组'],
|
|
exportFooter: [],
|
|
exportList: [],
|
|
// 导出 end
|
|
searchData: {
|
|
site: this.$store.state.user.site,
|
|
userName: this.$store.state.user.name,
|
|
groupID: '',
|
|
groupDesc: '',
|
|
buDesc: '',
|
|
active: 'Y',
|
|
page: 1,
|
|
limit: 10,
|
|
},
|
|
sobomData: {
|
|
orderNo: '',
|
|
seqno: '',
|
|
partNo: '',
|
|
},
|
|
//申请单序号
|
|
itemNo: '',
|
|
notifyOrderData: {
|
|
partNo: '',
|
|
orderNo: '',
|
|
itemNo: '',
|
|
releaseNo: '',
|
|
sequenceNo: '',
|
|
partDesc: '',
|
|
qtyrequired: '',
|
|
issureQty: '',
|
|
needDate: '',
|
|
},
|
|
seqNoData: {
|
|
site: this.$store.state.user.site,
|
|
seqno: '',
|
|
releaseNo: '',
|
|
sequenceNo: '',
|
|
sResourceID: '',
|
|
sWorkcenterno: '',
|
|
operatorId: '',
|
|
sShiftno: '',
|
|
startDate: '',
|
|
endDate: '',
|
|
},
|
|
seqNoList: [],
|
|
selectedSeqNoRows: [], // 存储选中的行数据
|
|
height: 200,
|
|
pageIndex: 1,
|
|
pageSize: 20,
|
|
totalPage: 0,
|
|
dataList: [],
|
|
sobomList: [],
|
|
dataListSelections: [],
|
|
seqNoModalFlag: false,
|
|
materialModalFlag: false,
|
|
modalDisableFlag: false,
|
|
saveSeqNoModalFlag: false,
|
|
bomLoadFlag: false,
|
|
xiadaList: [],
|
|
columnList4: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table4ComponentPartNo',
|
|
tableId: '555001Table4',
|
|
tableName: '非BOM材料明细',
|
|
columnProp: 'componentPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '材料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table4PartDesc',
|
|
tableId: '555001Table4',
|
|
tableName: '非BOM材料明细',
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '材料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 130,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table4QtyToIssue',
|
|
tableId: '555001Table4',
|
|
tableName: '非BOM材料明细',
|
|
columnProp: 'qtyToIssue',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '申请数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table4Remark',
|
|
tableId: '555001Table4',
|
|
tableName: '非BOM材料明细',
|
|
columnProp: 'remark',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 200,
|
|
},
|
|
],
|
|
modalData: {
|
|
flag: '',
|
|
bu: '',
|
|
site: this.$store.state.user.site,
|
|
groupID: '',
|
|
groupDesc: '',
|
|
active: '',
|
|
createBy: this.$store.state.user.name,
|
|
updateBy: this.$store.state.user.name,
|
|
},
|
|
// 展示列集
|
|
columnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1ItemNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '序号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 50,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1SubSite',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'subSite',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '工厂编号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 90,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1SeqNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请派工单子表',
|
|
columnProp: 'seqNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '派工单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 150,
|
|
}, */
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1SOOrderNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'soorderNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '生产订单号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1ReleaseNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'releaseNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'ReleaseNo',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1SequenceNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'sequenceNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'SequenceNo',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1FgPartNo',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请工单子表',
|
|
columnProp: 'fgPartNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '产成品编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table1NeedDate',
|
|
tableId: '555001Table1',
|
|
tableName: '领料申请派工单子表',
|
|
columnProp: 'needDate',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '要求发料时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
],
|
|
columnList2: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2OrderNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'orderNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'OrderNo',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2ReleaseNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'releaseNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'ReleaseNo',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2SequenceNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'sequenceNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'SequenceNo',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2LineItemNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'lineItemNo',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '行号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 70,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2SubSite',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'subSite',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '工厂编号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2MaterialLineStatus',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'materialLineStatus',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料行状态',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2ComponentPartNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'componentPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2IsInWh',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'isInWh',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '是否在立库',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
// rqrq - 新增可用库存列
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2AvailableQty',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'availableQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '可用库存',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2ComponentPartDesc',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'componentPartDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料描述',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 180,
|
|
showOverflowTooltip: true,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2ApplyQty',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'applyQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '本次申请数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2QtyIssued',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'qtyIssued',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '已发数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2QtyRequired',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'qtyRequired',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '需求数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2QtyReserved',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'qtyReserved',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '预留数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2Uom',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'uom',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '单位',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2PartNo',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '产品编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2PartDesc',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '产品名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 180,
|
|
showOverflowTooltip: true,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2StartDate',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'startDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '开始日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 110,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2FinishDate',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'finishDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '完成日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 110,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table2NeedDate',
|
|
tableId: '555001Table2',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'needDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '需求日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 110,
|
|
},
|
|
],
|
|
columnList3: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3ComponentPartNo',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'componentPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: true,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3IsInWh',
|
|
tableId: '555001Table3',
|
|
tableName: '查询工单及物料',
|
|
columnProp: 'isInWh',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '是否在立库',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
// rqrq - 新增可用库存列
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3AvailableQty',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'availableQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '可用库存',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3PartDesc',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'componentPartDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料描述',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3QtyRequired',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'qtyRequired',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '需求数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 50,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3QtyToIssue',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'qtyToIssue',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '本次申请数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 555001,
|
|
serialNumber: '555001Table3Remark',
|
|
tableId: '555001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'remark',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: false,
|
|
columnWidth: 150,
|
|
},
|
|
],
|
|
materialDetailColumnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3ItemNo',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "itemNo",
|
|
headerAlign: "center",
|
|
align: "right",
|
|
columnLabel: "申请单序号",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3SubSite',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "subSite",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "工厂编号",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 90
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3ComponentPartNo',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "componentPartNo",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "材料编码",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3NeedDate',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "needDate",
|
|
headerAlign: "center",
|
|
align: "center",
|
|
columnLabel: "需求时间",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 110
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3QtyToIssue',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "qtyToIssue",
|
|
headerAlign: "center",
|
|
align: "right",
|
|
columnLabel: "申请数量",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3QtyToIssueOriginal',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "qtyToIssueOriginal",
|
|
headerAlign: "center",
|
|
align: "right",
|
|
columnLabel: "已发数量",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3IssueType',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "issueType",
|
|
headerAlign: "center",
|
|
align: "right",
|
|
columnLabel: "类型",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3Remark',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "remark",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "备注",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 160
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3SOOrderNo',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "soorderNo",
|
|
headerAlign: "center",
|
|
align: "left",
|
|
columnLabel: "生产订单",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120
|
|
},{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701002,
|
|
serialNumber: '701002Table3BOMItemNo',
|
|
tableId: "701002Table3",
|
|
tableName: "申请单材料明细表",
|
|
columnProp: "bomitemNo",
|
|
headerAlign: "center",
|
|
align: "right",
|
|
columnLabel: "BOM序号",
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80
|
|
},
|
|
],
|
|
rules: {
|
|
groupIdType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
groupDescType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
activeType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
bu: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
},
|
|
userBuList: [],
|
|
authSearch: false,
|
|
authSave: false,
|
|
authUpdate: false,
|
|
authDelete: false,
|
|
menuId: this.$route.meta.menuId,
|
|
partSearch: {
|
|
site: '',
|
|
sourceBu: '',
|
|
partNo: '',
|
|
partDesc: '',
|
|
spec: '',
|
|
},
|
|
xiadaModelFlag: false,
|
|
saveOtherPartModalFlag: false,
|
|
otherPartData: {
|
|
site: '',
|
|
notifyNo: '',
|
|
itemNo: '',
|
|
bOMItemNo: '',
|
|
componentPartNo: '',
|
|
qtyToIssue: '',
|
|
issueType: '',
|
|
partDesc: '',
|
|
umid: '',
|
|
remark: '',
|
|
},
|
|
showAddNotifyTypeDialog: false,
|
|
selectedNotifyType: 'production',
|
|
selectedNotifyRemark: '',
|
|
showXiadaNotifyDialog: false,
|
|
xiadaNotifyData: {
|
|
planIssueDate: '',
|
|
remark: '',
|
|
},
|
|
chooseLoading: false,
|
|
seqNoModalLoading: false,
|
|
saveNewLoading: false,
|
|
// 多site工单候选列表(contract区分)- rqrq
|
|
shopOrderSiteSelectFlag: false,
|
|
shopOrderCandidateList: [],
|
|
}
|
|
},
|
|
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight - 220
|
|
})
|
|
},
|
|
|
|
created() {
|
|
// 按钮控制
|
|
// this.getButtonAuthData()
|
|
//this.getTableUserColumn(this.$route.meta.menuId+'Table2',2)
|
|
this.getUserNotifyNo()
|
|
},
|
|
|
|
methods: {
|
|
tabClick(tab, event) {
|
|
// 刷新当前标签页的表格数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
// 材料明细页签查询:明细视图(非聚合),支持subSite过滤 - rqrq
|
|
refreshCurrentTabTable() {
|
|
if (!this.notifyNo) {
|
|
return
|
|
}
|
|
if (this.activeName === 'sub') {
|
|
let queryData = {
|
|
site: this.notifyData.site || this.$store.state.user.site,
|
|
notifyNo: this.notifyNo,
|
|
orderType: 'shoporder',
|
|
}
|
|
if (this.currentRow && this.currentRow.notifyNo) {
|
|
queryData = {
|
|
...this.currentRow,
|
|
site: this.notifyData.site || this.$store.state.user.site,
|
|
subSite: this.currentRow.subSite || '',
|
|
orderType: 'shoporder',
|
|
}
|
|
}
|
|
this.dataListLoading = true
|
|
haiAnSearchNotifyMaterialListNew(queryData).then(({ data }) => {
|
|
this.dataListLoading = false
|
|
if (data && data.code === 0) {
|
|
this.materialDetailList = data.rows || []
|
|
} else {
|
|
this.materialDetailList = []
|
|
}
|
|
}).catch(() => {
|
|
this.dataListLoading = false
|
|
this.materialDetailList = []
|
|
})
|
|
}
|
|
},
|
|
materialDetailTableRowClassName({ row, rowIndex }) {
|
|
if (row.qtyToIssueOriginal < row.qtyToIssue && new Date(row.needDate) < new Date(this.dayjs().format("YYYY-MM-DD HH:mm"))) {
|
|
return 'error-row'
|
|
}
|
|
return ''
|
|
},
|
|
changeData(row) {
|
|
this.currentRow = JSON.parse(JSON.stringify(row))
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
getBaseList(val, type) {
|
|
this.tagNo = val
|
|
let conSql = ''
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
|
|
if (val === 515) {
|
|
strVal = this.seqNoData.sResourceid
|
|
conSql =
|
|
" and site = '" +
|
|
this.notifyData.site +
|
|
"'" +
|
|
" and bu_no = '" +
|
|
this.notifyData.bu +
|
|
"'"
|
|
this.$refs.baseList.init(val, strVal, conSql)
|
|
}
|
|
if (val === 216) {
|
|
strVal = this.seqNoData.sWorkcenterno
|
|
conSql =
|
|
" and site = '" +
|
|
this.notifyData.site +
|
|
"'" +
|
|
" and bu_no = '" +
|
|
this.notifyData.bu +
|
|
"'"
|
|
this.$refs.baseList.init(val, strVal, conSql)
|
|
}
|
|
if (val === 215) {
|
|
strVal = this.notifyOrderData.locationNo
|
|
this.$refs.baseList.init(val, strVal)
|
|
}
|
|
})
|
|
},
|
|
tableRowClassName({ row, rowIndex }) {
|
|
if (row.qtyToIssue > row.qtyAvailable) {
|
|
return 'error-row'
|
|
}
|
|
|
|
return ''
|
|
},
|
|
// 列表方法的回调
|
|
getBaseData(val) {
|
|
if (this.tagNo === 515) {
|
|
this.seqNoData.sResourceid = val.resource_id
|
|
}
|
|
if (this.tagNo === 215) {
|
|
this.notifyOrderData.locationNo = val.location_id
|
|
}
|
|
if (this.tagNo === 216) {
|
|
this.seqNoData.sWorkcenterno = val.work_center_no
|
|
}
|
|
},
|
|
// 海安页面初始化:主单按site加载,避免读取旧模块数据 - rqrq
|
|
getUserNotifyNo() {
|
|
const inData = {
|
|
site: this.$store.state.user.site,
|
|
username: this.$store.state.user.name,
|
|
orderType: 'shoporder',
|
|
}
|
|
this.getAllNotifyStatus()
|
|
haiAnGetUserNotifyNo(inData).then(({ data }) => {
|
|
if (data && data.code === 0 && data.row) {
|
|
this.notifyNo = data.row.notifyNo
|
|
this.notifyData = data.row
|
|
this.getNotifyNoDetail()
|
|
} else {
|
|
this.notifyNo = ''
|
|
this.notifyData = {
|
|
site: '',
|
|
bu: '',
|
|
notifyNo: '',
|
|
notifyDate: '',
|
|
enteredDate: '',
|
|
userName: '',
|
|
userDisplay: '',
|
|
remark: '',
|
|
planIssueDate: '',
|
|
}
|
|
this.dataList = []
|
|
this.materialDetailList = []
|
|
}
|
|
})
|
|
},
|
|
// 海安订单层明细查询:返回subSite供后续材料与指定链路透传 - rqrq
|
|
getNotifyNoDetail() {
|
|
const inData = {
|
|
site: this.$store.state.user.site,
|
|
notifyNo: this.notifyNo,
|
|
orderType: 'shoporder',
|
|
}
|
|
haiAnGetNotifyNoDetail(inData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.dataList = data.rows || []
|
|
}
|
|
})
|
|
},
|
|
// 海安新建主单:保持site来源于登录参数并写入海安模块 - rqrq
|
|
addNotify() {
|
|
const inData = {
|
|
site: this.$store.state.user.site,
|
|
userName: this.$store.state.user.name,
|
|
orderType: 'shoporder',
|
|
}
|
|
haiAnCreateNotify(inData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.$message.success('操作成功')
|
|
this.getUserNotifyNo()
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
confirmAddNotify() {
|
|
let outWorkOrderFlag = 'N'
|
|
if (this.selectedNotifyType === 'outsourced') {
|
|
outWorkOrderFlag = 'Y'
|
|
} else {
|
|
outWorkOrderFlag = 'N'
|
|
}
|
|
let inData = {
|
|
site: this.$store.state.user.site,
|
|
userName: this.$store.state.user.name,
|
|
outWorkOrderFlag: outWorkOrderFlag,
|
|
remark: this.selectedNotifyRemark,
|
|
orderType: 'shoporder', // rqrq - 固定为shoporder类型
|
|
}
|
|
this.getAllNotifyStatus()
|
|
haiAnCreateNotify(inData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.showAddNotifyTypeDialog = false
|
|
this.$message.success('操作成功')
|
|
this.getUserNotifyNo()
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
chooseSOS(row) {
|
|
if (this.dataList.length > 0) {
|
|
//这边是有个判断的,判断派工单号不能重复
|
|
let stop = false
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (
|
|
this.dataList[i].orderNo == row.orderNo &&
|
|
this.dataList[i].releaseNo == row.releaseNo &&
|
|
this.dataList[i].sequenceNo == row.sequenceNo
|
|
) {
|
|
stop = true
|
|
}
|
|
}
|
|
if (stop) {
|
|
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
}
|
|
let inData = {
|
|
site: this.$store.state.user.site,
|
|
orderNo: row.orderNo,
|
|
releaseNo: row.releaseNo,
|
|
sequenceNo: row.sequenceNo,
|
|
}
|
|
this.chooseLoading = true
|
|
haiAnGetShopOrderFromIFSWithOrderNo(inData)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.notifyOrderData.partNo = data.rows[0].partNo
|
|
this.notifyOrderData.orderNo = data.rows[0].orderNo
|
|
this.notifyOrderData.site = this.$store.state.user.site
|
|
this.notifyOrderData.partDesc = data.rows[0].partDesc
|
|
this.notifyOrderData.qtyRequired = data.rows[0].lotSize
|
|
this.notifyOrderData.releaseNo = data.rows[0].releaseNo
|
|
this.notifyOrderData.issureQty = ''
|
|
this.notifyOrderData.needDate =
|
|
this.dayjs().format('YYYY-MM-DD HH:mm')
|
|
this.notifyOrderData.sequenceNo = data.rows[0].sequenceNo
|
|
this.saveSeqNoModalFlag = true
|
|
} else {
|
|
this.$meassage.error(data.msg)
|
|
return
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.chooseLoading = false
|
|
})
|
|
},
|
|
// 保存海安工单行:父层用site,子层补subSite,保持数据隔离 - rqrq
|
|
saveSOS() {
|
|
if (!this.notifyOrderData.needDate) {
|
|
this.$message.warning('请选择时间!')
|
|
return false
|
|
}
|
|
const row = this.notifyOrderData
|
|
const inData = {
|
|
site: this.$store.state.user.site,
|
|
subSite: row.subSite || row.contract || row.site || this.seqNoData.subSite || '',
|
|
notifyNo: this.notifyNo,
|
|
fgPartNo: row.partNo,
|
|
soorderNo: row.orderNo,
|
|
opsItemNo: row.itemNo,
|
|
sequenceNo: row.sequenceNo,
|
|
releaseNo: row.releaseNo,
|
|
needDate: row.needDate,
|
|
issureQty: row.issureQty,
|
|
}
|
|
haiAnSaveSOIssueNotifyOrderList(inData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.saveSeqNoModalFlag = false
|
|
this.getNotifyNoDetail()
|
|
this.$message.success('操作成功')
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
qtyAllForSeqNo() {
|
|
this.notifyOrderData.issureQty = this.notifyOrderData.qtyRequired
|
|
},
|
|
qtyAllForBom(row) {
|
|
row.qtyToIssue = row.qtyRequired
|
|
},
|
|
enterSOSDetail(row) {
|
|
const rows = {
|
|
site: this.$store.state.user.site,
|
|
subSite: row.subSite || '',
|
|
notifyNo: this.notifyNo,
|
|
orderNo: row.soorderNo,
|
|
seqNo: row.seqNo,
|
|
partNo: row.fgPartNo,
|
|
itemNo: row.itemNo,
|
|
releaseNo: row.releaseNo,
|
|
sequenceNo: row.sequenceNo,
|
|
}
|
|
this.enterSOS(rows)
|
|
},
|
|
|
|
// 海安BOM查询:后续明细查询按subSite维度执行(接口回传site=>subSite)- rqrq
|
|
enterSOS(row) {
|
|
this.seqNoModalFlag = false
|
|
this.materialModalFlag = true
|
|
this.sobomList = []
|
|
this.sobomData = {
|
|
orderNo: row.orderNo,
|
|
seqNo: row.seqNo,
|
|
partNo: row.partNo,
|
|
}
|
|
this.bomLoadFlag = true
|
|
const inData = {
|
|
site: row.subSite || this.$store.state.user.site,
|
|
notifyNo: this.notifyNo,
|
|
orderNo: row.orderNo,
|
|
releaseNo: row.releaseNo,
|
|
sequenceNo: row.sequenceNo,
|
|
partNo: row.partNo,
|
|
itemNo: row.itemNo,
|
|
}
|
|
haiAnGetSOSBOMForIssureNew(inData).then(({ data }) => {
|
|
this.bomLoadFlag = false
|
|
if (data && data.code === 0) {
|
|
this.sobomList = data.rows || []
|
|
this.sobomList.forEach(item => {
|
|
item.itemNo = inData.itemNo
|
|
item.subSite = row.subSite || ''
|
|
})
|
|
}
|
|
}).catch(() => {
|
|
this.bomLoadFlag = false
|
|
})
|
|
},
|
|
|
|
chooseSOSModal() {
|
|
this.seqNoData = {
|
|
site: this.$store.state.user.site+'%',
|
|
orderNo: '',
|
|
releaseNo: '*',
|
|
sequenceNo: '*',
|
|
seqno: '',
|
|
sResourceid: '',
|
|
sWorkcenterno: '',
|
|
operatorId: '',
|
|
sShiftno: '',
|
|
startDate: this.dayjs().format('YYYY-MM-DD'),
|
|
endDate: this.dayjs().format('YYYY-MM-DD'),
|
|
}
|
|
this.seqNoList = []
|
|
this.shopOrderCandidateList = []
|
|
this.shopOrderSiteSelectFlag = false
|
|
this.seqNoModalFlag = true
|
|
},
|
|
// 先按site%查ShopOrder;唯一则用contract查物料,多site则弹窗选择 - rqrq
|
|
searchSOSRouting() {
|
|
if (!this.seqNoData.orderNo || !this.seqNoData.releaseNo || !this.seqNoData.sequenceNo) {
|
|
this.$message.warning('请输入完整的OrderNo/ReleaseNo/SequenceNo!')
|
|
return false
|
|
}
|
|
if (this.seqNoModalLoading) {
|
|
return false
|
|
}
|
|
this.seqNoModalLoading = true
|
|
let materialFetchStarted = false
|
|
const shopOrderQuery = {
|
|
...this.seqNoData,
|
|
site: (this.$store.state.user.site || '') + '%',
|
|
}
|
|
haiAnGetShopOrderFromIFSWithOrderNo(shopOrderQuery)
|
|
.then(({ data }) => {
|
|
if (!(data && data.code === 0 && data.rows && data.rows.length > 0)) {
|
|
this.$message.error((data && data.msg) || '未查询到工单')
|
|
return
|
|
}
|
|
const allowedStatuses = ['Released', 'Reserved', 'Started']
|
|
const validOrders = data.rows.filter(item => allowedStatuses.includes(item.objstate))
|
|
if (data.rows.length > 0 && validOrders.length === 0) {
|
|
this.$message.error('生产订单' + this.seqNoData.orderNo + '状态不允许发料,请检查!')
|
|
return
|
|
}
|
|
if (validOrders.length === 1) {
|
|
// 唯一工单:loading交由物料查询方法接管 - rqrq
|
|
materialFetchStarted = true
|
|
return this.fetchShopOrderMaterial(validOrders[0])
|
|
}
|
|
// 多site:展示contract供用户选择后再查物料 - rqrq
|
|
this.shopOrderCandidateList = validOrders
|
|
this.shopOrderSiteSelectFlag = true
|
|
})
|
|
.catch((e) => {
|
|
this.$message.error((e && e.msg) || '查询工单失败')
|
|
})
|
|
.finally(() => {
|
|
if (!materialFetchStarted) {
|
|
this.seqNoModalLoading = false
|
|
}
|
|
})
|
|
},
|
|
// 用户选定具体site(contract)后拉取物料 - rqrq
|
|
confirmShopOrderSite(row) {
|
|
if (!row) {
|
|
return
|
|
}
|
|
this.shopOrderSiteSelectFlag = false
|
|
this.fetchShopOrderMaterial(row)
|
|
},
|
|
// 使用精确site(contract)调用ShopOrderMaterial链路,并映射subSite - rqrq
|
|
fetchShopOrderMaterial(shopOrder) {
|
|
const contract = (shopOrder && (shopOrder.contract || shopOrder.site)) || ''
|
|
if (!contract) {
|
|
this.seqNoModalLoading = false
|
|
this.$message.error('工单缺少Site(contract)信息,无法查询物料')
|
|
return Promise.resolve()
|
|
}
|
|
this.seqNoModalLoading = true
|
|
const materialQuery = {
|
|
...this.seqNoData,
|
|
site: contract,
|
|
orderNo: (shopOrder && shopOrder.orderNo) || this.seqNoData.orderNo,
|
|
releaseNo: (shopOrder && shopOrder.releaseNo) || this.seqNoData.releaseNo,
|
|
sequenceNo: (shopOrder && shopOrder.sequenceNo) || this.seqNoData.sequenceNo,
|
|
}
|
|
return haiAnGetShopOrderAndMaterialByShoporder(materialQuery)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
|
|
data.rows.forEach(newRow => {
|
|
const qtyRequired = parseFloat(newRow.qtyRequired) || 0
|
|
const qtyIssued = parseFloat(newRow.qtyIssued) || 0
|
|
const qtyReserved = parseFloat(newRow.qtyReserved) || 0
|
|
const applyQty = qtyRequired - qtyIssued - qtyReserved
|
|
this.$set(newRow, 'applyQty', applyQty > 0 ? applyQty : 0)
|
|
// 明确subSite来源:优先接口回传,其次选定工单的contract - rqrq
|
|
this.$set(newRow, 'subSite', newRow.subSite || newRow.contract || contract || newRow.site || '')
|
|
this.seqNoList.push(newRow)
|
|
})
|
|
this.$message.success(`成功添加 ${data.rows.length} 条数据`)
|
|
} else {
|
|
this.$message.error((data && data.msg) || '未查询到数据')
|
|
}
|
|
})
|
|
.catch((e) => {
|
|
this.$message.error((e && e.msg) || '查询失败')
|
|
})
|
|
.finally(() => {
|
|
this.seqNoModalLoading = false
|
|
})
|
|
},
|
|
deleteSeqNoByOrderNo() {
|
|
if (this.seqNoData.orderNo == null || this.seqNoData.orderNo == '') {
|
|
this.$message.warning('请输入OrderNo!')
|
|
return false
|
|
}
|
|
if (this.seqNoList.length === 0) {
|
|
this.$message.warning('没有可删除的数据!')
|
|
return false
|
|
}
|
|
// 统计要删除的行数
|
|
const deleteCount = this.seqNoList.filter(row => row.orderNo === this.seqNoData.orderNo).length
|
|
if (deleteCount === 0) {
|
|
this.$message.warning('未找到匹配的OrderNo数据!')
|
|
return false
|
|
}
|
|
this.$confirm(`确定要删除OrderNo为 ${this.seqNoData.orderNo} 的 ${deleteCount} 条数据吗?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}).then(() => {
|
|
// 删除所有匹配的orderNo行
|
|
this.seqNoList = this.seqNoList.filter(row => row.orderNo !== this.seqNoData.orderNo)
|
|
this.$message.success(`成功删除 ${deleteCount} 条数据`)
|
|
}).catch(() => {
|
|
// 用户取消删除
|
|
})
|
|
},
|
|
// 处理表格选择变化
|
|
handleSeqNoSelectionChange(selection) {
|
|
this.selectedSeqNoRows = selection
|
|
},
|
|
// 删除勾选的数据
|
|
deleteSelectedSeqNo() {
|
|
if (this.selectedSeqNoRows.length === 0) {
|
|
this.$message.warning('请先勾选要删除的数据!')
|
|
return false
|
|
}
|
|
this.$confirm(`确定要删除选中的 ${this.selectedSeqNoRows.length} 条数据吗?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}).then(() => {
|
|
// 获取要删除的行的唯一标识(使用 orderNo + lineItemNo 作为唯一标识)
|
|
const deleteKeys = this.selectedSeqNoRows.map(row => `${row.orderNo}_${row.lineItemNo || ''}`)
|
|
// 过滤掉选中的行
|
|
this.seqNoList = this.seqNoList.filter(row => {
|
|
const rowKey = `${row.orderNo}_${row.lineItemNo || ''}`
|
|
return !deleteKeys.includes(rowKey)
|
|
})
|
|
// 清空选中状态
|
|
this.selectedSeqNoRows = []
|
|
if (this.$refs.seqNoTable) {
|
|
this.$refs.seqNoTable.clearSelection()
|
|
}
|
|
this.$message.success(`成功删除 ${deleteKeys.length} 条数据`)
|
|
}).catch(() => {
|
|
// 用户取消删除
|
|
})
|
|
},
|
|
// 保存海安BOM明细:编辑场景由后端统一删后重存,前端透传标准字段 - rqrq
|
|
saveMaterialDetail() {
|
|
this.sobomList.forEach(item => {
|
|
if (item.applyQty === '' || item.applyQty == null) {
|
|
item.applyQty = 0
|
|
}
|
|
item.notifyNo = this.notifyNo
|
|
item.site = this.$store.state.user.site
|
|
item.subSite = item.subSite || (this.currentRow && this.currentRow.subSite) || ''
|
|
})
|
|
const materialList = this.sobomList.filter(item => item.qtyToIssue > 0)
|
|
if (materialList.length === 0) {
|
|
this.$alert('没有需要保存的内容!', '提示', { confirmButtonText: '确定' })
|
|
return false
|
|
}
|
|
haiAnSaveMaterialDetail(materialList).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.materialModalFlag = false
|
|
this.refreshCurrentTabTable()
|
|
this.$message.success('操作成功')
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
// 海安保存工单明细:按申请数量过滤后直接提交 - rqrq
|
|
saveNewSoIssueNotify() {
|
|
this.seqNoList.forEach(item => {
|
|
if (item.applyQty === '' || item.applyQty == null) {
|
|
item.applyQty = 0
|
|
}
|
|
item.notifyNo = this.notifyNo
|
|
item.site = this.$store.state.user.site
|
|
item.subSite = item.subSite || item.contract || ''
|
|
})
|
|
const materialList = this.seqNoList.filter(item => item.applyQty > 0)
|
|
if (materialList.length === 0) {
|
|
this.$alert('没有需要保存的内容!', '提示', { confirmButtonText: '确定' })
|
|
return false
|
|
}
|
|
const saveNotify = {
|
|
site: this.$store.state.user.site,
|
|
notifyNo: this.notifyNo,
|
|
userName: this.$store.state.user.name,
|
|
materialList,
|
|
}
|
|
this.saveNewLoading = true
|
|
haiAnSaveNewSoIssueNotify(saveNotify).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.seqNoModalFlag = false
|
|
this.getUserNotifyNo()
|
|
this.$message.success('操作成功')
|
|
} else if (data) {
|
|
this.$message.error(data.msg)
|
|
}
|
|
}).finally(() => {
|
|
this.saveNewLoading = false
|
|
})
|
|
},
|
|
|
|
saveOtherPart() {
|
|
this.$message.warning('海安生产领料页面不支持此操作')
|
|
},
|
|
|
|
startDownload() {},
|
|
|
|
finishDownload() {},
|
|
|
|
fields() {
|
|
let json = '{'
|
|
this.columnList.forEach((item, index) => {
|
|
if (index == this.columnList.length - 1) {
|
|
json +=
|
|
'"' + item.columnLabel + '"' + ':' + '"' + item.columnProp + '"'
|
|
} else {
|
|
json +=
|
|
'"' +
|
|
item.columnLabel +
|
|
'"' +
|
|
':' +
|
|
'"' +
|
|
item.columnProp +
|
|
'"' +
|
|
','
|
|
}
|
|
})
|
|
json += '}'
|
|
let s = eval('(' + json + ')')
|
|
return s
|
|
},
|
|
xiadaNotifyModel() {
|
|
if (
|
|
this.dataList.length == 0 &&
|
|
this.dataList2.length == 0 &&
|
|
this.dataList3.length == 0
|
|
) {
|
|
this.$alert('没有明细记录无法下达!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
this.xiadaModelFlag = true
|
|
},
|
|
xiadaNotify() {
|
|
// 检查是否有明细记录
|
|
if (
|
|
this.dataList.length == 0
|
|
) {
|
|
this.$alert('没有明细记录无法下达!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
// 初始化弹框数据
|
|
this.xiadaNotifyData = {
|
|
planIssueDate: this.notifyData.planIssueDate || this.dayjs().format('YYYY-MM-DD HH:mm:ss'),
|
|
remark: this.notifyData.remark || '',
|
|
}
|
|
// 打开弹框
|
|
this.showXiadaNotifyDialog = true
|
|
},
|
|
// 海安下达:保持原交互弹窗,但改为海安后端路由 - rqrq
|
|
confirmXiadaNotify() {
|
|
if (this.dataList.length === 0) {
|
|
this.$alert('没有明细记录无法下达!!', '提示', { confirmButtonText: '确定' })
|
|
return false
|
|
}
|
|
if (!this.xiadaNotifyData.planIssueDate) {
|
|
this.$message.warning('请选择要求发料时间!')
|
|
return false
|
|
}
|
|
const notifyData = {
|
|
...this.notifyData,
|
|
site: this.$store.state.user.site,
|
|
planIssueDate: this.xiadaNotifyData.planIssueDate,
|
|
remark: this.xiadaNotifyData.remark,
|
|
}
|
|
haiAnXiadaNotify(notifyData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.showXiadaNotifyDialog = false
|
|
this.getUserNotifyNo()
|
|
this.$message.success('操作成功')
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
// 海安删除主单:走海安服务释放预留并清理子表 - rqrq
|
|
deleteNotify() {
|
|
if (this.dataList.length > 0) {
|
|
this.$alert('请先删除已经申请的明细记录!!', '提示', { confirmButtonText: '确定' })
|
|
return false
|
|
}
|
|
haiAnDeleteNotify(this.notifyData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getUserNotifyNo()
|
|
this.$message.success(data.msg || '删除成功')
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
},
|
|
// 海安页面不使用非BOM/不管控物料查询,保留空实现避免模板引用报错 - rqrq
|
|
searchOtherPart() {},
|
|
// 导出占位:海安页面未启用设备分组导出 - rqrq
|
|
async createExportData() {
|
|
return []
|
|
},
|
|
importModel() {
|
|
// 海安导入尚未切换到海安后端链路,先显式阻断避免误写旧表 - rqrq
|
|
this.$alert('海安54页面暂未启用导入功能,请使用“选择工单”流程保存。', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
},
|
|
// 海安删除子行:调用海安路由避免误删旧流程数据 - rqrq
|
|
deleteNotifySOS(row) {
|
|
this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}).then(() => {
|
|
haiAnDeleteNotifySOS(row).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getNotifyNoDetail()
|
|
this.$message.success('操作成功')
|
|
} else if (data) {
|
|
this.$alert(data.msg, '错误', { confirmButtonText: '确定' })
|
|
}
|
|
})
|
|
}).catch(() => {})
|
|
},
|
|
|
|
//获取按钮的权限数据
|
|
getButtonAuthData() {
|
|
let searchFlag = this.isAuth(this.menuId + ':search')
|
|
let saveFlag = this.isAuth(this.menuId + ':save')
|
|
let updateFlag = this.isAuth(this.menuId + ':update')
|
|
let deleteFlag = this.isAuth(this.menuId + ':delete')
|
|
//处理页面的权限数据
|
|
this.authSearch = !searchFlag
|
|
this.authSave = !saveFlag
|
|
this.authUpdate = !updateFlag
|
|
this.authDelete = !deleteFlag
|
|
},
|
|
|
|
searchTable() {},
|
|
// 海安页面未启用动态列配置,保留空实现 - rqrq
|
|
getTableUserColumn() {},
|
|
getColumnList() {},
|
|
// 枚举读取保持公共接口,避免状态码重复维护 - rqrq
|
|
getAllNotifyStatus() {
|
|
const inData = {
|
|
site: this.$store.state.user.site,
|
|
listName: 'ISSUENOTIFYHEADER_STATUS',
|
|
locale: this.$i18n.locale,
|
|
}
|
|
getAllNotifyStatus(inData).then(({ data }) => {
|
|
this.notifyStatusList = data
|
|
})
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
.board666 .el-table .error-row {
|
|
background: #f86868;
|
|
}
|
|
|
|
/deep/ .el-table .error-row {
|
|
background: #f86868 !important;
|
|
}
|
|
|
|
/* 在 <style scoped> 下,使用深度选择器作用到 ElementUI 内部结构 */
|
|
.issueNotify {
|
|
width: 100%;
|
|
height: auto;
|
|
}
|
|
.issueNotify /deep/ .el-form-item__content {
|
|
display: inline !important;
|
|
}
|
|
|
|
.site-content > .el-tabs > .el-tabs__content > .site-tabs__tools {
|
|
top: 35px;
|
|
height: 40px;
|
|
font-size: 16px;
|
|
line-height: 40px;
|
|
}
|
|
|
|
.text-right /deep/ .el-input__inner {
|
|
text-align: right !important;
|
|
}
|
|
|
|
.text-right /deep/ .el-input-number__input {
|
|
text-align: right !important;
|
|
}
|
|
|
|
.yzzTable /deep/.el-table .cell {
|
|
line-height: 20px;
|
|
font-size: 12px;
|
|
height: 20px;
|
|
}
|
|
.applyQtyClass /deep/.el-input__inner{
|
|
height: 14px !important;
|
|
}
|
|
/* 选择工单弹窗:紧凑表格与按钮样式 */
|
|
.choose-sos-btn {
|
|
height: 14px;
|
|
box-sizing: border-box;
|
|
padding: 0 6px;
|
|
line-height: 12px;
|
|
font-size: 12px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
</style>
|
|
|