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.
3606 lines
119 KiB
3606 lines
119 KiB
<template>
|
|
<div class="mod-config">
|
|
<!-- 条件查询 -->
|
|
<el-form :inline="true" label-position="top" :model="searchData">
|
|
<el-form-item :label="'单据号'">
|
|
<el-input v-model="searchData.notifyNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'单据状态'">
|
|
<el-select multiple collapse-tags v-model="searchData.orderStatusList" clearable style="width: 160px">
|
|
<el-option label="ISSUE" value="ISSUE"></el-option>
|
|
<el-option label="CLOSED" value="CLOSED"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="推送WCS">
|
|
<el-select v-model="searchData.pushWcsFlag" placeholder="请选择" clearable style="width: 120px">
|
|
<el-option label="全部" value=""></el-option>
|
|
<el-option label="未推送" value="未推送"></el-option>
|
|
<el-option label="部分推送" value="部分推送"></el-option>
|
|
<el-option label="推送完成" value="推送完成"></el-option>
|
|
<el-option label="出库完成" value="出库完成"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="'申请单日期'">
|
|
<el-date-picker style="width: 120px" v-model="searchData.startDate" type="date" value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item style="margin-top: 23px;">
|
|
<!-- <laber style="margin-left: -9px;font-size: 19px"></laber> -->
|
|
~
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-date-picker style="width: 120px" v-model="searchData.endDate" type="date" value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" :loading="searchLoading" @click="getDataList()">查询</el-button>
|
|
<el-button type="success" icon="el-icon-printer" @click="openShipmentLineQueryDialog">打印</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
|
|
<!-- 展示列表 -->
|
|
<el-table :height="height" :data="dataList" border v-loading="searchLoading" ref="inboundTable"
|
|
:row-style="rowStyle" @row-click="inboundClickRow" @current-change="changeCurrentRow"
|
|
style="width: 100%;">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
<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">
|
|
<span v-if="item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
|
|
{{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
|
|
</span>
|
|
<span v-else>{{ scope.row[item.columnProp] }}</span>
|
|
</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="250" label="操作">
|
|
<template slot-scope="scope">
|
|
<!-- <template v-if="!authUpdate">
|
|
<el-link
|
|
v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '待检验' || scope.row.orderStatus === '编辑中'"
|
|
style="cursor: pointer" @click="updateModal(scope.row)">编辑</el-link>
|
|
</template> -->
|
|
<template v-if="!authClose">
|
|
<el-link style="cursor: pointer"
|
|
@click="closeModal(scope.row)">关闭</el-link>
|
|
</template>
|
|
<!-- rqrq - 推送WCS按钮,只在状态为ISSUE且未推送完成时显示 -->
|
|
<el-link v-if="scope.row.pushWcsFlag!=='出库完成'&&scope.row.status==='ISSUE' && scope.row.pushWcsFlag!=='推送完成'"
|
|
style="cursor: pointer; margin-left: 10px;"
|
|
@click="previewInventory(scope.row)">推送WCS</el-link>
|
|
<!-- rqrq - 取消下达按钮,只在状态为ISSUE且未推送WCS时显示 -->
|
|
<el-link v-if="scope.row.status==='ISSUE'&&scope.row.pushWcsFlag==='未推送'"
|
|
style="cursor: pointer; margin-left: 10px;"
|
|
@click="cancelIssueShipmentHandle(scope.row)">取消下达</el-link>
|
|
<!-- <template v-if="!authIssue">
|
|
<el-link v-if="scope.row.orderStatus === '草稿' || scope.row.orderStatus === '编辑中'" style="cursor: pointer"
|
|
@click="issueModal(scope.row)">下达</el-link>
|
|
</template> -->
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
|
|
<!-- 分页栏 -->
|
|
<el-pagination style="margin-top: 0px" @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
|
|
:current-page="pageIndex" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize" :total="totalPage"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
|
|
<!-- 收货入库通知新增/修改 -->
|
|
<el-dialog title="收货入库通知" :close-on-click-modal="false" v-drag :visible.sync="modalFlag" width="525px">
|
|
<el-form :inline="true" label-position="top" :model="modalData" :rules="rules"
|
|
style="margin-left: 7px;margin-top: -5px;">
|
|
<el-form-item label="单据类型" prop="orderType">
|
|
<el-select v-model="modalData.orderType" :disabled="modalDisableFlag" style="width: 100px">
|
|
<el-option label="生产退料" value="生产退料"></el-option>
|
|
<el-option label="生产入库" value="生产入库"></el-option>
|
|
<el-option label="其他入库" value="其他入库"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="要求入库日期" prop="requiredInboundDate">
|
|
<el-date-picker style="width: 120px" v-model="modalData.requiredInboundDate" type="date"
|
|
value-format="yyyy-MM-dd">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" :model="modalData" style="margin-left: 7px">
|
|
<el-form-item>
|
|
<!-- <span v-if="modalDisableFlag" slot="label">供应商</span>-->
|
|
<span style="cursor: pointer" slot="label" @click="getBaseList(506)"><a href="#">供应商</a></span>
|
|
<el-input v-model="modalData.supplierId" @change="supplierBlur(506)" style="width: 100px"></el-input>
|
|
<el-input v-model="modalData.supplierName" disabled style="width: 380px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-form :inline="true" label-position="top" style="margin-left: 7px">
|
|
<el-form-item :label="'备注'">
|
|
<el-input type="textarea" v-model="modalData.remarks" :rows="3" resize='none' show-word-limit
|
|
style="width: 485px;height: 20px"></el-input>
|
|
</el-form-item>
|
|
</el-form>
|
|
<el-footer style="height:35px;margin-top: 55px;text-align:center">
|
|
<el-button type="primary" :loading="saveLoading" @click="saveData()">保存</el-button>
|
|
<el-button type="primary" @click="modalFlag = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<!-- 页签 -->
|
|
<el-tabs v-model="activeTable" style="width: 100%" :style="{height: secondHeight + 'px'}" type="border-card"
|
|
@tab-click="tabClick" class="customer-tab">
|
|
<el-tab-pane label="已申请SHIPMENT" name="inboundDetail">
|
|
<!-- <el-form label-position="top" style="margin-left: 2px;">
|
|
<el-button type="primary" @click="deleteInboundDetail()" icon="el-icon-delete">删除</el-button>
|
|
</el-form> -->
|
|
<el-table :data="detailList" :height="secondHeight - 68" border @selection-change="selectionInboundDetail"
|
|
@row-dblclick="handleShipmentRowDblClick"
|
|
v-loading="searchLoading" style="width: 100%;">
|
|
<!-- <el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column> -->
|
|
<el-table-column v-for="(item,index) in columnDetailList" :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">
|
|
<span v-if="item.columnProp === 'pushWmsFlag' || item.columnProp === 'transportFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
|
|
{{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
|
|
</span>
|
|
<span v-else>{{scope.row[item.columnProp]}}</span>
|
|
</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 prop="requiredQty" header-align="center" align="right" min-width="100" label="要求入库数量">
|
|
<template slot-scope="scope">
|
|
<span v-if="editBatchVisible">
|
|
<el-input :controls="false" v-model="scope.row.requiredQty"
|
|
@input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
|
|
style="height: 11px; width: 98%;">
|
|
</el-input>
|
|
</span>
|
|
<span v-else>
|
|
<span>{{scope.row[scope.column.property]}}</span>
|
|
</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="inWarehouseName" header-align="center" align="center" min-width="180" label="入库仓库">
|
|
<template slot-scope="scope">
|
|
<span v-if="editBatchVisible">
|
|
<el-button type="text" @click="chooseWareHouse(scope.row)"
|
|
style="width:18%;padding: 3px 7px">选择</el-button>
|
|
<el-input v-model="scope.row.inWarehouseName" readonly style="width:77%"></el-input>
|
|
</span>
|
|
<span v-else>
|
|
<span>{{scope.row[scope.column.property]}}</span>
|
|
</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="actualStockInQty" header-align="center" align="right" min-width="100" label="实际入库数量">
|
|
</el-table-column> -->
|
|
<el-table-column fixed="right" header-align="center" align="center" width="150" label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="enterSOSDetail(scope.row)">修改</a>
|
|
<!-- 不需要删除,这里如果删掉了,没地方添加,只允许关闭申请单重新下 -->
|
|
<!-- <a type="text" size="small" @click="deleteNotifySOS(scope.row)" style="margin-left: 10px;">删除</a> -->
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="预留标签清单" name="labelDetail">
|
|
<el-table
|
|
:data="dataList7"
|
|
:height="secondHeight - 68"
|
|
border
|
|
v-loading="searchLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in columnList6" :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">
|
|
<span v-if="item.columnProp === 'outWcsFlag'" :style="{color: scope.row[item.columnProp] === 'Y' ? '#67C23A' : '#909399'}">
|
|
{{ scope.row[item.columnProp] === 'Y' ? '是' : '否' }}
|
|
</span>
|
|
<span v-else>{{ scope.row[item.columnProp] }}</span>
|
|
</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-tab-pane label="shipmentline打印" name="shipmentLinePrint">
|
|
<div v-if="currentShipmentId" style="margin-bottom: 5px; font-size: 12px;">
|
|
当前SHIPMENTID:{{ currentShipmentId }}
|
|
</div>
|
|
<el-table
|
|
:data="shipmentLineList"
|
|
:height="secondHeight - 68"
|
|
border
|
|
v-loading="shipmentLineLoading"
|
|
style="width: 100%;">
|
|
<el-table-column
|
|
v-for="(item,index) in columnShipmentLineList" :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>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-link
|
|
type="primary"
|
|
style="cursor: pointer"
|
|
:disabled="printLoading"
|
|
@click="printShipmentLine(scope.row)"
|
|
>打印</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
|
|
<!-- 收获入库单明细新增 -->
|
|
<el-dialog title="收货入库单明细" :close-on-click-modal="false" v-drag :visible.sync="detailModal" width="900px">
|
|
<div style="font-size: 12px">
|
|
<el-form :inline="true" label-position="top" :model="detailSearchData">
|
|
<el-form-item :label="'物料编码'">
|
|
<el-input v-model="detailSearchData.partNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'物料名称'">
|
|
<el-input v-model="detailSearchData.partDesc" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<template v-if="detailSearchData.orderType === '生产入库'">
|
|
<el-form-item :label="'生产订单'">
|
|
<el-input v-model="detailSearchData.relatedOrderNo" clearable style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
<el-form-item :label="'订单状态'">
|
|
<el-select v-model="detailSearchData.status" clearable style="width: 100px">
|
|
<el-option label="已计划" value="已计划"></el-option>
|
|
<el-option label="已下达" value="已下达"></el-option>
|
|
<el-option label="已排产" value="已排产"></el-option>
|
|
<el-option label="已开工" value="已开工"></el-option>
|
|
<el-option label="已取消" value="已取消"></el-option>
|
|
<el-option label="已停工" value="已停工"></el-option>
|
|
<el-option label="已关闭" value="已关闭"></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</template>
|
|
<el-form-item label=" ">
|
|
<el-button type="primary" @click="searchTypeChange">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
</div>
|
|
<el-container v-if="detailSearchData.orderType === '其他入库'">
|
|
<el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
|
|
<span style="font-size: 12px">可选物料</span>
|
|
<el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
|
|
highlight-current-row style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
<el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
|
|
</el-table-column>
|
|
<el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
|
|
</el-table-column>
|
|
<el-table-column prop="unit" header-align="center" align="left" min-width="120" label="物料单位">
|
|
</el-table-column>
|
|
</el-table>
|
|
<!-- 分页-->
|
|
<el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
|
|
:current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</el-header>
|
|
<el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
|
|
<div>
|
|
<el-button type="primary" @click="addPart">添加>></el-button>
|
|
<el-button type="primary" @click="deletePart">删除<<</el-button>
|
|
</div>
|
|
</el-main>
|
|
<el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
|
|
<span style="font-size: 12px">已选物料</span>
|
|
<div class="rq">
|
|
<el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
|
|
highlight-current-row style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
<el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
|
|
</el-table-column>
|
|
<el-table-column prop="partDesc" header-align="center" align="left" min-width="120" label="物料名称">
|
|
</el-table-column>
|
|
<el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
|
|
<template slot-scope="scope">
|
|
<el-input :controls="false" v-model="scope.row.requiredQty"
|
|
@input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
|
|
style="height: 11px; width: 98%;">
|
|
</el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-footer>
|
|
</el-container>
|
|
<el-container v-else-if="detailSearchData.orderType === '生产入库'">
|
|
<el-header style="width: 880px;height: 200px;padding: 0 0 0 0">
|
|
<span style="font-size: 12px">可选物料</span>
|
|
<el-table height="200px" :data="partList1" border ref="partTable1" @selection-change="selectionPart1"
|
|
highlight-current-row style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
<el-table-column prop="relatedOrderNo" header-align="center" align="left" min-width="100" label="生产订单">
|
|
</el-table-column>
|
|
<el-table-column prop="partNo" header-align="center" align="left" min-width="100" label="物料编码">
|
|
</el-table-column>
|
|
<el-table-column prop="partDesc" header-align="center" align="left" min-width="200" label="物料名称">
|
|
</el-table-column>
|
|
<el-table-column prop="unit" header-align="center" align="left" min-width="80" label="物料单位">
|
|
</el-table-column>
|
|
<el-table-column prop="orderQty" header-align="center" align="right" min-width="80" label="订单数量">
|
|
</el-table-column>
|
|
<el-table-column prop="requiredQty" header-align="center" align="right" min-width="80" label="可入库数">
|
|
</el-table-column>
|
|
<el-table-column prop="countRollNo" header-align="center" align="right" min-width="80" label="可入库卷数">
|
|
</el-table-column>
|
|
</el-table>
|
|
<!-- 分页-->
|
|
<el-pagination style="margin-top: 5px" @size-change="sizeChangeHandle2" @current-change="currentChangeHandle2"
|
|
:current-page="pageIndex2" :page-sizes="[20, 50, 100, 200, 500]" :page-size="pageSize2" :total="totalPage2"
|
|
layout="total, sizes, prev, pager, next, jumper">
|
|
</el-pagination>
|
|
</el-header>
|
|
<el-main style="width: 880px;height: 27px;margin-top: 70px;padding: 0 0 0 0;text-align:center">
|
|
<div>
|
|
<el-button type="primary" @click="addPart">添加>></el-button>
|
|
<el-button type="primary" @click="deletePart">删除<<</el-button>
|
|
</div>
|
|
</el-main>
|
|
<el-footer style="width: 880px;height: 200px;padding: 0 0 0 0;">
|
|
<span style="font-size: 12px">已选物料</span>
|
|
<div class="rq">
|
|
<el-table height="200px" :data="partList2" border ref="partTable2" @selection-change="selectionPart2"
|
|
highlight-current-row style="width: 100%">
|
|
<el-table-column type="selection" header-align="center" align="center" width="50">
|
|
</el-table-column>
|
|
<el-table-column prop="relatedOrderNo" header-align="center" align="center" min-width="80" label="生产订单">
|
|
</el-table-column>
|
|
<el-table-column prop="partNo" header-align="center" align="center" min-width="80" label="物料编码">
|
|
</el-table-column>
|
|
<el-table-column prop="partDesc" header-align="center" align="left" min-width="150" label="物料名称">
|
|
</el-table-column>
|
|
<el-table-column prop="" header-align="center" align="center" min-width="100" label="要求入库数量">
|
|
<template slot-scope="scope">
|
|
<el-input :controls="false" v-model="scope.row.requiredQty"
|
|
@input="value => scope.row.requiredQty = value.match(/^(\d+\.?\d*|\.\d+)$/) ? value : ''"
|
|
style="height: 11px; width: 98%;">
|
|
</el-input>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
</el-footer>
|
|
</el-container>
|
|
<el-footer style="height:30px;margin-top: 35px;text-align:center">
|
|
<el-button type="primary" :loading="saveLoading" @click="saveInboundDetail">保存</el-button>
|
|
<el-button type="primary" @click="detailModal = false">关闭</el-button>
|
|
</el-footer>
|
|
</el-dialog>
|
|
|
|
<el-dialog title="选择工单" :close-on-click-modal="false" v-drag :visible.sync="seqNoModalFlag" width="1000px">
|
|
<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="'生产订单'">
|
|
<el-input v-model="seqNoData.orderno"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item>
|
|
<span slot="label" style="" @click="getBaseList(515)"><a herf="#">机台</a></span>
|
|
|
|
<el-input v-model="seqNoData.sResourceid"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item>
|
|
<span slot="label" style="" @click="getBaseList(216)"><a herf="#">加工中心</a></span>
|
|
<el-input v-model="seqNoData.sWorkcenterno"></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="'派工日期'">
|
|
<el-date-picker style="width: 100%" v-model="seqNoData.startDate" type="date" value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="4">
|
|
<el-form-item :label="'到'">
|
|
<el-date-picker style="width: 100%" v-model="seqNoData.endDate" type="date" value-format="yyyy-MM-dd"
|
|
placeholder="选择日期">
|
|
</el-date-picker>
|
|
</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="">查询</el-button>
|
|
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-row>
|
|
</el-form>
|
|
<el-table :height="400" :data="seqNoList" border style="width: 100%;">
|
|
<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">
|
|
<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="left" header-align="center" align="center" width="60" label="操作">
|
|
<template slot-scope="scope">
|
|
<a type="text" size="small" @click="chooseSOS(scope.row)">选择</a>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center">
|
|
<el-button type="primary" @click="seqNoModalFlag = 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="'生产订单'">
|
|
<el-input v-model="notifyOrderData.orderNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'机台'">
|
|
<el-input v-model="notifyOrderData.sResourceID" 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="12">
|
|
<el-form-item :label="'物料名称'">
|
|
<el-input v-model="notifyOrderData.partDesc" disabled style="width: 204%" ></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-col :span="6">
|
|
<el-form-item label="机台">
|
|
<el-input v-model="notifyOrderData.locationNo" disabled></el-input>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="'此次领料数量'">
|
|
<el-input-number v-model="notifyOrderData.issureQty" style="padding: 0px;width: 100%" :controls="false"
|
|
:step="0" :min="0" class="text-right"></el-input-number>
|
|
</el-form-item>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-form-item :label="' '">
|
|
<el-button type="primary" @click="qtyAllForSeqNo()" style="margin-top: 4%;">全数领料</el-button>
|
|
</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="detailModal2" width="900px">
|
|
<el-table height="400px" :data="detailList2" border style="width: 100%;">
|
|
<el-table-column v-for="(item,index) in columnDetailList2" :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">
|
|
</el-table-column>
|
|
</el-table>
|
|
<el-footer style="height:35px;margin-top: 15px;text-align:center">
|
|
<el-button type="primary" @click="detailModal2 = 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 style="width: 100%;" v-loading="bomLoadFlag">
|
|
<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" 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.qtyOnHand) ? '#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>
|
|
</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>
|
|
|
|
<!-- rqrq - 库存预览弹窗(发货通知单只有绿色和红色) -->
|
|
<el-dialog
|
|
title="库存预览"
|
|
:close-on-click-modal="false"
|
|
v-drag
|
|
:visible.sync="previewDialogVisible"
|
|
width="90%">
|
|
<div v-loading="previewLoading">
|
|
<el-table
|
|
:data="previewData"
|
|
height="400"
|
|
border
|
|
:row-style="getRowStyle"
|
|
highlight-current-row
|
|
style="width: 100%">
|
|
<el-table-column prop="partNo" label="物料编号" sortable min-width="80"></el-table-column>
|
|
<el-table-column prop="requiredQty" label="需求数量" min-width="80" align="right"></el-table-column>
|
|
<el-table-column prop="productionOrderNo" label="发货单" sortable min-width="100"></el-table-column>
|
|
<el-table-column prop="bomLineNo" label="行号" min-width="60"></el-table-column>
|
|
<el-table-column label="是否满足" sortable min-width="80" align="center">
|
|
<template slot-scope="scope">
|
|
<span :style="{color: scope.row.isWarehouseSatisfied === 'Y' ? '#67C23A' : '#F56C6C'}">
|
|
{{ scope.row.isWarehouseSatisfied === 'Y' ? '满足' : '不满足' }}
|
|
</span>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column prop="matchedBarcodes" label="匹配条码" min-width="500" align="left" class-name="wrap-text-column">
|
|
<template slot-scope="scope">
|
|
<div style="white-space: normal; word-break: break-all; line-height: 1.5;">
|
|
{{ scope.row.matchedBarcodes }}
|
|
</div>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</div>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="pushToWcs" :disabled="pushLoading">
|
|
{{ pushLoading ? '推送中...' : '推送至WCS' }}
|
|
</el-button>
|
|
<el-button @click="previewDialogVisible = false" :disabled="pushLoading">关闭</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
|
|
|
|
<!-- 通过输入SHIPMENT查询ShipmentLine并打印 -->
|
|
<el-dialog
|
|
title="ShipmentLine打印"
|
|
:visible.sync="shipmentLineQueryDialogVisible"
|
|
width="90%"
|
|
:close-on-click-modal="false"
|
|
@close="resetShipmentLineQueryDialog"
|
|
>
|
|
<el-form :inline="true" size="small" @submit.native.prevent>
|
|
<el-form-item label="SHIPMENT">
|
|
<el-input
|
|
v-model="dialogShipmentId"
|
|
clearable
|
|
placeholder="请输入SHIPMENT"
|
|
style="width: 220px"
|
|
@keyup.enter.native="searchShipmentLineByDialog"
|
|
/>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-button type="primary" :loading="shipmentLineLoading" @click="searchShipmentLineByDialog">查询</el-button>
|
|
</el-form-item>
|
|
</el-form>
|
|
<div v-if="currentShipmentId" style="margin-bottom: 8px; font-size: 12px;">
|
|
当前SHIPMENTID:{{ currentShipmentId }}
|
|
</div>
|
|
<el-table
|
|
:data="shipmentLineList"
|
|
height="420"
|
|
border
|
|
v-loading="shipmentLineLoading"
|
|
style="width: 100%;"
|
|
>
|
|
<el-table-column
|
|
v-for="(item,index) in columnShipmentLineList" :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>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column fixed="right" header-align="center" align="center" width="80" label="操作">
|
|
<template slot-scope="scope">
|
|
<el-link
|
|
type="primary"
|
|
style="cursor: pointer"
|
|
:disabled="printLoading"
|
|
@click="printShipmentLine(scope.row)"
|
|
>打印</el-link>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-dialog>
|
|
|
|
<!-- shipmentline打印设置:标签类型/模板/打印机由后端按 customerId(receiverId) 自动匹配,红框部分已注释 -->
|
|
<el-dialog
|
|
title="标签打印设置"
|
|
:visible.sync="shipmentLinePrintDialogVisible"
|
|
width="480px"
|
|
:close-on-click-modal="false"
|
|
append-to-body
|
|
@close="resetShipmentLinePrintForm"
|
|
>
|
|
<el-alert
|
|
type="info"
|
|
:closable="false"
|
|
show-icon
|
|
:title="`已选择 1 个标签,请配置打印参数`"
|
|
style="margin-bottom: 16px;"
|
|
/>
|
|
<el-form label-position="top" size="small" class="shipment-line-print-form">
|
|
<div class="print-qty-row">
|
|
<div class="print-qty-item">
|
|
<span class="print-qty-label">打印份数</span>
|
|
<el-input
|
|
v-model="printForm.copies"
|
|
:min="1"
|
|
:max="99"
|
|
controls-position="right"
|
|
class="print-input-number"
|
|
/>
|
|
</div>
|
|
<div class="print-qty-item">
|
|
<span class="print-qty-label">分配数量</span>
|
|
<el-input
|
|
v-model="printForm.assignQty"
|
|
:min="0"
|
|
:precision="2"
|
|
:step="1"
|
|
controls-position="right"
|
|
class="print-input-number"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<div class="form-hint">此数量为打印到标签上的数量</div>
|
|
<!-- 红框部分:标签类型 / 模板 / 打印机 —— 改为按 receiverId 自动匹配,以下注释保留 -->
|
|
<!--
|
|
<el-form-item label="标签类型">
|
|
<el-select
|
|
v-model="printForm.labelType"
|
|
placeholder="请选择标签类型"
|
|
style="width: 100%;"
|
|
@change="handlePrintLabelTypeChange"
|
|
>
|
|
<el-option label="外箱标签" value="外箱标签" />
|
|
<el-option label="内箱标签" value="内箱标签" />
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="根据物料自动匹配模板">
|
|
<el-select
|
|
v-model="printForm.reportId"
|
|
placeholder="请选择标签模板"
|
|
style="width: 100%;"
|
|
filterable
|
|
@change="handlePrintTemplateChange"
|
|
>
|
|
<el-option
|
|
v-for="item in labelTemplateList"
|
|
:key="item.labelNo"
|
|
:label="`${item.labelName} (${item.labelNo})`"
|
|
:value="item.labelNo"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item :label="`已经探测到 ${printerList.length} 台打印机`">
|
|
<el-select
|
|
v-model="printForm.printerName"
|
|
placeholder="请选择打印机"
|
|
style="width: 100%;"
|
|
>
|
|
<el-option
|
|
v-for="item in printerList"
|
|
:key="`${item.labelNo}-${item.printerName}`"
|
|
:label="`${item.printerName}${item.ipAddress ? ' (' + item.ipAddress + ')' : ''}`"
|
|
:value="item.printerName"
|
|
/>
|
|
</el-select>
|
|
</el-form-item>
|
|
-->
|
|
<div class="shipment-line-print-summary">
|
|
<div class="summary-item">
|
|
<span class="summary-label">打印总数</span>
|
|
<span class="summary-value">{{ printForm.copies }} 张</span>
|
|
</div>
|
|
<div class="summary-item">
|
|
<span class="summary-label">物料数量</span>
|
|
<span class="summary-value">1 个</span>
|
|
</div>
|
|
<div class="summary-item">
|
|
<span class="summary-label">每标签份数</span>
|
|
<span class="summary-value">{{ printForm.copies }} 份</span>
|
|
</div>
|
|
</div>
|
|
</el-form>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button @click="shipmentLinePrintDialogVisible = false">取消</el-button>
|
|
<el-button
|
|
type="success"
|
|
icon="el-icon-printer"
|
|
:loading="printLoading"
|
|
:disabled="!canStartShipmentLinePrint"
|
|
@click="confirmShipmentLinePrint"
|
|
>
|
|
开始打印
|
|
</el-button>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import {
|
|
getSiteAndBuByUserName,
|
|
searchNotifyHeader,
|
|
createNotify,
|
|
getNotifyNoDetail,
|
|
searchNotifyMaterialList,
|
|
closeInboundNotification,
|
|
checkUserHasUnissueShipment,
|
|
cancelIssueShipment,
|
|
checkShipmentInventory,
|
|
pushShipmentInventoryToWcs,
|
|
deleteNotifyUnissue,
|
|
saveShipmentMaterialDetail,
|
|
searchUnissueNotifyMaterialList,
|
|
getShipmentLine,
|
|
getShipmentListForIssure
|
|
} from '@/api/shipment/shipmentIssue.js'
|
|
// rqrq - 导入预留标签清单API
|
|
import { searchMaterialListDetail } from '@/api/orderIssure/soIssueNotify.js'
|
|
import Chooselist from '@/views/modules/common/Chooselist_eam'
|
|
import { getChooselist } from '@/api/chooselist/chooselist.js'
|
|
import {
|
|
getTableDefaultListLanguage,
|
|
getTableUserListLanguage,
|
|
} from '@/api/table.js'
|
|
import {
|
|
// getLabelSettingList, // 打印弹框停用,不再手动选模板
|
|
// getUserLabelPrinters, // 打印弹框停用,不再手动选打印机
|
|
printLabelCommon,
|
|
} from '@/api/labelSetting/label_setting.js'
|
|
export default {
|
|
components: {
|
|
Chooselist,
|
|
},
|
|
data() {
|
|
return {
|
|
columnsProp: ['createBy', 'updateBy'],
|
|
// 导出 start
|
|
exportData: [],
|
|
exportName: '收货入库' + this.dayjs().format('YYYYMMDDHHmmss'),
|
|
exportHeader: ['收货入库'],
|
|
exportFooter: [],
|
|
exportList: [],
|
|
// 导出 end
|
|
tagNo: '',
|
|
tagType: '',
|
|
searchData: {
|
|
site: '',
|
|
userName: this.$store.state.user.name,
|
|
orderNo: '',
|
|
orderType: '',
|
|
orderStatus: '',
|
|
orderStatusList: [],
|
|
pushWcsFlag: '', // rqrq - 新增推送WCS筛选条件
|
|
startDate: '',
|
|
endDate: '',
|
|
page: 1,
|
|
limit: 10,
|
|
},
|
|
detailSearchData: {
|
|
site: '',
|
|
buNo: '',
|
|
orderNo: '',
|
|
partNo: '',
|
|
partDesc: '',
|
|
partNos: '',
|
|
orderType: '',
|
|
relatedOrderNo: '',
|
|
status: '',
|
|
page: 1,
|
|
limit: 10,
|
|
},
|
|
height: 200,
|
|
secondHeight: 200,
|
|
pageIndex: 1,
|
|
pageSize: 20,
|
|
totalPage: 0,
|
|
pageIndex2: 1,
|
|
pageSize2: 20,
|
|
totalPage2: 0,
|
|
modalFlag: false,
|
|
modalDisableFlag: false,
|
|
notifyOrderData: {
|
|
partNo: '',
|
|
orderno: '',
|
|
itemno: '',
|
|
seqno: '',
|
|
partDesc: '',
|
|
qtyrequired: '',
|
|
sResourceid: '',
|
|
issureQty: '',
|
|
locationNo: '',
|
|
needDate: '',
|
|
},
|
|
modalData: {
|
|
site: '',
|
|
bu: '',
|
|
buNo: '',
|
|
flag: '',
|
|
orderNo: '',
|
|
orderType: '',
|
|
orderStatus: '',
|
|
requiredInboundDate: '',
|
|
supplierId: '',
|
|
supplierName: '',
|
|
remarks: '',
|
|
createdBy: '',
|
|
updatedBy: '',
|
|
},
|
|
seqNoData: {
|
|
site: localStorage.getItem('site'),
|
|
bu: '',
|
|
orderno: '',
|
|
seqno: '',
|
|
sResourceid: '',
|
|
sWorkcenterno: '',
|
|
operatorId: '',
|
|
sShiftno: '',
|
|
startDate: '',
|
|
endDate: '',
|
|
},
|
|
dataList: [],
|
|
detailList: [],
|
|
userBuList: [],
|
|
inboundSelection: [],
|
|
inboundDetailSelection: [],
|
|
partSelections1: [],
|
|
partSelections2: [],
|
|
partList1: [],
|
|
partList2: [],
|
|
dataListLoading: false,
|
|
// 展示列集
|
|
columnList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1OrderNo',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'notifyNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '单据号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1OrderType',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'orderType',
|
|
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: 610,
|
|
serialNumber: '610Table1OrderStatus',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'status',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '单据状态',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1SupplierId',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'supplierId',
|
|
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: 610,
|
|
serialNumber: '610Table1SupplierName',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'supplierName',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '供应商名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 200,
|
|
}, */
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1RequiredInboundDate',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'notifyDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '申请单日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1CreatedDate',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'enteredDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 170,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1CreatedBy',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'username',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '创建人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
// rqrq - 添加推送WCS字段
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1PushWcsFlag',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'pushWcsFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '推送WCS',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1UpdatedDate',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'updatedDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '更新时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 170,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 610,
|
|
serialNumber: '610Table1UpdatedBy',
|
|
tableId: '610Table1',
|
|
tableName: '收货入库任务表',
|
|
columnProp: 'updatedBy',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '更新人',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
}, */
|
|
],
|
|
columnList2: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2Orderno',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'orderNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'SHIPMENTID',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2Itemno',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'itemNo',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '工序',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 50,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2ItemDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'itemDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '工序名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2PartNo',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'partNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2Qtyrequired',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'qtyRequired',
|
|
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: 701001,
|
|
serialNumber: '701001Table2Qtyreported',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'qtyReported',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '报工数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SScheduleddate',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'sScheduledDate',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '工单日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SWorkcenterno',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'sWorkCenterNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '加工中心编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2WorkCenterDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'workCenterDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '加工中心名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SResourceid',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'sResourceID',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '机台编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2ResourceDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'resourceDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '机台名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2OperatorDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'operatorDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '操作员',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
],
|
|
columnList3: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table3ComponentPartNo',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'componentPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table3IsInWh',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'isInWh',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '是否在立库',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
// rqrq - 新增可用库存列
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table3AvailableQty',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'availableQty',
|
|
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: 701001,
|
|
serialNumber: '701001Table3PartDesc',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'componentPartDesc',
|
|
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: 701001,
|
|
serialNumber: '701001Table3QtyToIssue',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'qtyOnHand',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '可发数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table3QtyToIssue',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'qtyToIssue',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '本次发料数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table3Remark',
|
|
tableId: '701001Table3',
|
|
tableName: '领料申请BOM子表',
|
|
columnProp: 'remark',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '备注',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150,
|
|
},
|
|
],
|
|
columnDetailList: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2Orderno',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'soorderNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'SHIPMENTID',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2PartNo',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'fgpartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
}, */
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2PartNo',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'partDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
showOverflowTooltip: true,
|
|
}, */
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2Qtyrequired',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'lotSize',
|
|
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: 701001,
|
|
serialNumber: '701001Table2Qtyreported',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'unissureQty',
|
|
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: 701001,
|
|
serialNumber: '701001Table2SScheduleddate',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'needDate',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '运输日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2PushWcsTime',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'pushWcsTime',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '推送WCS时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 130,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2PushWmsFlag',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'pushWmsFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '是否推送WCS',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2TransportFlag',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'transportFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '立库取出',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2AreaDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'areaDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '配送区域',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
/* {
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SScheduleddate',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'finishDate',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '工单结束日期',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SWorkcenterno',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'sWorkCenterNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '加工中心编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2WorkCenterDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询工单',
|
|
columnProp: 'workCenterDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '加工中心名称',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2SResourceid',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'sResourceID',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '机台编码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 701001,
|
|
serialNumber: '701001Table2OperatorDesc',
|
|
tableId: '701001Table2',
|
|
tableName: '查询派工单',
|
|
columnProp: 'operatorDesc',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '操作员',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},*/
|
|
],
|
|
columnDetailList2: [
|
|
{
|
|
columnProp: 'subNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '标签条码',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'subQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '入库数量',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'orderRef3',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '入库仓库',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150,
|
|
},
|
|
{
|
|
columnProp: 'orderRef4',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '入库库位',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150,
|
|
},
|
|
{
|
|
columnProp: 'userName',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '操作员',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'transDate',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '操作时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 170,
|
|
},
|
|
],
|
|
// rqrq - 预留标签清单数据和列定义
|
|
dataList7: [],
|
|
columnList6: [
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6ItemNo',
|
|
tableId: '444002Table6',
|
|
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: 444002,
|
|
serialNumber: '444002Table6BomItemNo',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'bomItemNo',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '订单物料行号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 110,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6SerialNo',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'serialNo',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '标签号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 150,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6TaskRef',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'taskRef',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '立库任务号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6TaskItem',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'taskItem',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '立库任务行号',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 110,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6OutWcsFlag',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'outWcsFlag',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '立库取出',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
userId: this.$store.state.user.name,
|
|
functionId: 444002,
|
|
serialNumber: '444002Table6OutWcsTime',
|
|
tableId: '444002Table6',
|
|
tableName: '预留标签清单表',
|
|
columnProp: 'outWcsTime',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '取出时间',
|
|
columnHidden: false,
|
|
columnImage: false,
|
|
columnSortable: false,
|
|
sortLv: 0,
|
|
status: true,
|
|
fixed: '',
|
|
columnWidth: 140,
|
|
},
|
|
],
|
|
rules: {
|
|
bu: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
orderType: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
requiredInboundDate: [
|
|
{
|
|
required: true,
|
|
message: ' ',
|
|
trigger: ['blur', 'change'],
|
|
},
|
|
],
|
|
},
|
|
searchLoading: false,
|
|
saveLoading: false,
|
|
activeTable: 'inboundDetail',
|
|
detailModal: false,
|
|
authSearch: false,
|
|
authSave: false,
|
|
authUpdate: false,
|
|
authDelete: false,
|
|
authArchive: false,
|
|
authClose: false,
|
|
authIssue: false,
|
|
editBatchVisible: false,
|
|
menuId: this.$route.meta.menuId,
|
|
tempWareHouseRow: {},
|
|
detailList2: [],
|
|
detailModal2: false,
|
|
currentRow: {},
|
|
seqNoList:[],
|
|
seqNoModalFlag: false,
|
|
saveSeqNoModalFlag: false,
|
|
bomLoadFlag: false,
|
|
sobomList: [],
|
|
itemNo: '',
|
|
materialModalFlag: false,
|
|
sobomData:{},
|
|
notifyNo:'',
|
|
// rqrq - 库存预览相关变量
|
|
previewDialogVisible: false,
|
|
previewLoading: false,
|
|
pushLoading: false,
|
|
previewData: [],
|
|
currentNotifyRow: null,
|
|
shipmentLineList: [],
|
|
shipmentLineLoading: false,
|
|
currentShipmentId: '',
|
|
currentReceiverId: '',
|
|
shipmentLineQueryDialogVisible: false,
|
|
dialogShipmentId: '',
|
|
shipmentLinePrintDialogVisible: false,
|
|
printLoading: false,
|
|
printShipmentLineRow: null,
|
|
// labelTemplateList / printerList:红框已注释,模板与打印机由 customerId 自动匹配
|
|
// labelTemplateList: [],
|
|
// printerList: [],
|
|
printForm: {
|
|
copies: 1,
|
|
assignQty: 0,
|
|
labelType: '外箱标签',
|
|
reportId: '',
|
|
printerName: '',
|
|
},
|
|
columnShipmentLineList: [
|
|
{
|
|
columnProp: 'shipmentId',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: 'SHIPMENTID',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
columnProp: 'shipmentLineNo',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '行号',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
columnProp: 'inventoryPartNo',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '库存物料号',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 120,
|
|
},
|
|
{
|
|
columnProp: 'sourcePartDescription',
|
|
headerAlign: 'center',
|
|
align: 'left',
|
|
columnLabel: '物料描述',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 150,
|
|
showOverflowTooltip: true,
|
|
},
|
|
{
|
|
columnProp: 'inventoryQty',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '库存数量',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'qtyAssigned',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '已分配数量',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'qtyPicked',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '已拣货数量',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'qtyShipped',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '已发货数量',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'inventoryUom',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '单位',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 60,
|
|
},
|
|
{
|
|
columnProp: 'sourceRef1',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '源引用1',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 100,
|
|
},
|
|
{
|
|
columnProp: 'sourceRef2',
|
|
headerAlign: 'center',
|
|
align: 'right',
|
|
columnLabel: '源引用2',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 80,
|
|
},
|
|
{
|
|
columnProp: 'sourceRef3',
|
|
headerAlign: 'center',
|
|
align: 'center',
|
|
columnLabel: '源引用3',
|
|
columnHidden: false,
|
|
columnSortable: false,
|
|
columnWidth: 80,
|
|
},
|
|
],
|
|
}
|
|
},
|
|
|
|
computed: {
|
|
canStartShipmentLinePrint() {
|
|
return !!(
|
|
this.printForm.copies > 0 &&
|
|
this.printForm.assignQty > 0 &&
|
|
this.printShipmentLineRow &&
|
|
this.currentReceiverId
|
|
)
|
|
},
|
|
},
|
|
|
|
mounted() {
|
|
this.$nextTick(() => {
|
|
this.height = window.innerHeight / 2 - 100
|
|
/*第二个表格高度的动态调整*/
|
|
this.secondHeight = window.innerHeight - this.height - 170
|
|
})
|
|
},
|
|
|
|
created() {
|
|
// 按钮控制
|
|
this.getButtonAuthData()
|
|
// 获取用户的 site 和 bu
|
|
//this.getSiteAndBuByUserName()
|
|
// 动态列
|
|
//this.getTableUserColumn(this.$route.meta.menuId + 'table1', 1)
|
|
//this.getTableUserColumn(this.$route.meta.menuId + 'table2', 2)
|
|
if (!this.authSearch) {
|
|
// 获取数据列表
|
|
this.getDataList()
|
|
}
|
|
},
|
|
|
|
methods: {
|
|
// 获取用户的bu
|
|
getSiteAndBuByUserName() {
|
|
let tempData = {
|
|
username: this.$store.state.user.name,
|
|
}
|
|
getSiteAndBuByUserName(tempData).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.userBuList = data.rows
|
|
}
|
|
})
|
|
},
|
|
|
|
// 获取数据列表
|
|
getDataList() {
|
|
this.searchData.site = this.$store.state.user.site // rqrq - 设置site
|
|
this.searchData.limit = this.pageSize
|
|
this.searchData.page = this.pageIndex
|
|
this.searchData.orderStatus = this.searchData.orderStatusList.join(',')
|
|
console.log("this.",this.searchData);
|
|
|
|
this.searchLoading = true
|
|
searchNotifyHeader(this.searchData)
|
|
.then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.dataList = data.page.list
|
|
this.pageIndex = data.page.currPage
|
|
this.pageSize = data.page.pageSize
|
|
this.totalPage = data.page.totalCount
|
|
console.log("this.dataList",this.dataList);
|
|
|
|
// 判断是否全部存在数据
|
|
if (this.dataList.length > 0) {
|
|
// 设置选中行并高亮第一行
|
|
this.$nextTick(() => {
|
|
this.$refs.inboundTable.setCurrentRow(this.dataList[0])
|
|
this.currentRow = JSON.parse(JSON.stringify(this.dataList[0]))
|
|
// 调用getNotifyNoDetail方法获取入库明细
|
|
this.getNotifyNoDetail()
|
|
})
|
|
} else {
|
|
this.currentRow = {}
|
|
this.detailList = []
|
|
}
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.searchLoading = false
|
|
})
|
|
},
|
|
|
|
// 每页数
|
|
sizeChangeHandle(val) {
|
|
this.pageSize = val
|
|
this.pageIndex = 1
|
|
this.getDataList()
|
|
},
|
|
|
|
// 当前页
|
|
currentChangeHandle(val) {
|
|
this.pageIndex = val
|
|
this.getDataList()
|
|
},
|
|
|
|
// 子明细每页数
|
|
sizeChangeHandle2(val) {
|
|
this.pageSize2 = val
|
|
this.pageIndex2 = 1
|
|
this.searchTypeChange()
|
|
},
|
|
|
|
// 子明细当前页
|
|
currentChangeHandle2(val) {
|
|
this.pageIndex2 = val
|
|
this.searchTypeChange()
|
|
},
|
|
|
|
saveModal() {
|
|
this.modalData = {
|
|
flag: '1',
|
|
site: '',
|
|
orderNo: '',
|
|
orderType: '',
|
|
orderStatus: '',
|
|
requiredInboundDate: '',
|
|
supplierId: '',
|
|
supplierName: '',
|
|
remarks: '',
|
|
createdBy: this.$store.state.user.name,
|
|
}
|
|
this.modalDisableFlag = false
|
|
this.modalFlag = true
|
|
},
|
|
|
|
updateModal(row) {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
this.modalData = {
|
|
flag: '2',
|
|
site: row.site,
|
|
bu: row.site + '_' + row.buNo,
|
|
buNo: row.buNo,
|
|
orderNo: row.orderNo,
|
|
orderType: row.orderType,
|
|
requiredInboundDate: row.requiredInboundDate,
|
|
supplierId: row.supplierId,
|
|
supplierName: row.supplierName,
|
|
remarks: row.remarks,
|
|
updatedBy: this.$store.state.user.name,
|
|
}
|
|
this.modalDisableFlag = true
|
|
this.modalFlag = true
|
|
},
|
|
|
|
saveData() {
|
|
if (this.modalData.orderType === '' || this.modalData.orderType == null) {
|
|
this.$message.warning('请选择单据类型!')
|
|
return
|
|
}
|
|
if (
|
|
this.modalData.requiredInboundDate === '' ||
|
|
this.modalData.requiredInboundDate == null
|
|
) {
|
|
this.$message.warning('请选择要求入库日期!')
|
|
return
|
|
}
|
|
this.saveLoading = true
|
|
if (this.modalData.flag === '1') {
|
|
// 新增
|
|
this.modalData.orderType = '退料入库'
|
|
this.modalData.site = localStorage.getItem('site')
|
|
createNotify(this.modalData)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.modalFlag = false
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.saveLoading = false
|
|
})
|
|
} else {
|
|
// 修改
|
|
updateInboundNotification(this.modalData)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.modalFlag = false
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.saveLoading = false
|
|
})
|
|
}
|
|
},
|
|
|
|
// 删除
|
|
deleteModal() {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
if (this.inboundSelection.length === 0) {
|
|
this.$message.warning('请勾选要删除的单据!')
|
|
return
|
|
}
|
|
this.$confirm(
|
|
`是否删除该 ` + this.inboundSelection.length + ` 条记录?`,
|
|
'提示',
|
|
{
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}
|
|
).then(() => {
|
|
let tempData = {
|
|
submitList: this.inboundSelection,
|
|
}
|
|
deleteInboundNotification(tempData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.inboundSelection = []
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
})
|
|
},
|
|
|
|
// 归档
|
|
archiveModal() {},
|
|
|
|
// 关闭
|
|
closeModal(row) {
|
|
this.$confirm(
|
|
`确认关闭 ` + row.notifyNo + ` 记录?`,
|
|
'提示',
|
|
{
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}
|
|
).then(() => {
|
|
closeInboundNotification(row).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
})
|
|
|
|
},
|
|
|
|
// 下达
|
|
issueModal(row) {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
issueInboundNotification(row).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getDataList()
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
},
|
|
|
|
// 列表表格选择替换
|
|
tabClick(tab, event) {
|
|
// 刷新列表数据
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
|
|
// 当前值发生变化的时候修改 - rqrq
|
|
changeCurrentRow(row, oldRow) {
|
|
// 判断是否是获取焦点的事件
|
|
if (row) {
|
|
this.currentRow = JSON.parse(JSON.stringify(row))
|
|
// 刷新当前页签的数据(根据当前激活的Tab刷新对应数据)- rqrq
|
|
this.refreshCurrentTabTable()
|
|
}
|
|
},
|
|
|
|
// 复选
|
|
selectionInbound(val) {
|
|
this.inboundSelection = val
|
|
},
|
|
|
|
// 明细复选
|
|
selectionInboundDetail(val) {
|
|
this.inboundDetailSelection = val
|
|
},
|
|
|
|
rowStyle({ row }) {
|
|
if (this.currentRow.notifyNo === row.notifyNo) {
|
|
return { 'background-color': '#E8F7F6', cursor: 'pointer' }
|
|
}
|
|
},
|
|
|
|
// 单机选中信息 - rqrq
|
|
inboundClickRow(row, column) {
|
|
console.log("row",row);
|
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row))
|
|
// 点击主表行时,刷新当前页签的数据 - rqrq
|
|
this.refreshCurrentTabTable()
|
|
},
|
|
|
|
// 刷新页签的table数据 - rqrq
|
|
refreshCurrentTabTable() {
|
|
if (this.activeTable === 'inboundDetail') {
|
|
// 刷新已申请SHIPMENT明细数据 - rqrq
|
|
this.getNotifyNoDetail()
|
|
} else if (this.activeTable === 'labelDetail') {
|
|
// 查询预留标签清单 - rqrq
|
|
this.searchMaterialListDetail()
|
|
}
|
|
},
|
|
|
|
// rqrq - 查询预留标签清单
|
|
searchMaterialListDetail() {
|
|
if (!this.currentRow || !this.currentRow.notifyNo) {
|
|
this.dataList7 = []
|
|
return
|
|
}
|
|
const queryData = {
|
|
site: this.currentRow.site || this.$store.state.user.site,
|
|
notifyNo: this.currentRow.notifyNo
|
|
}
|
|
this.searchLoading = true
|
|
searchMaterialListDetail(queryData)
|
|
.then(({ data }) => {
|
|
this.searchLoading = false
|
|
if (data && data.code === 0) {
|
|
this.dataList7 = data.rows || []
|
|
} else {
|
|
this.dataList7 = []
|
|
}
|
|
})
|
|
.catch(() => {
|
|
this.searchLoading = false
|
|
this.dataList7 = []
|
|
})
|
|
},
|
|
|
|
// 查询物料缺陷跟踪
|
|
getInboundDetail() {
|
|
let templateData = {
|
|
site: this.currentRow.site,
|
|
buNo: this.currentRow.buNo,
|
|
orderNo: this.currentRow.orderNo,
|
|
}
|
|
/* getInboundDetail(templateData).then(({ data }) => {
|
|
this.detailList = data.rows
|
|
}) */
|
|
},
|
|
|
|
// 新增明细
|
|
addInboundDetailModal() {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
this.detailSearchData = {
|
|
site: this.currentRow.site,
|
|
buNo: this.currentRow.buNo,
|
|
orderNo: this.currentRow.orderNo,
|
|
orderType: this.currentRow.orderType,
|
|
relatedOrderNo: '',
|
|
status: '',
|
|
partNo: '',
|
|
partDesc: '',
|
|
partNos: '',
|
|
page: 1,
|
|
limit: 10,
|
|
}
|
|
this.partSelections1 = []
|
|
this.partSelections2 = []
|
|
this.partList1 = []
|
|
this.partList2 = []
|
|
this.pageIndex2 = 1
|
|
this.pageSize2 = 20
|
|
this.totalPage2 = 0
|
|
if (this.currentRow.orderType === '生产入库') {
|
|
this.detailSearchData.status = '已开工'
|
|
}
|
|
this.handleGetProjectPartList()
|
|
},
|
|
|
|
handleGetProjectPartList() {
|
|
this.detailSearchData.limit = this.pageSize2
|
|
this.detailSearchData.page = this.pageIndex2
|
|
getInboundPartList(this.detailSearchData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.partList1 = data.page.list
|
|
this.pageIndex2 = data.page.currPage
|
|
this.pageSize2 = data.page.pageSize
|
|
this.totalPage2 = data.page.totalCount
|
|
this.detailModal = true
|
|
}
|
|
})
|
|
},
|
|
|
|
chooseSOSModal() {
|
|
this.seqNoData = {
|
|
site: localStorage.getItem('site'),
|
|
orderno: '',
|
|
seqno: '',
|
|
sResourceid: '',
|
|
sWorkcenterno: '',
|
|
operatorId: '',
|
|
sShiftno: '',
|
|
startDate: this.dayjs().format('YYYY-MM-DD'),
|
|
endDate: this.dayjs().format('YYYY-MM-DD'),
|
|
}
|
|
this.searchSOSRouting()
|
|
this.seqNoModalFlag = true
|
|
},
|
|
searchSOSRouting() {
|
|
getSOScheduledRoutingListForIssure(this.seqNoData).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.seqNoList = data.rows
|
|
}
|
|
})
|
|
},
|
|
// 可选物料
|
|
partClickRow1(row) {
|
|
this.$refs.partTable1.toggleRowSelection(row)
|
|
},
|
|
|
|
// 已有物料
|
|
partClickRow2(row) {
|
|
this.$refs.partTable2.toggleRowSelection(row)
|
|
},
|
|
|
|
selectionPart1(val) {
|
|
this.partSelections1 = val
|
|
},
|
|
|
|
selectionPart2(val) {
|
|
this.partSelections2 = val
|
|
},
|
|
chooseSOS(row) {
|
|
if (this.dataList.length > 0) {
|
|
let stop = false
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].seqNo == row.seqno) {
|
|
stop = true
|
|
}
|
|
}
|
|
if (stop) {
|
|
this.$alert('已经选择过此派工单,请返回点击明细直接操作!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
}
|
|
|
|
this.notifyOrderData.partNo = row.partNo
|
|
this.notifyOrderData.orderNo = row.orderNo
|
|
this.notifyOrderData.itemNo = row.itemNo
|
|
this.notifyOrderData.seqNo = row.seqNo
|
|
this.notifyOrderData.partDesc = row.partDesc
|
|
this.notifyOrderData.qtyRequired = row.qtyRequired
|
|
this.notifyOrderData.sResourceID = row.sResourceID
|
|
this.notifyOrderData.issureQty = ''
|
|
this.notifyOrderData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm')
|
|
this.notifyOrderData.locationNo = row.sResourceID
|
|
this.saveSeqNoModalFlag = true
|
|
},
|
|
|
|
qtyAllForSeqNo() {
|
|
this.notifyOrderData.issureQty = this.notifyOrderData.qtyRequired
|
|
},
|
|
|
|
saveSOS() {
|
|
if (
|
|
this.notifyOrderData.needDate == null ||
|
|
this.notifyOrderData.needDate == ''
|
|
) {
|
|
this.$message.warning('请选择时间!')
|
|
return false
|
|
}
|
|
if (
|
|
this.notifyOrderData.issureQty == null ||
|
|
this.notifyOrderData.issureQty == '' ||
|
|
this.notifyOrderData.issureQty <= 0
|
|
) {
|
|
this.$message.warning('请填写领取数量!')
|
|
return false
|
|
}
|
|
let row = this.notifyOrderData
|
|
if (this.dataList.length > 0) {
|
|
let stop = false
|
|
for (let i = 0; i < this.dataList.length; i++) {
|
|
if (this.dataList[i].seqNo == row.seqno) {
|
|
stop = true
|
|
}
|
|
}
|
|
if (stop) {
|
|
this.$alert('已经选择过此工单,请返回点击明细直接操作!!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
}
|
|
this.$confirm('确定选择工单' + row.seqno + '?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}).then(() => {
|
|
let inData = {
|
|
site: localStorage.getItem('site'),
|
|
notifyNo: this.notifyNo,
|
|
fGPartNo: row.partNo,
|
|
sOOrderNo: row.orderno,
|
|
opsItemNo: row.itemno,
|
|
seqNo: row.seqno,
|
|
locationNo: row.locationNo,
|
|
needDate: row.needDate,
|
|
issureQty: row.issureQty,
|
|
}
|
|
saveSOIssueNotifyOrderList(inData).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.saveSeqNoModalFlag = false
|
|
this.getNotifyNoDetail()
|
|
this.enterSOS(row)
|
|
this.itemNo = data.itemNo
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
}
|
|
})
|
|
})
|
|
},
|
|
getNotifyNoDetail() {
|
|
if (!this.currentRow || !this.currentRow.notifyNo) {
|
|
this.detailList = []
|
|
return
|
|
}
|
|
|
|
let inData = {
|
|
site: this.currentRow.site || localStorage.getItem('site'),
|
|
notifyNo: this.currentRow.notifyNo,
|
|
}
|
|
|
|
getNotifyNoDetail(inData).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.detailList = data.rows || []
|
|
} else {
|
|
this.detailList = []
|
|
}
|
|
}).catch(() => {
|
|
this.detailList = []
|
|
})
|
|
},
|
|
enterSOS(row) {
|
|
this.seqNoModalFlag = false
|
|
this.materialModalFlag = true
|
|
this.sobomList = []
|
|
this.sobomData = {
|
|
orderno: row.orderno,
|
|
seqno: row.seqno,
|
|
partNo: row.partNo,
|
|
}
|
|
this.bomLoadFlag = true
|
|
let inData = {
|
|
site: localStorage.getItem('site'),
|
|
notifyNo: this.notifyNo,
|
|
orderno: row.orderno,
|
|
seqno: row.seqno,
|
|
partNo: row.partNo,
|
|
itemno: row.itemno,
|
|
}
|
|
getSOSBOMForIssure(inData).then(({ data }) => {
|
|
this.bomLoadFlag = false
|
|
if (data.code === 0) {
|
|
this.sobomList = data.rows
|
|
}
|
|
})
|
|
},
|
|
// 改变事件
|
|
searchTypeChange() {
|
|
// 使用 map 提取 partNo 并加上单引号
|
|
let partNos = this.partList2.map((part) => part.partNo)
|
|
// 使用 join 将 partNo 连接成一个字符串
|
|
this.detailSearchData.partNos = partNos.join(',')
|
|
this.handleGetProjectPartList()
|
|
},
|
|
|
|
// 添加物料
|
|
addPart() {
|
|
if (this.partSelections1 == null || this.partSelections1.length === 0) {
|
|
this.$message.warning('请选择可选物料!')
|
|
return
|
|
}
|
|
this.partSelections1.forEach((item) => {
|
|
this.partList2.push(item)
|
|
})
|
|
this.searchTypeChange()
|
|
},
|
|
|
|
// 删除物料
|
|
deletePart() {
|
|
if (this.partSelections2 == null || this.partSelections2.length === 0) {
|
|
this.$message.warning('请选择已选物料!')
|
|
return
|
|
}
|
|
this.partSelections2.forEach((item) => {
|
|
// 使用 filter 过滤掉 partList2 中与 selection.part_no 相同的项
|
|
this.partList2 = this.partList2.filter(
|
|
(part) => part.partNo !== item.partNo
|
|
)
|
|
})
|
|
this.searchTypeChange()
|
|
},
|
|
|
|
// 新增明细
|
|
saveInboundDetail() {
|
|
let tempData = {
|
|
orderNo: this.detailSearchData.orderNo,
|
|
createdBy: this.$store.state.user.name,
|
|
partList: this.partList2,
|
|
}
|
|
this.saveLoading = true
|
|
saveInboundDetail(tempData)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getInboundDetail()
|
|
this.detailModal = false
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.saveLoading = false
|
|
})
|
|
},
|
|
|
|
// 删除物料缺陷跟踪
|
|
deleteInboundDetail() {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
if (this.inboundDetailSelection.length === 0) {
|
|
this.$message.warning('请勾选要删除的单据!')
|
|
return
|
|
}
|
|
this.$confirm(
|
|
`是否删除该 ` + this.inboundDetailSelection.length + ` 条记录?`,
|
|
'提示',
|
|
{
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
}
|
|
).then(() => {
|
|
let tempData = {
|
|
submitList: this.inboundDetailSelection,
|
|
}
|
|
deleteInboundDetail(tempData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getInboundDetail()
|
|
this.inboundDetailSelection = []
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
})
|
|
},
|
|
|
|
// 批量编辑模态框
|
|
editBatchModel() {
|
|
if (this.currentRow.orderType === '采购入库') {
|
|
this.$message.warning('采购入库单据不能编辑!')
|
|
return
|
|
}
|
|
if (this.editBatchVisible) {
|
|
this.editBatchVisible = false
|
|
} else {
|
|
this.editBatchVisible = true
|
|
}
|
|
},
|
|
|
|
// 批量保存
|
|
batchModel() {
|
|
let params = []
|
|
params = this.detailList
|
|
this.saveLoading = true
|
|
updateInboundDetail(params)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getInboundDetail()
|
|
this.$message.success(data.msg)
|
|
this.editBatchVisible = false
|
|
} else {
|
|
this.$message.error(data.msg)
|
|
}
|
|
})
|
|
.finally(() => {
|
|
this.saveLoading = false
|
|
})
|
|
},
|
|
|
|
// 入库明细
|
|
inboundDetailModal(row) {
|
|
getInboundDetail2(row).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.detailList2 = data.rows
|
|
} else {
|
|
this.detailList2 = []
|
|
}
|
|
})
|
|
this.detailModal2 = true
|
|
},
|
|
|
|
// 库位输入校验
|
|
supplierBlur(tagNo) {
|
|
let tempData = {
|
|
tagno: tagNo,
|
|
conditionSql:
|
|
" and SupplierID = '" +
|
|
this.modalData.supplierId +
|
|
"'" +
|
|
" and site = '" +
|
|
this.modalData.site +
|
|
"'",
|
|
}
|
|
getChooselist(tempData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
if (data.baseListData.length > 0) {
|
|
this.modalData.supplierId = data.baseListData[0].SupplierID
|
|
this.modalData.supplierName = data.baseListData[0].SupplierName
|
|
} else {
|
|
this.modalData.supplierName = ''
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
chooseWareHouse(row) {
|
|
this.tempWareHouseRow = row
|
|
this.getBaseList(20)
|
|
},
|
|
saveMaterialDetail() {
|
|
for (let i = 0; i < this.sobomList.length; i++) {
|
|
this.sobomList[i].notifyNo = this.currentRow.notifyNo
|
|
this.sobomList[i].site = this.$store.state.user.site
|
|
this.sobomList[i].bomItemNo =
|
|
this.sobomList[i].lineItemNo || this.sobomList[i].bomItemNo
|
|
}
|
|
|
|
let materialList = this.sobomList.filter((item) => item.qtyToIssue > 0)
|
|
if (materialList.length == 0) {
|
|
this.$alert('没有需要保存的内容!', '提示', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
return false
|
|
}
|
|
console.log('this.sobomList', materialList)
|
|
saveShipmentMaterialDetail(materialList).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.materialModalFlag = false
|
|
this.$message.success('操作成功')
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
}
|
|
})
|
|
},
|
|
|
|
// 获取基础数据列表S
|
|
getBaseList(val, type) {
|
|
this.tagNo = val
|
|
this.tagType = type
|
|
this.$nextTick(() => {
|
|
let strVal = ''
|
|
if (val === 506) {
|
|
strVal = this.modalData.supplierId
|
|
this.$refs.baseList.init(val, strVal)
|
|
}
|
|
if (val === 20) {
|
|
strVal = this.tempWareHouseRow.inWarehouse
|
|
this.$refs.baseList.init(val, strVal)
|
|
}
|
|
})
|
|
},
|
|
|
|
// 列表方法的回调
|
|
getBaseData(val) {
|
|
if (this.tagNo === 506) {
|
|
this.modalData.supplierId = val.SupplierID
|
|
this.modalData.supplierName = val.SupplierName
|
|
}
|
|
if (this.tagNo === 20) {
|
|
this.tempWareHouseRow.inWarehouse = val.WareHouseID
|
|
this.tempWareHouseRow.inWarehouseName = val.WareHouseName
|
|
console.log(this.tempWareHouseRow)
|
|
}
|
|
},
|
|
|
|
async exportExcel() {
|
|
this.searchData.limit = -1
|
|
this.searchData.page = 1
|
|
excel.exportTable({
|
|
url: '/inbound/searchInboundNotification',
|
|
columnMapping: this.columnList, //可以直接用table,不需要的列就剔除
|
|
mergeSetting: [], //需要合并的列
|
|
params: this.searchData,
|
|
fileName: this.exportName + '.xlsx',
|
|
rowFetcher: (res) => res.data,
|
|
columnFormatter: [],
|
|
dropColumns: [],
|
|
})
|
|
},
|
|
|
|
// 动态列开始 获取 用户保存的 格式列
|
|
async getTableUserColumn(tableId, columnId) {
|
|
let queryTableUser = {
|
|
userId: this.$store.state.user.name,
|
|
functionId: this.$route.meta.menuId,
|
|
tableId: tableId,
|
|
status: true,
|
|
languageCode: this.$i18n.locale,
|
|
}
|
|
await getTableUserListLanguage(queryTableUser).then(({ data }) => {
|
|
if (data.rows.length > 0) {
|
|
switch (columnId) {
|
|
case 1:
|
|
this.columnList = data.rows
|
|
break
|
|
}
|
|
} else {
|
|
this.getColumnList(tableId, columnId)
|
|
}
|
|
})
|
|
},
|
|
|
|
enterSOSDetail(row) {
|
|
let rows = {
|
|
site: this.$store.state.user.site,
|
|
notifyNo: this.currentRow.notifyNo,
|
|
soorderNo: row.soorderNo,
|
|
seqNo: row.seqNo,
|
|
partNo: row.fgpartNo,
|
|
itemNo: row.itemNo,
|
|
}
|
|
|
|
this.searchUnissueNotifyMaterialList(rows)
|
|
},
|
|
searchUnissueNotifyMaterialList(row){
|
|
this.bomLoadFlag = true
|
|
this.materialModalFlag = true
|
|
searchUnissueNotifyMaterialList(row).then(({ data }) => {
|
|
if (data.code === 0) {
|
|
this.sobomList = data.rows
|
|
}
|
|
}).finally(() => {
|
|
this.bomLoadFlag = false
|
|
})
|
|
},
|
|
// 删除
|
|
deleteNotifySOS(row) {
|
|
this.$confirm(`是否删除这个工单的申请信息?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
})
|
|
.then(() => {
|
|
deleteNotifyUnissue(row).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.getNotifyNoDetail()
|
|
this.$message({
|
|
message: '操作成功',
|
|
type: 'success',
|
|
duration: 1500,
|
|
onClose: () => {},
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定',
|
|
})
|
|
}
|
|
})
|
|
})
|
|
.catch(() => {})
|
|
},
|
|
|
|
// 获取 tableDefault 列
|
|
async getColumnList(tableId, columnId) {
|
|
let queryTable = {
|
|
functionId: this.$route.meta.menuId,
|
|
tableId: tableId,
|
|
languageCode: this.$i18n.locale,
|
|
}
|
|
await getTableDefaultListLanguage(queryTable).then(({ data }) => {
|
|
if (data.rows.length !== 0) {
|
|
switch (columnId) {
|
|
case 1:
|
|
this.columnList = data.rows
|
|
break
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
//获取按钮的权限数据
|
|
getButtonAuthData() {
|
|
if (this.$store.state.user.id === 1) {
|
|
return
|
|
}
|
|
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')
|
|
let archiveFlag = this.isAuth(this.menuId + ':archive')
|
|
let closeFlag = this.isAuth(this.menuId + ':close')
|
|
let issueFlag = this.isAuth(this.menuId + ':issue')
|
|
//处理页面的权限数据
|
|
this.authSearch = !searchFlag
|
|
this.authSave = !saveFlag
|
|
this.authUpdate = !updateFlag
|
|
this.authDelete = !deleteFlag
|
|
this.authArchive = !archiveFlag
|
|
this.authClose = !closeFlag
|
|
this.authIssue = !issueFlag
|
|
},
|
|
|
|
/**
|
|
* @Description 取消下达处理方法 - rqrq
|
|
* @param row 当前行数据
|
|
*/
|
|
cancelIssueShipmentHandle(row) {
|
|
// 先判断发起人是否有未下达的shipment申请单 - rqrq
|
|
let checkData = {
|
|
site: row.site,
|
|
username: row.username
|
|
}
|
|
|
|
checkUserHasUnissueShipment(checkData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
// 如果有未下达的申请单 - rqrq
|
|
if (data.row != null) {
|
|
this.$alert('该用户有未下达的申请单,请先处理', '提示', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
return
|
|
}
|
|
|
|
// 没有未下达的申请单,执行取消下达 - rqrq
|
|
this.$confirm(`确定取消下达发货申请单【${row.notifyNo}】吗?`, '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
let cancelData = {
|
|
site: row.site,
|
|
notifyNo: row.notifyNo
|
|
}
|
|
|
|
cancelIssueShipment(cancelData).then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.$message.success('取消下达成功')
|
|
// 重新加载数据 - rqrq
|
|
this.getDataList()
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).catch(() => {
|
|
this.$message.error('取消下达失败')
|
|
})
|
|
}).catch(() => {
|
|
// 用户取消操作 - rqrq
|
|
})
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).catch(() => {
|
|
this.$message.error('检查用户申请单失败')
|
|
})
|
|
},
|
|
|
|
/**
|
|
* @Description 预览库存(发货通知单,只考虑立库) - rqrq
|
|
* @param row 当前申请单行数据
|
|
*/
|
|
previewInventory(row) {
|
|
this.currentNotifyRow = row
|
|
this.previewDialogVisible = true
|
|
this.previewLoading = true
|
|
this.previewData = []
|
|
|
|
let inData = {
|
|
site: row.site,
|
|
notifyNo: row.notifyNo
|
|
}
|
|
|
|
checkShipmentInventory(inData).then(({data}) => {
|
|
this.previewLoading = false
|
|
if (data && data.code === 0) {
|
|
this.previewData = data.rows || []
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).catch(() => {
|
|
this.previewLoading = false
|
|
this.$message.error('获取库存预览失败')
|
|
})
|
|
},
|
|
|
|
/**
|
|
* @Description 推送至WCS(发货通知单) - rqrq
|
|
*/
|
|
pushToWcs() {
|
|
if (!this.previewData || this.previewData.length === 0) {
|
|
this.$message.warning('没有可推送的数据')
|
|
return
|
|
}
|
|
|
|
// 检查是否有满足条件的数据(orderSatisfactionStatus === 1,绿色) - rqrq
|
|
const validData = this.previewData.filter(item => item.orderSatisfactionStatus === 1)
|
|
if (validData.length === 0) {
|
|
this.$message.warning('没有满足库存要求的订单,无法推送')
|
|
return
|
|
}
|
|
|
|
this.$confirm('确认推送至WCS?', '提示', {
|
|
confirmButtonText: '确定',
|
|
cancelButtonText: '取消',
|
|
type: 'warning'
|
|
}).then(() => {
|
|
this.pushLoading = true
|
|
|
|
let pushData = {
|
|
site: this.currentNotifyRow.site,
|
|
notifyNo: this.currentNotifyRow.notifyNo,
|
|
shipmentInventoryList: this.previewData
|
|
}
|
|
|
|
pushShipmentInventoryToWcs(pushData).then(({data}) => {
|
|
if (data && data.code === 0) {
|
|
this.$message({
|
|
message: '推送WCS成功',
|
|
type: 'success',
|
|
duration: 1500
|
|
})
|
|
this.previewDialogVisible = false
|
|
this.getDataList() // 刷新列表
|
|
} else {
|
|
this.$alert(data.msg, '错误', {
|
|
confirmButtonText: '确定'
|
|
})
|
|
}
|
|
}).catch(() => {
|
|
this.$message.error('推送WCS失败')
|
|
}).finally(() => {
|
|
this.pushLoading = false
|
|
})
|
|
}).catch(() => {
|
|
// 用户取消 - rqrq
|
|
})
|
|
},
|
|
|
|
/**
|
|
* @Description 表格行样式(发货通知单:绿色=满足,红色=不满足) - rqrq
|
|
*/
|
|
getRowStyle({ row }) {
|
|
if (row.orderSatisfactionStatus === 1) {
|
|
return { backgroundColor: '#67C23A20' } // 绿色背景
|
|
} else if (row.orderSatisfactionStatus === 3) {
|
|
return { backgroundColor: '#F56C6C20' } // 红色背景
|
|
}
|
|
return {}
|
|
},
|
|
|
|
async handleShipmentRowDblClick(row) {
|
|
const shipmentId = row.soorderNo
|
|
if (!shipmentId) {
|
|
this.$message.warning('该行没有SHIPMENTID')
|
|
return
|
|
}
|
|
this.currentShipmentId = shipmentId
|
|
this.currentReceiverId = ''
|
|
|
|
let receiverId = row.receiverId || row.RECEIVER_ID
|
|
if (!receiverId) {
|
|
receiverId = await this.fetchReceiverIdByShipment(shipmentId, row.site)
|
|
}
|
|
|
|
if (!receiverId) {
|
|
this.$message.warning('未获取到receiverId')
|
|
}
|
|
this.currentReceiverId = receiverId || ''
|
|
this.loadShipmentLineList(row, true)
|
|
},
|
|
|
|
openShipmentLineQueryDialog() {
|
|
this.shipmentLineQueryDialogVisible = true
|
|
},
|
|
|
|
resetShipmentLineQueryDialog() {
|
|
this.dialogShipmentId = ''
|
|
},
|
|
|
|
async searchShipmentLineByDialog() {
|
|
const shipmentId = (this.dialogShipmentId || '').trim()
|
|
if (!shipmentId) {
|
|
this.$message.warning('请输入SHIPMENT')
|
|
return
|
|
}
|
|
this.currentShipmentId = shipmentId
|
|
this.currentReceiverId = ''
|
|
|
|
const site = (this.currentRow && this.currentRow.site) || this.$store.state.user.site
|
|
const receiverId = await this.fetchReceiverIdByShipment(shipmentId, site)
|
|
if (!receiverId) {
|
|
this.$message.warning('未获取到receiverId')
|
|
}
|
|
this.currentReceiverId = receiverId || ''
|
|
this.loadShipmentLineList({ soorderNo: shipmentId, site }, false)
|
|
},
|
|
|
|
async fetchReceiverIdByShipment(shipmentId, site) {
|
|
try {
|
|
const querySite = site || (this.currentRow && this.currentRow.site) || this.$store.state.user.site
|
|
const { data } = await getShipmentListForIssure({
|
|
site: querySite,
|
|
orderNo: shipmentId,
|
|
})
|
|
if (data && data.code === 0 && data.rows && data.rows.length > 0) {
|
|
const matched = data.rows.find(item =>
|
|
String(item.SHIPMENT_ID || item.shipmentId) === String(shipmentId)
|
|
) || data.rows[0]
|
|
return matched.receiverId || matched.RECEIVER_ID || ''
|
|
}
|
|
} catch (e) {
|
|
this.$message.error('获取shipment信息失败')
|
|
}
|
|
return ''
|
|
},
|
|
|
|
normalizeShipmentLineRow(row) {
|
|
return {
|
|
shipmentId: row.shipmentId || row.SHIPMENT_ID,
|
|
shipmentLineNo: row.shipmentLineNo != null ? row.shipmentLineNo : row.SHIPMENT_LINE_NO,
|
|
inventoryPartNo: row.inventoryPartNo || row.INVENTORY_PART_NO,
|
|
sourcePartDescription: row.sourcePartDescription || row.SOURCE_PART_DESCRIPTION,
|
|
inventoryQty: row.inventoryQty != null ? row.inventoryQty : row.INVENTORY_QTY,
|
|
qtyAssigned: row.qtyAssigned != null ? row.qtyAssigned : row.QTY_ASSIGNED,
|
|
qtyPicked: row.qtyPicked != null ? row.qtyPicked : row.QTY_PICKED,
|
|
qtyShipped: row.qtyShipped != null ? row.qtyShipped : row.QTY_SHIPPED,
|
|
inventoryUom: row.inventoryUom || row.INVENTORY_UOM,
|
|
sourceRef1: row.sourceRef1 || row.SOURCE_REF1,
|
|
sourceRef2: row.sourceRef2 || row.SOURCE_REF2,
|
|
sourceRef3: row.sourceRef3 || row.SOURCE_REF3,
|
|
}
|
|
},
|
|
|
|
loadShipmentLineList(row, switchTab = true) {
|
|
const params = {
|
|
site: row.site || (this.currentRow && this.currentRow.site) || this.$store.state.user.site,
|
|
orderNo: row.soorderNo,
|
|
}
|
|
this.shipmentLineLoading = true
|
|
getShipmentLine(params)
|
|
.then(({ data }) => {
|
|
if (data && data.code === 0) {
|
|
this.shipmentLineList = (data.rows || []).map(item => this.normalizeShipmentLineRow(item))
|
|
if (switchTab) {
|
|
this.activeTable = 'shipmentLinePrint'
|
|
}
|
|
if (this.shipmentLineList.length === 0) {
|
|
this.$message.warning('未查询到ShipmentLine数据')
|
|
}
|
|
} else {
|
|
this.shipmentLineList = []
|
|
this.$message.error(data.msg || '获取ShipmentLine失败')
|
|
}
|
|
})
|
|
.catch(() => {
|
|
this.shipmentLineList = []
|
|
this.$message.error('获取ShipmentLine失败')
|
|
})
|
|
.finally(() => {
|
|
this.shipmentLineLoading = false
|
|
})
|
|
},
|
|
|
|
printShipmentLine(row) {
|
|
if (!this.currentReceiverId) {
|
|
this.$message.warning('未获取到receiverId,请先查询SHIPMENT')
|
|
return
|
|
}
|
|
this.printShipmentLineRow = row
|
|
this.resetShipmentLinePrintForm()
|
|
this.printForm.assignQty = row.qtyAssigned != null ? row.qtyAssigned : 0
|
|
this.shipmentLinePrintDialogVisible = true
|
|
},
|
|
|
|
resetShipmentLinePrintForm() {
|
|
this.printForm = {
|
|
copies: 1,
|
|
assignQty: 0,
|
|
labelType: '外箱标签',
|
|
reportId: '',
|
|
printerName: '',
|
|
}
|
|
},
|
|
|
|
// 红框相关:模板/打印机加载已停用,由后端按 customerId(receiverId) 自动匹配
|
|
// loadShipmentLinePrintOptions(row) { ... }
|
|
// loadLabelTemplateList(row) { ... }
|
|
// loadPrinterList() { ... }
|
|
// handlePrintLabelTypeChange() { ... }
|
|
// handlePrintTemplateChange() { ... }
|
|
|
|
buildShipmentLinePrintRequest() {
|
|
const row = this.printShipmentLineRow
|
|
const customFields = {
|
|
QTY: this.printForm.assignQty,
|
|
}
|
|
if (row.inventoryPartNo) {
|
|
customFields.partNo = row.inventoryPartNo
|
|
}
|
|
if (row.sourcePartDescription) {
|
|
customFields.partDesc = row.sourcePartDescription
|
|
}
|
|
|
|
const printRequest = {
|
|
reportId: this.printForm.reportId,
|
|
labelType: this.printForm.labelType,
|
|
printerName: this.printForm.printerName,
|
|
copies: this.printForm.copies,
|
|
site: (this.currentRow && this.currentRow.site) || this.$store.state.user.site,
|
|
userId: localStorage.getItem('userName'),
|
|
username: localStorage.getItem('userName'),
|
|
consignmentId: String(row.shipmentId || ''),
|
|
jobNo: String(row.sourceRef1 || ''),
|
|
lineNo: String(row.sourceRef2 || ''),
|
|
relNo: String(row.sourceRef3 || ''),
|
|
lineItemNo: 0,
|
|
customFields,
|
|
}
|
|
|
|
// 将 shipment 的 receiverId 作为 customerId 传给打印接口,由后端按客户匹配标签模板
|
|
if (this.currentReceiverId) {
|
|
printRequest.customerId = this.currentReceiverId
|
|
}
|
|
|
|
return printRequest
|
|
},
|
|
|
|
async confirmShipmentLinePrint() {
|
|
if (!this.canStartShipmentLinePrint) {
|
|
this.$message.warning('请完善打印参数')
|
|
return
|
|
}
|
|
|
|
const row = this.printShipmentLineRow
|
|
if (!this.currentReceiverId) {
|
|
this.$message.warning('未获取到receiverId,无法打印')
|
|
return
|
|
}
|
|
if (!row.shipmentId || !row.sourceRef1 || row.sourceRef2 == null || row.sourceRef3 == null || row.shipmentLineNo == null) {
|
|
this.$message.warning('当前行缺少打印所需的IFS参数')
|
|
return
|
|
}
|
|
if (!this.printForm.assignQty || this.printForm.assignQty <= 0) {
|
|
this.$message.warning('分配数量必须大于0')
|
|
return
|
|
}
|
|
|
|
this.printLoading = true
|
|
try {
|
|
const printRequest = this.buildShipmentLinePrintRequest()
|
|
const { data } = await printLabelCommon(printRequest)
|
|
if (data && (data.code === 200 || data.code === 0)) {
|
|
this.$message.success(data.msg || '打印任务已发送成功')
|
|
this.shipmentLinePrintDialogVisible = false
|
|
} else {
|
|
this.$message.error((data && data.msg) || '打印失败')
|
|
}
|
|
} catch (error) {
|
|
this.$message.error(`打印失败: ${error.message || error}`)
|
|
} finally {
|
|
this.printLoading = false
|
|
}
|
|
},
|
|
},
|
|
}
|
|
</script>
|
|
<style scoped>
|
|
/deep/ .customer-tab .el-tabs__content {
|
|
padding: 5px !important;
|
|
}
|
|
|
|
.shipment-line-print-form .el-form-item {
|
|
margin-bottom: 14px;
|
|
}
|
|
|
|
.print-qty-row {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 20px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.print-qty-item {
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
min-width: 0;
|
|
}
|
|
|
|
.print-qty-label {
|
|
flex-shrink: 0;
|
|
margin-right: 8px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #303133;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number {
|
|
flex: 1;
|
|
width: 0;
|
|
min-width: 110px;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input {
|
|
width: 100%;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input__inner {
|
|
height: 32px;
|
|
line-height: 32px;
|
|
padding-left: 10px;
|
|
padding-right: 40px;
|
|
text-align: left;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__increase,
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease {
|
|
width: 32px;
|
|
height: 16px;
|
|
line-height: 16px;
|
|
font-size: 12px;
|
|
background: #f5f7fa;
|
|
border-left: 1px solid #dcdfe6;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__increase {
|
|
border-bottom: 1px solid #dcdfe6;
|
|
border-radius: 0 4px 0 0;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease {
|
|
border-radius: 0 0 4px 0;
|
|
}
|
|
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__increase:hover,
|
|
.shipment-line-print-form .print-input-number /deep/ .el-input-number__decrease:hover {
|
|
color: #409eff;
|
|
}
|
|
|
|
.shipment-line-print-form .el-form-item__label {
|
|
padding-bottom: 4px;
|
|
line-height: 20px;
|
|
font-weight: 600;
|
|
color: #303133;
|
|
}
|
|
|
|
.shipment-line-print-form .form-hint {
|
|
margin: 0 0 14px;
|
|
font-size: 12px;
|
|
color: #909399;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.shipment-line-print-summary {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
background: #ecf5ff;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.shipment-line-print-summary .summary-item {
|
|
text-align: center;
|
|
}
|
|
|
|
.shipment-line-print-summary .summary-label {
|
|
display: block;
|
|
font-size: 12px;
|
|
color: #909399;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.shipment-line-print-summary .summary-value {
|
|
font-size: 16px;
|
|
font-weight: 600;
|
|
color: #409eff;
|
|
}
|
|
|
|
.el-table /deep/ .cell {
|
|
height: auto;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
/* rqrq - 匹配条码列自动换行显示 */
|
|
/deep/ .wrap-text-column .cell {
|
|
white-space: normal !important;
|
|
word-break: break-all !important;
|
|
line-height: 1.5 !important;
|
|
}
|
|
</style>
|