报工记录修改

yangwl
LAPTOP-R6EHHS26\86155 8 months ago
parent e2b4129452
commit 1fd4cc98e9

@ -1,63 +1,41 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="98px">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
label-width="98px">
<el-form-item label="生产订单编码" prop="orderCode">
<el-input
v-model="queryParams.orderCode"
placeholder="请输入生产订单编码"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.orderCode" placeholder="请输入生产订单编码" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="生产工单编码" prop="workorderCode">
<el-input
v-model="queryParams.workorderCode"
placeholder="请输入生产工单编码"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.workorderCode" placeholder="请输入生产工单编码" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="产品编码" prop="productCode">
<el-input
v-model="queryParams.productCode"
placeholder="请输入产品编码"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.productCode" placeholder="请输入产品编码" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
</el-form-item>
<el-form-item label="产品名称" prop="productName">
<el-input
v-model="queryParams.productName"
placeholder="请输入产品名称"
clearable
@keyup.enter.native="handleQuery"
/>
<el-input v-model="queryParams.productName" placeholder="请输入产品名称" clearable
@keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="生产时间" prop="feedbackTimeArray">
<el-date-picker
v-model="queryParams.feedbackTimeArray"
format="yyyy-MM-dd"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
<el-date-picker v-model="queryParams.feedbackTimeArray" format="yyyy-MM-dd" type="datetimerange"
range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="SAP报工结果" prop="uploadStatus">
<el-select v-model="queryParams.uploadStatus" placeholder="请选择结果" clearable>
<el-option
v-for="item in uploadStatusList"
:key="item.dictValue"
:label="item.dictLabel"
<el-option v-for="item in uploadStatusList" :key="item.dictValue" :label="item.dictLabel"
:value="item.dictValue">
</el-option>
</el-select>
</el-form-item>
<el-form-item
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery"></el-button>
<el-form-item <el-button type="primary" icon="el-icon-search" size="mini"
@click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
@ -96,100 +74,49 @@
</el-col>
-->
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleReportHz"
v-hasPermi="['mes:reportWork:report']"
>报工信息维护</el-button>
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single"
@click="handleReportHz" v-hasPermi="['mes:reportWork:report']">报工信息维护</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-s-release"
size="mini"
:disabled="single"
@click="handleConsumeHz"
v-hasPermi="['mes:reportWork:report']"
>报工损耗</el-button>
<el-button type="danger" plain icon="el-icon-s-release" size="mini" :disabled="single"
@click="handleConsumeHz" v-hasPermi="['mes:reportWork:report']">报工损耗</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-s-claim"
size="mini"
:disabled="single"
@click="handleReport"
v-hasPermi="['mes:reportWork:edit']"
>报工SAP</el-button>
<el-button type="primary" plain icon="el-icon-s-claim" size="mini" :disabled="single"
@click="handleReport" v-hasPermi="['mes:reportWork:edit']">报工SAP</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-s-claim"
size="mini"
:disabled="single"
@click="handleReportCancel"
v-hasPermi="['mes:reportWork:edit']"
>撤销报工SAP</el-button>
<el-button type="primary" plain icon="el-icon-s-claim" size="mini" :disabled="single"
@click="handleReportCancel" v-hasPermi="['mes:reportWork:edit']">撤销报工SAP</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['mes:reportWork:export']"
>导出</el-button>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport"
v-hasPermi="['mes:reportWork:export']">导出</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAddSAP"
>SAP收货</el-button>
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAddSAP">SAP</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
:disabled="single"
icon="el-icon-download"
size="mini"
@click="showPrint"
>打印预览
<el-button type="success" plain :disabled="single" icon="el-icon-download" size="mini"
@click="showPrint">打印预览
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="reportWorkList" @selection-change="handleSelectionChange">
<el-table v-loading="loading" :ref="tableIndex" :data="reportWorkList"
@selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" />
<el-table-column label="工单编码" align="center" prop="workorderCode" width="130">
<template slot-scope="scope">
<el-button
type="text"
@click="handleReportHz(scope.row)"
>{{scope.row.workorderCode}}</el-button>
<el-button type="text" @click="handleReportHz(scope.row)">{{ scope.row.workorderCode }}</el-button>
</template>
</el-table-column>
<el-table-column label="订单编码" align="center" prop="workorderCodeSap" width="130"
:formatter="orderCodeFormate"
/>
:formatter="orderCodeFormate" />
<el-table-column label="产品编码" align="center" prop="productCode" width="130"
:formatter="productCodeFormate"
/>
:formatter="productCodeFormate" />
<el-table-column label="线体编码" align="center" prop="machineCode" />
<el-table-column label="线体名称" align="center" prop="machineName" />
<el-table-column label="产品名称" align="center" prop="productName" width="220" :show-overflow-tooltip="true" />
@ -201,23 +128,16 @@
<el-table-column label="生产时间" align="center" prop="productDate" width="100" />
<el-table-column label="SAP报工状态" align="center" prop="uploadStatus" width="150">
<template slot-scope="scope">
<dict-tag
:options="dict.type.report_sap_status"
:value="scope.row.uploadStatus"
/>
<dict-tag :options="dict.type.report_sap_status" :value="scope.row.uploadStatus" />
</template>
</el-table-column>
<el-table-column label="SAP报工时间" align="center" prop="uploadTime" width="150" />
<el-table-column label="SAP报工信息" align="center" prop="uploadMsg" width="150" :show-overflow-tooltip="true"/>
<el-table-column label="SAP报工信息" align="center" prop="uploadMsg" width="150"
:show-overflow-tooltip="true" />
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改报工报表对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
@ -234,7 +154,8 @@
<el-col :span="6">
<el-form-item label="报工人员姓名" prop="nickName">
<el-input v-model="form.nickName" placeholder="请输入报工人员">
<el-button slot="append" @click="handleSelectUser" icon="el-icon-search"></el-button>
<el-button slot="append" @click="handleSelectUser"
icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
@ -252,7 +173,8 @@
<el-col :span="6">
<el-form-item label="生产工单编码" prop="workorderCode">
<el-input v-model="form.workorderCode" placeholder="请选择生产工单">
<el-button slot="append" @click="handleSelectWorkOrder" icon="el-icon-search"></el-button>
<el-button slot="append" @click="handleSelectWorkOrder"
icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
</el-col>
@ -261,22 +183,16 @@
<el-col :span="6">
<el-form-item label="批次编码" prop="batch">
<el-select v-model="form.batch" class="selectItem" placeholder="请选择批次" clearable>
<el-option v-for="(item,index) in batchList"
:key="index"
:label="item.batchCode"
:value="item.batchCode">
<el-option v-for="(item, index) in batchList" :key="index"
:label="item.batchCode" :value="item.batchCode">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报工时间" prop="feedbackTime">
<el-date-picker clearable
v-model="form.feedbackTime"
type="date"
value-format="yyyy-MM-dd"
style="width: 180px"
placeholder="请选择报工时间">
<el-date-picker clearable v-model="form.feedbackTime" type="date"
value-format="yyyy-MM-dd" style="width: 180px" placeholder="请选择报工时间">
</el-date-picker>
</el-form-item>
</el-col>
@ -291,7 +207,8 @@
<el-col :span="6">
<el-form-item label="线体名称" prop="machineName">
<el-input v-model="form.machineName" placeholder="请选择线体名称">
<el-button slot="append" @click="handleSelectEquip" icon="el-icon-search"></el-button>
<el-button slot="append" @click="handleSelectEquip"
icon="el-icon-search"></el-button>
</el-input>
</el-form-item>
<el-form-item label="线体编码" prop="machineCode" v-if="false">
@ -302,17 +219,9 @@
<el-row>
<el-col :span="6">
<el-form-item label="工作中心" prop="workCenter">
<el-select
v-model="form.workCenter"
filterable
placeholder="请选择"
>
<el-option
v-for="item in options1"
:key="item.factoryCode"
:label="item.factoryName"
:value="item.factoryCode"
>
<el-select v-model="form.workCenter" filterable placeholder="请选择">
<el-option v-for="item in options1" :key="item.factoryCode"
:label="item.factoryName" :value="item.factoryCode">
</el-option>
</el-select>
</el-form-item>
@ -349,32 +258,18 @@
<el-row>
<el-col :span="6">
<el-form-item label="报工数量(母)" prop="quantityFeedback">
<el-input-number
:min="0"
:step="1"
v-model="form.quantityFeedback"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.quantityFeedback"
style="width: 180px" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报工工时(母)" prop="workTime">
<el-input-number
:min="0"
:step="1"
v-model="form.workTime"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.workTime" style="width: 180px" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报工用人(母)" prop="useMan">
<el-input-number
:min="0"
:step="1"
v-model="form.useMan"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.useMan" style="width: 180px" />
</el-form-item>
</el-col>
</el-row>
@ -406,32 +301,18 @@
<el-row>
<el-col :span="6">
<el-form-item label="报工数量(子)" prop="quantityFeedbacks">
<el-input-number
:min="0"
:step="1"
v-model="form.quantityFeedbacks"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.quantityFeedbacks"
style="width: 180px" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报工工时(子)" prop="workTimes">
<el-input-number
:min="0"
:step="1"
v-model="form.workTimes"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.workTimes" style="width: 180px" />
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="报工用人(子)" prop="useMans">
<el-input-number
:min="0"
:step="1"
v-model="form.useMans"
style="width: 180px"
/>
<el-input-number :min="0" :step="1" v-model="form.useMans" style="width: 180px" />
</el-form-item>
</el-col>
</el-row>
@ -446,10 +327,9 @@
</el-tab-pane>
<el-tab-pane label="物料损耗" name="second">
<div>
<ReportWorkConsume ref="child"
:workorderCode="form.workorderCode"
@onSelected="onSelectMaterial"
></ReportWorkConsume>
<ReportWorkConsume ref="child" :workorderCode="form.workorderCode"
@onSelected="onSelectMaterial">
</ReportWorkConsume>
</div>
</el-tab-pane>
</el-tabs>
@ -462,40 +342,37 @@
<!-- 报工信息详情 -->
<el-dialog :title="titleReport" :visible.sync="openReport" width="1200px">
<el-tabs v-model="activeNameR">
<el-tab-pane
v-for="(item, index) in libTabs"
:key="index"
:label="item.title"
:name="item.libId"
>
<el-table v-loading="loading" :data="item.libList" ref="myPOrderTable"
@select="pReportSelection"
@select-all="allReportSelection"
:summary-method="getSummaries"
show-summary
:ref = "tableIndex+index"
>
<el-tab-pane v-for="(item, index) in libTabs" :key="index" :label="item.title" :name="item.libId">
<el-table v-loading="loading" :data="item.libList" ref="myPOrderTable" @select="pReportSelection"
@select-all="allReportSelection" :summary-method="getSummaries" show-summary>
<el-table-column width="60" align="center" type="selection" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="工单编码" width="130" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="110" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="报工单号" width="110" align="left" prop="reportCode" :show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch" :show-overflow-tooltip="true" />
<el-table-column label="工单编码" width="130" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="110" align="left" prop="workorderCodeSap"
:show-overflow-tooltip="true" :formatter="orderCodeFormate" />
<el-table-column label="报工单号" width="110" align="left" prop="reportCode"
:show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch"
:show-overflow-tooltip="true" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="报工数量" width="100" align="left" prop="quantityFeedback" :show-overflow-tooltip="true" >
<el-table-column label="报工数量" width="100" align="left" prop="quantityFeedback"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantityFeedback" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.quantityFeedback"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="工时数" align="center" prop="workTime">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.workTime" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.workTime"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="用人数" align="center" prop="useMan">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.useMan" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.useMan"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
@ -503,8 +380,8 @@
<div class="demo-input-suffix">
<p>备注</p>
<el-input type="textarea" @blur ="addRemarksblur(item.libList,item.remark,index)" v-model="item.remark"
placeholder="请输入内容(300个字内)" maxlength=300/>
<el-input type="textarea" @blur="addRemarksblur(item.libList, item.remark, index)"
v-model="item.remark" placeholder="请输入内容(300个字内)" maxlength=300 />
</el-input>
</div>
</el-tab-pane>
@ -518,31 +395,28 @@
<!-- 报工损耗 -->
<el-dialog :title="titleConsume" :visible.sync="openConsume" width="1200px">
<el-tabs v-model="activeNameC">
<el-tab-pane
v-for="(item, index) in libConsumeTabs"
:key="index"
:label="item.title"
:name="item.libId"
>
<el-tab-pane v-for="(item, index) in libConsumeTabs" :key="index" :label="item.title"
:name="item.libId">
<el-table v-loading="loading" :data="item.libList" ref="mypConsumeTable"
@select="pConsumeSelection"
@select-all="allConsumeSelection"
>
<el-table v-loading="loading" highlight-current-row :ref="tableIndex + index" :data="item.libList"
@select="pConsumeSelection" @select-all="allConsumeSelection">
<el-table-column width="50" align="center" type="selection" />
<el-table-column label="recordId" align="center" prop="recordId" v-if="false" />
<el-table-column label="parentOrder" align="center" prop="parentOrder" v-if="false" />
<el-table-column label="工单编码" width="140" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="130" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true"
:formatter="orderCodeFormate"/>
<el-table-column label="物料编码" width="130" align="left" prop="materialCode" :show-overflow-tooltip="true"
:formatter="productCodeFormate"
/>
<el-table-column label="物料名称" width="280" align="left" prop="materialName" :show-overflow-tooltip="true" />
<el-table-column label="工单编码" width="140" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column label="订单编码" width="130" align="left" prop="workorderCodeSap"
:show-overflow-tooltip="true" :formatter="orderCodeFormate" />
<el-table-column label="物料编码" width="130" align="left" prop="materialCode"
:show-overflow-tooltip="true" :formatter="productCodeFormate" />
<el-table-column label="物料名称" width="280" align="left" prop="materialName"
:show-overflow-tooltip="true" />
<el-table-column label="BOM组件用量" width="150" align="left" prop="planQuantity" />
<el-table-column label="实际用量" width="150" align="left" prop="quantity" :show-overflow-tooltip="true" >
<el-table-column label="实际用量" width="150" align="left" prop="quantity"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantity" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.quantity"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="单位" width="50" align="center" prop="unit" />
@ -552,33 +426,25 @@
<template slot-scope="scope">
<el-select v-model="scope.row.warehouseCode" placeholder="请选择仓库" width="50%"
@change="handleEdit(scope.$index, scope.row)"
v-if="scope.row.workorderCodeSap == null||scope.row.attr1"
clearable
>
<el-option
v-for="work in cwarehouseList"
:key="work.warehouseCode"
:label="work.warehouseName"
:value="work.warehouseCode"
></el-option>
v-if="scope.row.workorderCodeSap == null || scope.row.attr1" clearable>
<el-option v-for="work in cwarehouseList" :key="work.warehouseCode"
:label="work.warehouseName" :value="work.warehouseCode"></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column label="创建时间" align="center" prop="createTime" width="150" />
<el-table-column fixed="right" label="操作" width="90">
<template slot-scope="scope">
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)"
size="small" type="danger" plain
v-if="scope.row.workorderCodeSap == null||scope.row.attr1"
>
<el-button @click.native.prevent="deleteBomRow(scope.$index, item.libList)" size="small"
type="danger" plain v-if="scope.row.workorderCodeSap == null || scope.row.attr1">
移除</el-button>
</template>
</el-table-column>
</el-table>
<div class="button-container">
<el-button size="mini" type="primary" @click="addConsumeTableRow(item.libList,index)"></el-button>
<el-button size="mini" type="primary"
@click="addConsumeTableRow(item.libList, index)">新增物料</el-button>
</div>
</el-tab-pane>
<!--工单产品bom参考
@ -615,31 +481,38 @@
<!-- SAP收货 -->
<el-dialog :title="titleReport" :visible.sync="openReportSAP" width="1200px">
<el-select v-model="selectedWarehouse" placeholder="请选择仓库">
<el-option v-for="warehouse in warehouseList" :key="warehouse.warehouseCode" :label="warehouse.warehouseName" :value="warehouse.warehouseCode"></el-option>
<el-option v-for="warehouse in warehouseList" :key="warehouse.warehouseCode"
:label="warehouse.warehouseName" :value="warehouse.warehouseCode"></el-option>
</el-select>
<el-tabs v-model="activeName">
<el-tab-pane label="母工单报工信息" name="pOrder">
<el-table v-loading="loading" :data="pOrderTableList" ref="myPOrderTable" @selection-change="pReportSelection"
:summary-method="getSummaries"
show-summary
>
<el-table v-loading="loading" :data="pOrderTableList" ref="myPOrderTable"
@selection-change="pReportSelection" :summary-method="getSummaries" show-summary>
<el-table-column width="50" align="center" type="selection" />
<el-table-column label="id" align="center" prop="id" v-if="false" />
<el-table-column label="SAP工单编码" width="250" align="left" prop="workorderCodeSap" :show-overflow-tooltip="true" />
<el-table-column label="工单编码" width="150" align="left" prop="workorderCode" :show-overflow-tooltip="true" />
<el-table-column label="报工单号" width="150" align="left" prop="reportCode" :show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch" :show-overflow-tooltip="true" />
<el-table-column label="SAP工单编码" width="250" align="left" prop="workorderCodeSap"
:show-overflow-tooltip="true" />
<el-table-column label="工单编码" width="150" align="left" prop="workorderCode"
:show-overflow-tooltip="true" />
<el-table-column label="报工单号" width="150" align="left" prop="reportCode"
:show-overflow-tooltip="true" />
<el-table-column label="批次" width="250" align="left" prop="batch"
:show-overflow-tooltip="true" />
<el-table-column label="产品编码" width="350" align="center" prop="productCode" />
<el-table-column label="产品名称" width="350" align="center" prop="productName" />
<el-table-column label="单位" align="center" prop="unit" />
<el-table-column label="报工数量" width="100" align="left" prop="quantityFeedback" :show-overflow-tooltip="true" >
<el-table-column label="报工数量" width="100" align="left" prop="quantityFeedback"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantityFeedback" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.quantityFeedback"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column label="入库数量" width="100" align="left" prop="quantityQualified" :show-overflow-tooltip="true" >
<el-table-column label="入库数量" width="100" align="left" prop="quantityQualified"
:show-overflow-tooltip="true">
<template slot-scope="scope">
<el-input type="number" size="small" v-model="scope.row.quantityQualified" @change="handleEdit(scope.$index,scope.row)"></el-input>
<el-input type="number" size="small" v-model="scope.row.quantityQualified"
@change="handleEdit(scope.$index, scope.row)"></el-input>
</template>
</el-table-column>
<!-- <el-table-column label="用人数" align="center" prop="useMan">-->
@ -650,7 +523,8 @@
<!-- <el-table-column label="计划日期" width="100" align="center" prop="productDate"/>-->
<el-table-column label="计划日期" width="180" align="center" prop="productDate">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.productDate" :value-format="'yyyy-MM-dd'" type="date" ></el-date-picker>
<el-date-picker v-model="scope.row.productDate" :value-format="'yyyy-MM-dd'"
type="date"></el-date-picker>
</template>
</el-table-column>
<el-table-column label="SAP过账状态" width="100" align="center" prop="sapstatus">
@ -673,32 +547,16 @@
</el-dialog>
<!--母工单---->
<!--人员选择弹窗-->
<ItemSelectUser
ref="itemSelectUser"
@onSelected="onSelectUser"
></ItemSelectUser>
<ItemSelectUser ref="itemSelectUser" @onSelected="onSelectUser"></ItemSelectUser>
<!--工单选择弹窗-->
<ItemSelectWorkOrder
ref="itemSelectWorkOrder"
@onSelected="onSelectWorkOrder"
></ItemSelectWorkOrder>
<ItemSelectWorkOrder ref="itemSelectWorkOrder" @onSelected="onSelectWorkOrder"></ItemSelectWorkOrder>
<!--线体选择弹窗-->
<ItemSelectEquip
ref="itemSelectEquip"
@onSelected="onSelectEquip"
></ItemSelectEquip>
<ItemSelectEquip ref="itemSelectEquip" @onSelected="onSelectEquip"></ItemSelectEquip>
<!--最新领料单选择弹窗-->
<ItemSelectMaterial
ref="itemSelectNewPrepare"
@onSelected="onSelectNewPrepare"
></ItemSelectMaterial>
<ItemSelectMaterial ref="itemSelectNewPrepare" @onSelected="onSelectNewPrepare"></ItemSelectMaterial>
<!--母工单---->
<!-- 打印预览弹出层 -->
<el-dialog
title="生产订单确认入库"
:visible.sync="printDialogVisible"
width="1300px"
>
<el-dialog title="生产订单确认入库" :visible.sync="printDialogVisible" width="1300px">
<div id="printFrom" class="my-print-box">
<el-form :ref="formRef" :model="form">
<!-- 表头-工单信息 -->
@ -724,7 +582,8 @@
<el-table v-if="refreshNewWorkerTable" v-loading="newWorkerLoading" class="my-print-table"
:data="printData.workTable" border style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column prop="workorderCodeSap" label="订单号" width="130" :formatter="orderCodeFormate"/>
<el-table-column prop="workorderCodeSap" label="订单号" width="130"
:formatter="orderCodeFormate" />
<!--<el-table-column prop="workorderCode" label="生产工单号" width="150"></el-table-column>-->
<el-table-column prop="productCode" label="物料编码" width="150" :formatter="productCodeFormate" />
<el-table-column prop="productName" label="物料名称" width="300"></el-table-column>
@ -756,7 +615,8 @@
</template>
<script>
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,getWarehouseList,
import {
listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList, getWarehouseList,
updateReportWork, reportSap, getBatchList, reportSapCancel,
getAllLevelReportList, deleteBomRowNow,
getReportSAPList, submitReportPS, submitReportPSSAP, getCKList,
@ -936,7 +796,9 @@ export default {
},
consumeList: [],
cwarehouseList: [],
tableIndex: 'tableIndex'
tableIndex: 'tableIndex',
//
pConsumeRowsall:[],
};
},
created() {
@ -1419,8 +1281,9 @@ export default {
newPConsumeRows.push(item)
}
})
this.pConsumeRowsall = newPConsumeRows
this.pConsumeRows = newPConsumeRows;
console.log('过滤后:', this.pConsumeRows);
console.log('过滤后:', this.pConsumeRows,this.pConsumeRows);
}
},
// all(zxl)
@ -1439,22 +1302,22 @@ export default {
this.sConsumeRows = selection;
},
submitConsume() {
this.loading = true;
// this.loading = true;
this.consumeRows = this.pConsumeRows;
console.log(this.consumeRows)
if (this.consumeRows == 0) {
this.$modal.msgError(`请选择要修改的物料数据!`);
this.loading = false;
return false;
}
submitConsumePS(this.consumeRows).then(response => {
this.$modal.msgSuccess("报工信息修改成功");
this.openConsume = false;
this.reset();
this.getList();
this.loading = false;
});
// submitConsumePS(this.consumeRows).then(response => {
// this.$modal.msgSuccess("");
// this.openConsume = false;
// this.reset();
// this.getList();
// this.loading = false;
// });
},
/** 导出按钮操作 */
handleExport() {
@ -1587,6 +1450,10 @@ export default {
},
//--
onSelectNewPrepare(obj, tableIndx) {
const _this = this
this.pConsumeRowsall = Array.from(new Set([...this.pConsumeRowsall, ...obj].map(JSON.stringify))).map(JSON.parse);
console.log(this.pConsumeRowsall,this.pConsumeRows,'111111')
debugger
let sr = this.selectRow[0]
for (let i = 0; i < obj.length; i++) {
if (this.pConsumeRows.length != 0) {
@ -1604,6 +1471,12 @@ export default {
parentOrder: sr.workorderCode
};
this.consumeList.push(row);
this.$nextTick(() => {
let dynamicRef = 'tableIndex' + tableIndx;
console.log(this.consumeList, row, this.pConsumeRows,'22222')
_this.$refs[dynamicRef][0].toggleRowSelection(row);
});
}
})
} else {
@ -1617,15 +1490,15 @@ export default {
parentOrder: sr.workorderCode
};
this.consumeList.push(row);
/**
//
this.$nextTick(() => {
let dynamicRef = 'tableIndex' + tableIndx;
console.log(dynamicRef)
this.$refs[dynamicRef].toggleRowSelection(row, true);
console.log(this.consumeList, row, this.pConsumeRows,'333333')
_this.$refs[dynamicRef][0].toggleRowSelection(row);
});
**/
}
}
},
@ -1643,25 +1516,31 @@ export default {
margin-bottom: 15px;
margin-left: 10px;
}
.center-text {
text-align: center;
}
.report-logo {
margin-top: 15px;
margin-left: 15px;
height: 38px;
}
.button-container {
text-align: right;
margin-top: 10px;
margin-right: 10px;
}
.my-print-table {
font-size: 20px;
}
.my-print-nav {
font-size: 19px;
}
.my-print-foot {
font-size: 19px;
}

Loading…
Cancel
Save