|
|
|
@ -149,15 +149,26 @@
|
|
|
|
|
>导出</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-col>
|
|
|
|
|
<el-col :span="1.5">
|
|
|
|
|
<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>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
|
|
|
|
</el-row>
|
|
|
|
@ -674,13 +685,77 @@
|
|
|
|
|
@onSelected="onSelectEquip"
|
|
|
|
|
></ItemSelectEquip>
|
|
|
|
|
<!--母工单--《《《《《《《《《《《《《《《-->
|
|
|
|
|
<!-- 打印预览弹出层 -->
|
|
|
|
|
<el-dialog
|
|
|
|
|
title="生产订单确认入库"
|
|
|
|
|
:visible.sync="printDialogVisible"
|
|
|
|
|
width="1300px"
|
|
|
|
|
>
|
|
|
|
|
<div id="printFrom" class="my-print-box">
|
|
|
|
|
<el-form :ref="formRef" :model="form">
|
|
|
|
|
<!-- 表头-工单信息 -->
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-col :span="7">
|
|
|
|
|
<img src="@/assets/logo/lanjv.png" class="report-logo"/>
|
|
|
|
|
</el-col>
|
|
|
|
|
<el-col :span="10" class="center-text">
|
|
|
|
|
<h1>生产订单确认入库单</h1>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row class="my-print-head">
|
|
|
|
|
<el-col :offset="10" :span="4"></el-col><!--中山榄菊日化实业有限公司-->
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 导航栏 -->
|
|
|
|
|
<el-row class="my-print-nav">
|
|
|
|
|
<el-col :span="4">工厂:{{ printData.factory }}</el-col>
|
|
|
|
|
<el-col :span="4">工作中心:{{ printData.workCenter }}</el-col>
|
|
|
|
|
<el-col :span="4">打印日期:{{ printData.printDate }}</el-col>
|
|
|
|
|
<el-col :span="4">页次: 1/ 1</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<!-- 主数据 -->
|
|
|
|
|
<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="100" :formatter="orderCodeFormate"/>
|
|
|
|
|
<el-table-column prop="workorderCode" label="生产工单号" width="130"></el-table-column>
|
|
|
|
|
<el-table-column prop="productCode" label="物料编码" width="120" :formatter="productCodeFormate"/>
|
|
|
|
|
<el-table-column prop="productName" label="物料名称" width="180"></el-table-column>
|
|
|
|
|
<el-table-column prop="unit" label="单位" width="50"></el-table-column>
|
|
|
|
|
<el-table-column prop="version" label="版本"></el-table-column>
|
|
|
|
|
<el-table-column prop="quantity" label="报工数量"></el-table-column>
|
|
|
|
|
<el-table-column prop="batch" label="批次" width="240"></el-table-column>
|
|
|
|
|
<el-table-column prop="quantityFeedback" label="批次数量" width="100"></el-table-column>
|
|
|
|
|
<el-table-column prop="voucher" label="凭证"></el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
<!-- 底部
|
|
|
|
|
<el-row class="my-print-foot">
|
|
|
|
|
<el-col :offset="1" :span="3">SAP-No:{{ printData.SAPNo }}</el-col>
|
|
|
|
|
<el-col :offset="1" :span="3">Z-PM-F-030-A.1</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row class="my-print-foot">
|
|
|
|
|
<el-col :offset="1" :span="3">制单人:{{ printData.manufacture }}</el-col>
|
|
|
|
|
<el-col :offset="1" :span="3">审核人:{{ printData.auditor }}</el-col>
|
|
|
|
|
</el-row>
|
|
|
|
|
-->
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button type="primary" @click="handlePrint(printData)">打 印</el-button>
|
|
|
|
|
</span>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import { listReportWork, getReportWork, delReportWork, addReportWork, getWorkcenterList,
|
|
|
|
|
updateReportWork,reportSap,getBatchList,reportSapCancel,
|
|
|
|
|
getReportList,getReportSAPList,submitReportPS,submitReportPSSAP,getCKList} from "@/api/mes/reportWork";
|
|
|
|
|
getReportList,getReportSAPList,submitReportPS,submitReportPSSAP,getCKList,
|
|
|
|
|
getPutInOrderList
|
|
|
|
|
} from "@/api/mes/reportWork";
|
|
|
|
|
import { getConsumeList,submitConsumePS,submitReportInfo,getBomList} from "@/api/mes/reportWorkConsume";
|
|
|
|
|
import ReportWorkConsume from "./reportWorkConsume.vue";
|
|
|
|
|
import ItemSelectUser from "./selectUser.vue";
|
|
|
|
@ -720,9 +795,9 @@ export default {
|
|
|
|
|
activeName0: 'first',
|
|
|
|
|
activeName: 'pOrder',
|
|
|
|
|
activeName2: 'pConsume',
|
|
|
|
|
selectedWarehouse:'0004',
|
|
|
|
|
warehouseList: [],
|
|
|
|
|
// SAPCD:"",
|
|
|
|
|
selectedWarehouse:'0004',
|
|
|
|
|
warehouseList: [],
|
|
|
|
|
// SAPCD:"",
|
|
|
|
|
reportRows:[],
|
|
|
|
|
pReportRows:[],
|
|
|
|
|
sReportRows:[],
|
|
|
|
@ -737,7 +812,7 @@ export default {
|
|
|
|
|
// 是否显示弹出层
|
|
|
|
|
open: false,
|
|
|
|
|
openReport: false,
|
|
|
|
|
openReportSAP: false,
|
|
|
|
|
openReportSAP: false,
|
|
|
|
|
openConsume: false,
|
|
|
|
|
consumeQueryParams:{
|
|
|
|
|
consumePageNum:1,
|
|
|
|
@ -776,7 +851,7 @@ export default {
|
|
|
|
|
attr2: null,
|
|
|
|
|
attr3: null,
|
|
|
|
|
attr4: null,
|
|
|
|
|
workorderCodeSap: null,
|
|
|
|
|
workorderCodeSap: null,
|
|
|
|
|
parentOrder:null,
|
|
|
|
|
uploadStatus:"0"
|
|
|
|
|
},
|
|
|
|
@ -796,6 +871,27 @@ export default {
|
|
|
|
|
],
|
|
|
|
|
teamList:[],
|
|
|
|
|
batchList:[],
|
|
|
|
|
printDialogVisible: false,
|
|
|
|
|
// 打印
|
|
|
|
|
formRef: 'form',
|
|
|
|
|
printData: {
|
|
|
|
|
printable: 'printFrom',
|
|
|
|
|
ignore: ['no-print'],
|
|
|
|
|
workCenter: "暂无数据",
|
|
|
|
|
SAPNo: null,
|
|
|
|
|
manufacture: null,
|
|
|
|
|
auditor: null,
|
|
|
|
|
printDate: null,
|
|
|
|
|
factory: null,
|
|
|
|
|
productDate: null,
|
|
|
|
|
workTable: [],
|
|
|
|
|
},
|
|
|
|
|
refreshNewWorkerTable: true,
|
|
|
|
|
//工单遮罩层
|
|
|
|
|
workerLoading: false,
|
|
|
|
|
newWorkerLoading: false,
|
|
|
|
|
//工单重新渲染表格
|
|
|
|
|
refreshWorkerTable: true,
|
|
|
|
|
// 表单校验
|
|
|
|
|
rules: {
|
|
|
|
|
workorderCode:[
|
|
|
|
@ -902,7 +998,7 @@ export default {
|
|
|
|
|
cancel() {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.openReport = false;
|
|
|
|
|
this.openReportSAP=false;
|
|
|
|
|
this.openReportSAP=false;
|
|
|
|
|
this.openConsume = false;
|
|
|
|
|
this.reset();
|
|
|
|
|
},
|
|
|
|
@ -1332,7 +1428,57 @@ export default {
|
|
|
|
|
this.open = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 打印预览-浏览器打印
|
|
|
|
|
handlePrint(params) {
|
|
|
|
|
printJS({
|
|
|
|
|
printable: params.printable, // 'printFrom', // 标签元素id
|
|
|
|
|
type: params.type || 'html',
|
|
|
|
|
maxWidth: 1500, // 最大宽度
|
|
|
|
|
font_size: "",// 设置字体大小
|
|
|
|
|
header: params.header, // '表单',
|
|
|
|
|
targetStyles: ['*'],
|
|
|
|
|
style: '@page {margin:0 10mm};', // 可选-打印时去掉眉页眉尾
|
|
|
|
|
ignoreElements: params.ignore || [], // ['no-print']
|
|
|
|
|
properties: params.properties || null
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
// 打印预览-点击打印预览按钮
|
|
|
|
|
showPrint() {
|
|
|
|
|
// 清楚缓存
|
|
|
|
|
this.printData.workCenter = "暂无数据";
|
|
|
|
|
this.printData.printDate = null;
|
|
|
|
|
this.printData.workTable = [];
|
|
|
|
|
this.printData.factory = null;
|
|
|
|
|
this.printData.productDate = null;
|
|
|
|
|
// 打开工单信息对话框
|
|
|
|
|
this.printDialogVisible = true;
|
|
|
|
|
this.printData.printDate = moment(new Date()).format('YYYY.MM.DD');
|
|
|
|
|
this.printData.manufacture = this.$store.state.user.name;
|
|
|
|
|
this.newWorkerLoading = true // 设置加载状态为true,表示正在加载
|
|
|
|
|
this.refreshNewWorkerTable = false // 先将refreshProTable设置为false,隐藏表格
|
|
|
|
|
getPutInOrderList(this.selectRow[0].workorderCode).then(response => {
|
|
|
|
|
this.printData.workTable = response.data;
|
|
|
|
|
this.printData.factory = response.data[0].factoryCode;
|
|
|
|
|
this.printData.workCenter = response.data[0].workshopName;
|
|
|
|
|
this.refreshNewWorkerTable = true // 立即将refreshProTable设置为true,显示表格
|
|
|
|
|
this.newWorkerLoading = false // 设置加载状态为false,表示加载完成
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
</script>
|
|
|
|
|
<style scoped>
|
|
|
|
|
.print-btn{
|
|
|
|
|
margin-bottom: 15px;
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
.center-text {
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.report-logo {
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
margin-left: 15px;
|
|
|
|
|
height: 38px;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|