Browse Source

分切订单

master
rui_li 4 years ago
parent
commit
8ffdd9a33a
  1. 14
      src/api/yieldReport/com_separate_roll_with_split.js
  2. 2
      src/api/yieldReport/com_split_order_report.js
  3. 493
      src/views/modules/yieldReport/com_separate_roll_with_split.vue
  4. 14
      src/views/modules/yieldReport/com_split_order_report.vue

14
src/api/yieldReport/com_separate_roll_with_split.js

@ -0,0 +1,14 @@
import { createAPI } from '@/utils/httpRequest.js'
// 获取当前的卷的上机材料的主料
export const refreshCurrentPageData = data => createAPI('scheduling/getSplitScheduleCreateRollPageData', 'POST', data)
//
export const refreshCurrentPageTable = data => createAPI('schedule/endTuningAndStartProduce', 'POST', data)

2
src/api/yieldReport/com_split_order_report.js

@ -31,7 +31,7 @@ export const getSfdcDefectByCon = data => createAPI('schedule/getSfdcDefectByCon
export const getSfdcRollByCon = data => createAPI('schedule/getSfdcRollByCon', 'POST', data)
// 获取当前页面的按钮
export const refreshWorkPlatformButtons = data => createAPI('schedule/refreshWorkPlatformButtons', 'POST', data)
export const refreshWorkPlatformButtons = data => createAPI('scheduling/refreshWorkPlatformButtonsWithSplit', 'POST', data)
// 获取当前页面的按钮

493
src/views/modules/yieldReport/com_separate_roll_with_split.vue

@ -0,0 +1,493 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="755px" style="height: 470px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 425px;"
label-width="80px">
<fieldset class="customer-fieldset" style="width: 730px;">
<el-row style="margin-left: 5px; margin-top: -5px;">
<el-col :span="4" >
<el-form-item :label="''">
<span slot="label" style="" @click="getBaseList(92)"><a herf="#">客户编码:</a></span>
<el-input v-model="pageData.customerId" @change="getCurrentPageData" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="4" >
<el-form-item :label="''">
<span slot="label" style="" @click="getBaseList(5)"><a herf="#">产品编码:</a></span>
<el-input v-model="pageData.fgPartNo" @change="getCurrentPageData" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item :label="'产品名称:'">
<el-input v-model="pageData.fgPartDesc" readonly="readonly" style="width: 200px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8" style="margin-top: 0px;">
<el-form-item :label="'参照名称'">
<el-input v-model="pageData.referName" readonly="readonly" style="width: 200px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-left: 5px;">
<el-col :span="4" style="margin-top: -5px;">
<el-form-item :label="'供应商编码:'">
<el-input v-model="pageData.supplierId" readonly="readonly" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="5" style="margin-top: -5px;">
<el-form-item :label="'供应商名称'">
<el-input v-model="pageData.supplierName" readonly="readonly" style="width: 125px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-top: -5px;">
<el-form-item :label="'每卷数量:'">
<el-input v-model="pageData.rollQty" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-top: -5px;">
<el-form-item :label="'卷数:'">
<el-input v-model="pageData.rollNums" style="width: 90px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-left: 10px; margin-top: -10px;">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
刷新</el-button>
</el-form-item>
</el-col>
<el-col :span="4" style="margin-top: -10px;">
<el-form-item class="customer-button">
<el-button type="primary" @click="checkCreateSeparateRoll" style="margin-left: 10px; margin-bottom: 5px;">
创建分卷</el-button>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<el-table height="300"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="sfdcMaterialList"
border
v-loading="dataListLoading"
style="width: 730px; margin-left: 0px; margin-top: 5px;">
<el-table-column
v-for="(item,index) in columnMaterialArray" :key="index"
:sortable="item.columnSortable"
:prop="item.columnProp"
:header-align="item.headerAlign"
:show-overflow-tooltip="item.showOverflowTooltip"
:align="item.align"
:fixed="item.fixed"
:width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<!--<el-input type="number" class="table-input" align="right" @blur="checkValidQty(scope.row)"-->
<el-input type="number" class="table-input" align="right" v-if="item.columnHidden"
v-model="scope.row[item.columnProp]"></el-input>
<span v-else>{{scope.row[item.columnProp]}}</span>
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
style="width: 100px; height: 80px"/></span>
</template>
</el-table-column>
</el-table>
</el-form>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
/*组件*/
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
/*js请求*/
import {
refreshCurrentPageData,
refreshCurrentPageTable,
} from '@/api/yieldReport/com_separate_roll_with_split.js';
export default {
name: "com_finish_roll",
data() {
return {
titleCon: '创建分卷',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
partDesc: '',
operatorId: '',
fgPartNo: '无',
fgPartDesc: '',
customerId: '无',
customerName: '',
referName: '',
supplierId: '*',
supplierName: '',
rollQty: 0,
rollNums: 1,
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
sfdcMaterialList: [],
columnMaterialArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5303MaterialReportDate',
tableId: "5303Material",
tableName: "派工单材料",
columnProp: "reportDate",
headerAlign: "center",
align: "center",
columnLabel: "报告时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialReportedBy',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "reportedBy",
headerAlign: "center",
align: "center",
columnLabel: "报告人",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialRmRollNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "rmRollNo",
headerAlign: "center",
align: "center",
columnLabel: "材料卷号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialPartNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "零部件编码",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialStartDate',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "startDate",
headerAlign: "center",
align: "center",
columnLabel: "开始使用时间",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialTransQty',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "transQty",
headerAlign: "center",
align: "right",
columnLabel: "数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialNetIssueQty',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "netIssueQty",
headerAlign: "center",
align: "right",
columnLabel: "本卷调机数量",
columnWidth: 100,
columnHidden: true,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialKeyRMFlag',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "keyRMFlag",
headerAlign: "center",
align: "center",
columnLabel: "是否主材",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialSAPBOMItemNo',
tableId: "5305Material",
tableName: "派工单材料",
columnProp: "sAPBOMItemNo",
headerAlign: "center",
align: "center",
columnLabel: "SAP BOM序号",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
dataListLoading: false,
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
/*初始化页面参数*/
init(scheduleData, operatorData) {
debugger;
//
this.pageData.partNo = scheduleData.partNo;
this.pageData.partDesc = scheduleData.partDesc;
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.customerId = '无';
this.pageData.customerName = '';
this.pageData.fgPartNo = '无';
this.pageData.fgPartDesc = '';
this.pageData.supplierId = '*';
this.pageData.supplierName = '';
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = '创建分卷';
//
this.refreshPageData();
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.getCurrentPageData();
//table
//this.getCurrentPageTable();
},
//
getCurrentPageData(){
refreshCurrentPageData(this.pageData).then(({data}) => {
//
this.pageData.customerId = data.pageMap.customerId;
this.pageData.customerName = data.pageMap.customerName;
this.pageData.fgPartNo = data.pageMap.fgPartNo;
this.pageData.fgPartDesc = data.pageMap.fgPartDesc;
this.pageData.referName = data.pageMap.referName;
this.pageData.supplierId = data.pageMap.supplierId;
this.pageData.supplierName = data.pageMap.supplierName;
});
},
//
getCurrentPageTable(){
refreshCurrentPageTable(this.pageData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo === 92){
this.pageData.customerId = val.ConfigurationTemplateID;
this.pageData.customerName = val.CustDesc;
}else if(this.tagNo == 5){
this.pageData.fgPartNo = val.PartNo;
this.pageData.fgPartDesc = val.PartDescSpec;
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 92){
strVal = this.pageData.customerId;
}else if(val === 5){
strVal = this.pageData.fgPartNo;
}
this.$refs.baseList.init(val, strVal)
})
},
//
checkCreateSeparateRoll(){
//
endTuningAndStartProduce(requestData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//dialog
this.$emit('closeDialog');
//
this.closeDialog();
}
});
},
/*检查数据是否有效*/
checkValidQty(row){
//
if(row.netIssueQty == ''){
this.$message.error('材料上本卷耗用数量不能为空!');
row.netIssueQty = 0;//
return false;
}
//
if(row.netIssueQty <= 0){
this.$message.error('材料上本卷耗用数量必须大于0!');
return false;
}
//
if(row.netIssueQty > row.transQty){
this.$message.error('材料上本卷耗用数量大于发料数量!');
row.netIssueQty = 0;//
return false;
}
},
/*添加定制的css类*/
customerCellClassName({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'customer-number-cell';
}
},
/*添加定制的cess样式*/
customerCellStyle({row, column, rowIndex, columnIndex}) {
if(column.property == 'netIssueQty'){
return 'padding: 0px 0px;';
}
}
},
created() {
//
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-css /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
/*table中input 修改样式*/
/deep/ div.table-input {
padding: 0px 0px;
height: 25px !important;
}
/*table中input*/
div.table-input /deep/ input.el-input__inner{
padding: 0px 0px;
height: 23px !important;
text-align: right;
}
</style>

14
src/views/modules/yieldReport/com_split_order_report.vue

@ -493,10 +493,10 @@
</comSwitchRoll>
<!-- 创建分卷的操作 -->
<comSeparateRoll ref="comSeparateRoll" :close-on-click-modal="false"
<comSeparateRollWithSplit ref="comSeparateRollWithSplit" :close-on-click-modal="false"
:visible.sync="showSeparateFlag" @refreshPageData="refreshPageData">
</comSeparateRoll>
</comSeparateRollWithSplit>
<!-- 结束卷的modal -->
<comFinishRoll ref="comFinishRoll" :close-on-click-modal="false"
@ -610,7 +610,7 @@ import {
/*引入组件*/
import comSwitchOperator from "./com_switch_operator";/*切换操作员*/
import comSwitchRoll from "./com_switch_roll";/*切换卷操作*/
import comSeparateRoll from "./com_separate_roll";
import comSeparateRollWithSplit from "./com_separate_roll_with_split";/*创建分卷的组件*/
import comFinishRoll from "./com_finish_roll";/*结束卷数的组件*/
import comFinishPartRoll from "./com_finish_part_roll";//
import comMergeRoll from "./com_merge_roll";/*合并卷的组件*/
@ -2868,7 +2868,7 @@ export default {
switchRollFlag: false,
separateRollFlag: false,
finishRollFlag: false,
mergeRollFlag: false,
mergeRollFlag: true,
tuningFlag: false,
produceFlag: false,
defectFlag: false,
@ -2884,7 +2884,7 @@ export default {
components: {
comSwitchOperator,/*切换用户的组件*/
comSwitchRoll,/*切换卷操作*/
comSeparateRoll,/*創建分卷组件*/
comSeparateRollWithSplit,/*創建分卷组件*/
comFinishRoll,/*结束卷的组件*/
comFinishPartRoll,/*产量报告的组件*/
comMergeRoll,/*合并卷组件*/
@ -3192,7 +3192,7 @@ export default {
this.buttonTags.finishScheduleFlag = true;
} else {
//
this.buttonTags.mergeRollFlag = false;
this.buttonTags.mergeRollFlag = true;
this.buttonTags.finishScheduleFlag = false;
this.buttonTags.otherBunFlag = false;
@ -3341,7 +3341,7 @@ export default {
// 76
this.$nextTick(() => {
this.showSeparateFlag = true;
this.$refs.comSeparateRoll.init(this.scheduleData, this.operatorData)
this.$refs.comSeparateRollWithSplit.init(this.scheduleData, this.operatorData)
});
},

Loading…
Cancel
Save