Browse Source

删除多余的代码

LIrui
DouDou 2 years ago
parent
commit
b8db207f0c
  1. 581
      src/views/modules/scheduleReport/com_end_tuning.vue
  2. 169
      src/views/modules/scheduleReport/com_exception_reason.vue
  3. 1316
      src/views/modules/scheduleReport/com_finish_part_roll.vue
  4. 1422
      src/views/modules/scheduleReport/com_finish_roll.vue
  5. 1534
      src/views/modules/scheduleReport/com_finish_schedule.vue
  6. 415
      src/views/modules/scheduleReport/com_malformed_material.vue
  7. 598
      src/views/modules/scheduleReport/com_merge_roll.vue
  8. 381
      src/views/modules/scheduleReport/com_produce_down.vue
  9. 377
      src/views/modules/scheduleReport/com_produce_key_material.vue
  10. 372
      src/views/modules/scheduleReport/com_produce_material.vue
  11. 4511
      src/views/modules/scheduleReport/com_produce_report_normal.vue
  12. 388
      src/views/modules/scheduleReport/com_produce_tool.vue
  13. 425
      src/views/modules/scheduleReport/com_replace_material.vue
  14. 560
      src/views/modules/scheduleReport/com_replace_tool.vue
  15. 358
      src/views/modules/scheduleReport/com_select_shift.vue
  16. 430
      src/views/modules/scheduleReport/com_separate_roll.vue
  17. 891
      src/views/modules/scheduleReport/com_separate_roll_with_split.vue
  18. 428
      src/views/modules/scheduleReport/com_show_transformed_roll.vue
  19. 1374
      src/views/modules/scheduleReport/com_split_order_finish_roll.vue
  20. 4167
      src/views/modules/scheduleReport/com_split_order_report.vue
  21. 324
      src/views/modules/scheduleReport/com_split_order_switch_roll.vue
  22. 311
      src/views/modules/scheduleReport/com_start_produce.vue
  23. 292
      src/views/modules/scheduleReport/com_start_tuning.vue
  24. 328
      src/views/modules/scheduleReport/com_switch_operator.vue
  25. 320
      src/views/modules/scheduleReport/com_switch_roll.vue
  26. 476
      src/views/modules/scheduleReport/com_transform_part.vue
  27. 1454
      src/views/modules/scheduleReport/not_over_finish_roll.vue
  28. 502
      src/views/modules/scheduleReport/order_transform_part.vue

581
src/views/modules/scheduleReport/com_end_tuning.vue

@ -1,581 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="900px" style="height: 415px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 265px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="3" >
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="3" style="margin-top: 27px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 100px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-button">
<el-button type="primary" @click="refreshPageData" style="margin-left: 10px; margin-bottom: 5px;">
{{buttons.refreshButton}}</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button @click="endTuningAndStartProduceOperation" type="primary" style="margin-left: 10px; margin-bottom: 5px;">
{{buttons.endTuningButton}}</el-button>
</el-form-item>
<el-form-item class="customer-button">
<el-button type="primary" @click="closeDialog" style="margin-left: 10px; margin-bottom: 5px;">
{{buttons.closeButton}}</el-button>
</el-form-item>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 830px;">
<legend>{{labels.primaryMaterial}}</legend>
<el-table height="180"
:cell-style="customerCellStyle" :cell-class-name="customerCellClassName"
:data="sfdcMaterialList"
border
v-loading="dataListLoading"
style="width: 100%; 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==''?false: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>
</fieldset>
</el-form>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {
getSfdcMaterialByRollNo,
endTuningAndStartProduce,
getSystemTimeData,
} from '@/api/yieldReport/com_end_tuning.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000010';
export default {
data() {
return {
titleCon: '',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
operatorId: '',
reportDate: '',
reportTime: '',
},
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,
buttons: {
refreshButton: '刷新',
endTuningButton: '结束调机',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '刷新',
objectId: 'refreshButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '结束调机',
objectId: 'endTuningButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '卷调机-卷材料结算',
currentTime: '当前时间:',
primaryMaterial: '主材料',
materialConsumedCantBeNull: '材料上本卷耗用数量不能为空!',
materialConsumedMustMoreTanZero: '材料耗用数量必须大于0!',
materialConsumedMoreTanDelivery: '材料耗用数量大于发料数量!',
},
labelsList: [
{
functionId: functionId,
languageValue: '卷调机-卷材料结算',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '主材料',
objectId: 'primaryMaterial',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料耗用数量大于发料数量!',
objectId: 'materialConsumedMoreTanDelivery',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品总数量必须大于等于0!',
objectId: 'approvedQtyMustMoreTanZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '该时间段内没有匹配的班次信息,请联系相关人员!',
objectId: 'noMatchShiftInfo',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
/*初始化页面参数*/
init(pageData, operatorData) {
//
this.pageData.orderNo = pageData.orderNo;
this.pageData.itemNo = pageData.itemNo;
this.pageData.seqNo = pageData.seqNo;
this.pageData.rollNo = pageData.rollNo;
this.pageData.operatorId = operatorData.operatorId;
//
//this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
//this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
this.getMultiLanguageList(); //
//
this.refreshSystemTime();
//
this.titleCon = this.labels.titleCon;
//
this.refreshPageData();
},
/*刷新服务器的时间*/
refreshSystemTime(){
getSystemTimeData().then(({data}) => {
//
if(data.code == 200){
//
this.pageData.reportDate = data.resultMap.sysDate;
this.pageData.reportTime = data.resultMap.sysTime;
}
});
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshSfdcMaterialTable();
},
//
refreshSfdcMaterialTable(){
getSfdcMaterialByRollNo(this.pageData).then(({data}) => {
this.sfdcMaterialList = data.rows;
});
},
//
endTuningAndStartProduceOperation(){
let requestData = {'pageData': JSON.stringify(this.pageData), 'materialList': JSON.stringify(this.sfdcMaterialList)};
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(this.labels.materialConsumedCantBeNull);
row.netIssueQty = 0;//
return false;
}
//
if(row.netIssueQty <= 0){
this.$message.error(this.labels.materialConsumedMustMoreTanZero);
return false;
}
//
if(row.netIssueQty > row.transQty){
this.$message.error(this.materialConsumedMoreTanDelivery);
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;';
}
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /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>

169
src/views/modules/scheduleReport/com_exception_reason.vue

@ -1,169 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="350px" style="height: 300px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="24" >
<el-form-item :label=labels.exceptionReason>
<el-input type="textarea" class="customer-textarea" ref="exceptionReason" v-model="pageData.exceptionReason" :rows="3" :cols="66"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="addExceptionReason">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000020';
export default {
data() {
return {
titleCon: '异常原因',
showDefault: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
exceptionReason: ''
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '异常原因',
exceptionReason: '异常原因:',
},
labelsList: [
{
functionId: functionId,
languageValue: '异常原因',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '异常原因:',
objectId: 'exceptionReason',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
/*初始化页面参数*/
init() {
//
this.pageData.exceptionReason = '';
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.exceptionReason.focus();
});
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*添加异常原因的数据*/
addExceptionReason(){
//
this.closeDialog();
//
this.$emit('initExceptionReason', this.pageData.exceptionReason);
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
}
}
</script>
<style scoped lang="scss">
</style>

1316
src/views/modules/scheduleReport/com_finish_part_roll.vue
File diff suppressed because it is too large
View File

1422
src/views/modules/scheduleReport/com_finish_roll.vue
File diff suppressed because it is too large
View File

1534
src/views/modules/scheduleReport/com_finish_schedule.vue
File diff suppressed because it is too large
View File

415
src/views/modules/scheduleReport/com_malformed_material.vue

@ -1,415 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="240px" style="height: 580px;" class="customer-dialog">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label='labels.rmRollNo'>
<el-input ref="scanRmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNo"
v-model="pageData.scanRmRollNo"
style="width: 120px">
</el-input>
</el-form-item>
</el-col>
<el-col style="margin-top: 20px" :span="8">
<el-button type="primary" @click="feedingMaterialRollFun">{{ buttons.confirmButton }}</el-button>
</el-col>
</el-row>
<el-row>
<el-col style="margin-top: -10px" :span="16">
<el-form-item :label=labels.bomItemNo>
<el-select v-model="pageData.bomItemNo" :disabled="selectFlag" style="width: 120px">
<el-option
v-for="(item, index) in bomList"
:key="index"
:label="item.itemNo"
:value="item.itemNo">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col style="margin-top: 10px" :span="8">
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</el-col>
</el-row>
<el-row>
<el-col style="margin-top: -10px" :span="24">
<el-form-item :label='labels.rollNoQty'>
<el-input v-model="pageData.rollQty" readonly
style="width: 120px;" class="customer-color">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col style="margin-top: -10px" :span="24">
<el-form-item :label='labels.depleteQty'>
<el-input v-model="pageData.qtyConsumed" type="number" min="0"
style="width: 120px">
</el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-dialog>
</div>
</template>
<script>
import {
getBomItemNosByPartNo,
feedingMaterialRoll,
scannerMaterial
} from "@/api/yieldReport/com_produce_material.js";
import {infoRollno} from "@/api/crollinfo/crollinfo.js";
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js";
var functionId = 'C10000013';
export default {
data() {
return {
titleCon: '异常下机-材料',
showDefault: false,
sfdcTimeList: [],
selectFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
timeArray: [],
bomList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
rollQty: '',
scanRmRollNo: '',/*扫描的时候用的*/
rmRollNo: '',
bomItemNo: '',
histSeqNo: -1,
operatorId: '',
closedFlag: 'N',
qtyConsumed: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '异常材料',
rmRollNo: '材料卷号:',
bomItemNo: 'BOM序号:',
rollNoQty: '卷数量',
depleteQty: '消耗数量',
pleaseScanEnter: '请扫码输入!',
materialRollCantBeNull: '材料卷号不能为空!',
pleaseScanMaterialRollNo: '请扫描材料卷号!',
pleaseSelectBomItemNo: '请选择BOM行号!',
pleaseQtyConsumed: '请正确输入消耗数量!',
pleaseQtyConsumed2: '消耗数量必须大于0,请重新输入!',
pleaseQtyConsumed3: '消耗数量不能大于卷数量,请重新输入!',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫码输入!',
objectId: 'pleaseScanEnter',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号不能为空!',
objectId: 'materialRollCantBeNull',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描材料卷号!',
objectId: 'pleaseScanMaterialRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请选择BOM行号!',
objectId: 'pleaseSelectBomItemNo',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData, selectSfdcRollData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = selectSfdcRollData.rollNo;
// this.pageData.rollQty = selectSfdcRollData.rollQty;
this.pageData.scanRmRollNo = '';
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = '';
this.pageData.histSeqNo = -1;
this.pageData.operatorId = operatorData.operatorId;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.scanRmRollNo.focus();
});
//
this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog() {
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*记录每一次录入字符串的时间*/
recordTime() {
//
if (this.pageData.scanRmRollNo.trim().length == 0) {
this.timeArray = [];
} else {
this.timeArray.push(new Date().getTime());
}
},
/*检查材料卷号的数据*/
checkRmRollNo() {
//100
let len = this.timeArray.length;
let timeDiff = this.timeArray[len - 1] - this.timeArray[0];
//
if (timeDiff > 1000) {
this.$message.error(this.labels.pleaseScanEnter);
}
//null
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == '') {
this.$message.error(this.labels.materialRollCantBeNull);
return false;
} else {
this.pageData.rmRollNo = this.pageData.scanRmRollNo.trim();
}
//
this.refreshSomItemNos();
//
infoRollno({site: this.pageData.site, rollno: this.pageData.scanRmRollNo}).then(({data}) => {
if (data.code == 0){
this.pageData.rollQty = data.cRollinfo.rollqty
}
})
},
/*获取BOM行号*/
refreshSomItemNos() {
getBomItemNosByPartNo(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
return false;
}
this.bomList = data.rows;
//
if (this.bomList.length == 1) {
//
this.selectFlag = true;
//
this.pageData.bomItemNo = data.rows[0].itemNo;
} else {
//
this.selectFlag = false;
}
});
},
/*保存材料上机的记录*/
feedingMaterialRollFun() {
//
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == '') {
this.$message.error(this.labels.pleaseScanMaterialRollNo)
return false;
}
//
if (this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === '') {
this.$message.error(this.labels.pleaseSelectBomItemNo)
return false;
}
//
if (!this.pageData.qtyConsumed) {
this.$message.error(this.labels.pleaseQtyConsumed)
return false;
}
if (this.pageData.qtyConsumed <= 0) {
this.$message.error(this.labels.pleaseQtyConsumed2)
return false;
}
if (this.pageData.qtyConsumed > this.pageData.rollQty) {
this.$message.error(this.labels.pleaseQtyConsumed3)
return false;
}
// rmRollNo
this.pageData.rmRollNo = this.pageData.scanRmRollNo;
//
this.pageData.scanRmRollNo = '';
let dto = {
site: this.$store.state.user.site,
orderNo: this.pageData.orderNo,
itemNo: this.pageData.itemNo,
seqNo: this.pageData.seqNo,
userId: this.$store.state.user.name,
rollNo: this.pageData.rollNo,
rmRollNo: this.pageData.rmRollNo,
bomItemNo: this.pageData.bomItemNo,
operatorId: this.pageData.operatorId,
qtyConsumed: this.pageData.qtyConsumed,
}
//
scannerMaterial(this.pageData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1;
this.bomList = [];
this.timeArray = [];
this.pageData.rollQty = '';
this.pageData.qtyConsumed = '';
this.closeDialog()
}
});
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
}
});
},
},
created() {
}
}
</script>
<style scoped lang="scss">
/*控制操作员的字体颜色*/
.customer-color /deep/ .el-input__inner {
color: red;
}
</style>

598
src/views/modules/scheduleReport/com_merge_roll.vue

@ -1,598 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="300px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 当前卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" :label=labels.currentRollNo>
<el-input v-model="pageData.rollNo" readonly style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" :label=labels.currentRollQty>
<el-input v-model="pageData.rollQty" @blur="checkValidQty" style="width: 80px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="customer-item" label="">
</el-form-item>
</el-col>
</el-row>
<!-- 新卷 -->
<el-row>
<el-col :span="10">
<el-form-item class="customer-item" :label=labels.newRollNo>
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 100px;"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-item" :label=labels.newRollQty>
<el-input v-model="pageData.newRollQty" @blur="checkValidQty" style="width: 80px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="customer-item" :label=labels.totalQty>
<el-input v-model="pageData.totalQty" readonly style="width: 60px;"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer" style="margin-top: -20px;">
<el-button type="primary" @click="warnMergeSfdcRollsConfirm">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
<!--打印卷标签-->
<com-roll-label ref="comRollLabel"></com-roll-label>
</div>
</template>
<script>
import {
getMergeRollPageData,
checkMergeSfdcRoll,/*校验是否合并卷*/
processMergeSfdcRoll,/*执行合并卷的操作*/
getSfdcFlowLabelData,/*执行打印的请求*/
} from "@/api/yieldReport/com_merge_roll.js";
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/yieldReport/print_roll_label.js";
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
/*引入组件*/
import comRollLabel from "../common/com-roll-label";/*打印卷标签*/
var functionId = 'C10000006';
export default {
data() {
return {
titleCon: '合并卷',
showDefault: false,
rollType: '',
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
rollQty: 0,
newRollNo: '',/*参与合并的新卷号*/
newRollQty: 0,/*参与合并的新卷号*/
reportTime: '',
reportedFlag: 'N',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
currentRollFlag: false
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
},{
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '合并卷',
currentRollNo: '当前卷号:',
currentRollQty: '当前卷数量:',
newRollNo: '新卷卷号:',
newRollQty: '新卷数量:',
totalQty: '总数量:',
pleaseEnterNewRoll: '请输入新卷数量!',
newRollMustMoreTanZero: '新卷数量必须是大于零的整数!',
sameRollCantBeMerge: '相同卷号无法合并!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '合并卷',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前卷号:',
objectId: 'currentRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前卷数量:',
objectId: 'currentRollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '新卷卷号:',
objectId: 'newRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '新卷数量:',
objectId: 'newRollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '总数量:',
objectId: 'totalQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入新卷数量!',
objectId: 'pleaseEnterNewRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '新卷数量必须是大于零的整数!',
objectId: 'newRollMustMoreTanZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '相同卷号无法合并!',
objectId: 'sameRollCantBeMerge',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components:{
comRollLabel,//
},
methods: {
//
init(scheduleData, operatorData,rollType) {
this.rollType = rollType?1:0
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
this.pageData.reportTime = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
//
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.newRollNo = '';
this.pageData.newRollQty = 0;
this.pageData.totalQty = 0;
//
this.getMultiLanguageList(); //
//
this.refreshPageData();
//
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
this.titleCon = this.labels.titleCon;//
},
/*刷新页面的参数*/
refreshPageData() {
getMergeRollPageData(this.pageData).then(({data}) => {
//
if(data.code == 200){
this.pageData.rollQty = data.row.resultQty;//
this.pageData.totalQty = data.row.resultQty;//
}else{
this.pageData.rollQty = 0;//
this.pageData.totalQty = 0;//
}
});
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检验良品的总数量*/
checkValidQty() {
//
let rollQty = parseInt(this.pageData.rollQty);
if (rollQty == null || rollQty == '') {
//this.$message.error('!');
this.pageData.rollQty = 0;//
}
//
if (rollQty <= 0) {
//this.$message.error('!');
this.pageData.rollQty = 0;//
}else{
this.pageData.rollQty = rollQty;
}
//
let newRollQty = parseInt(this.pageData.newRollQty);
if (newRollQty == null || newRollQty == '') {
//this.$message.error('!');
this.pageData.newRollQty = 0;//
}
if (newRollQty <= 0) {
//this.$message.error('!');
this.pageData.newRollQty = 0;//
}else{
this.pageData.newRollQty = newRollQty;
}
//
this.pageData.totalQty = newRollQty + rollQty;
},
/*执行是否需要提示的操作*/
warnMergeSfdcRollsConfirm() {
//
let newRollQty = this.pageData.newRollQty;
if (newRollQty == null || newRollQty == '') {
this.$message.error('请输入新卷数量!');
this.pageData.newRollQty = 0;//
return false;
}
if (newRollQty <= 0 || !Number.isInteger(newRollQty)) {
this.$message.error('新卷数量必须是大于零的整数!');
this.pageData.newRollQty = 0;//
return false;
}
//
if (this.pageData.rollNo === this.pageData.newRollNo) {
this.$message.error('相同卷号无法合并!');
this.pageData.newRollNo = '';
return false;
}
let requestData = {
'site': this.pageData.site,
'orderNo': this.pageData.orderNo,
'itemNo': this.pageData.itemNo,
'seqNo': this.pageData.seqNo,
'rollNo': this.pageData.rollNo,
'rollQty': this.pageData.rollQty,
'newRollNo': this.pageData.newRollNo,
'newRollQty': this.pageData.newRollQty,
'username': this.pageData.username,
'operatorId': this.pageData.operatorId,
parkFlag: this.rollType==1?'Y':'N' ,
'newRollFlag': false
};
//
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
requestData.newRollFlag = true;
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
if(this.rollType == 1 ){
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
}else {
//
let printRow = {site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo};
this.printSfdcFlowLabel(printRow);
}
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
});
} else {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
if(this.rollType == 1 ){
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
}else {
//
let printRow = {site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo};
this.printSfdcFlowLabel(printRow);
}
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
}
});
});
//
} else {
//
requestData.newRollFlag = true;
checkMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == 300) {
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: "warning"
}).then(() => {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
if(this.rollType == 1 ){
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
}else {
//
let printRow = {site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo};
this.printSfdcFlowLabel(printRow);
}
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
});
} else {
//
processMergeSfdcRoll(requestData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
if(this.rollType == 1 ){
//
this.$nextTick(() => {
this.$refs.comRollLabel.init(data.rollNo)
});
}else {
//
let printRow = {site: this.pageData.site, orderNo: this.pageData.orderNo,
rollNo: data.rollNo};
this.printSfdcFlowLabel(printRow);
}
// --
setTimeout(() => {
this.closeDialog();
}, 1000);
}
});
}
});
}
});
},
/*打印流转标签*/
printSfdcFlowLabel(sfdcRow){
//
getSfdcFlowLabelData(sfdcRow).then(({data}) => {
//
if(data.code === 200){
let printList = data.printList;
printSfdcLabel(printList);
}else{
this.$message.error(data.msg);
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

381
src/views/modules/scheduleReport/com_produce_down.vue

@ -1,381 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="450px" style="height: 680px;" class="customer-dialog">
<el-container>
<el-container style="height: 120px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 停机时间和时长 -->
<el-row style="margin-top: -10px;">
<el-col :span="8" >
<el-form-item :label="'开始时间:'">
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="margin-top: 27px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 80px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
<el-col :span="8" >
<el-form-item :label="'时长:'">
<el-input ref="totalTime" type="number" v-model="pageData.totalTime" style="width: 120px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="8">
<el-form-item>
<span slot="label" style="" @click="getBaseList(90)"><a herf="#">停机代码:</a></span>
<el-input @keyup.enter.native="getDownTimeDesc" @blur="getDownTimeDesc" @click="getDownTimeDesc" v-model="pageData.downTimeCode" style="width: 100px"></el-input>
</el-form-item>
</el-col>
<el-col :span="16">
<el-form-item :label="'停机描述:'">
<el-input :readonly="true" v-model="pageData.downTimeDesc" style="width: 180px"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<el-container style="margin-left: 50px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 不良代码 和日期 -->
<el-row style="margin-top: 0px;">
<el-col>
<el-form-item style="margin-top: 15px;">
<el-button @click="reportDownTimeFun" type="primary"
style="margin-left: -10px; margin-bottom: 5px;">
插入</el-button>
</el-form-item>
</el-col>
</el-row>
<el-row style="margin-top: 15px;">
<el-col>
<el-form-item style="margin-top: 15px;">
<el-button type="primary" @click="closeDialog"
style="margin-left: -10px; margin-bottom: 10px;">
关闭</el-button>
</el-form-item>
</el-col>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</el-row>
</el-form>
</el-container>
</el-container>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
checkDownTimeCode,
reportDownTime,
}from '@/api/yieldReport/com_produce_down.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000014';
export default {
data() {
return {
titleCon: '报告停机',
showDefault: false,
sfdcTimeList: [],
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
operatorId: '',
reportDate: '',
reportTime: '',
totalTime: 0,
downTimeCode: '',
downTimeDesc: '',
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttonTags:{
createRollFlag: true
},
dataListLoading: false,
buttons: {
insertButton: '插入',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '插入',
objectId: 'insertButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '报告停机',
startTime: '开始时间:',
downTimes: '时长:',
downTimeCode: '停机代码:',
downTimeDesc: '停机描述:',
},
labelsList: [
{
functionId: functionId,
languageValue: '报告停机',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始时间:',
objectId: 'startTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长:',
objectId: 'downTimes',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机代码:',
objectId: 'downTimeCode',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机描述:',
objectId: 'downTimeDesc',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
this.getMultiLanguageList(); //
////this.getMultiLanguageList();//
//
this.pageData.totalTime = 0;
this.pageData.downTimeCode = '';
this.pageData.downTimeDesc = '';
//
this.$nextTick(() => {
this.$refs.totalTime.focus();
});
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检查停机代码*/
getDownTimeDesc(){
checkDownTimeCode(this.pageData).then(({data}) => {
//
if(data.code == 500){
//this.$message.error(data.msg);
this.pageData.downTimeDesc = '';
}else{
let resultMap = data.resultMap;
this.pageData.downTimeDesc = resultMap.downTimeDesc;
}
})
},
/*报告停机代码*/
reportDownTimeFun(){
reportDownTime(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.success(data.msg);
//
this.closeDialog();
}
});
},
/*列表方法的回调*/
getBaseData(val){
if (this.tagNo === 90){
this.pageData.downTimeCode = val.ReasonCode;
this.pageData.downTimeDesc = val.ReasonDescription;
}
},
//
getBaseList(val){
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 90){
strVal = this.pageData.downTimeCode;
}
this.$refs.baseList.init(val, strVal)
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
this.getMultiLanguageList()
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
/*监听器*/
watch:{
pageData: {
deep: true,
handler: function (newV, oldV) {
this.pageData.downTimeCode = this.pageData.downTimeCode.toUpperCase();
}
}
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

377
src/views/modules/scheduleReport/com_produce_key_material.vue

@ -1,377 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="200px" style="height: 580px;" class="customer-dialog">
<el-container style="height: 105px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label=labels.rmRollNo>
<el-input ref="scanRmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNo"
v-model="pageData.scanRmRollNo"
style="width: 120px">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label=labels.bomItemNo>
<el-select v-model="pageData.bomItemNo" :disabled="selectFlag" style="width: 120px">
<el-option
v-for="(item, index) in bomList"
:key="index"
:label="item.itemNo"
:value="item.itemNo">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="feedingMaterialRollFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getBomItemNosByPartNo,
getBomItemNosByKeyPartNo,
feedingMaterialRoll,
feedingKeyMaterialRoll
} from "@/api/yieldReport/com_produce_material.js";
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000013';
export default {
data() {
return {
titleCon: '材料',
showDefault: false,
sfdcTimeList: [],
selectFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
timeArray: [],
bomList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
scanRmRollNo: '',/*扫描的时候用的*/
rmRollNo: '',
bomItemNo: '',
histSeqNo: -1,
operatorId: '',
closedFlag: 'N'
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '材料',
rmRollNo: '材料卷号:',
bomItemNo: 'BOM序号:',
pleaseScanEnter: '请扫码输入!',
materialRollCantBeNull: '材料卷号不能为空!',
pleaseScanMaterialRollNo: '请扫描材料卷号!',
pleaseSelectBomItemNo: '请选择BOM行号!',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫码输入!',
objectId: 'pleaseScanEnter',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号不能为空!',
objectId: 'materialRollCantBeNull',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描材料卷号!',
objectId: 'pleaseScanMaterialRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请选择BOM行号!',
objectId: 'pleaseSelectBomItemNo',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.scanRmRollNo = '';
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = '';
this.pageData.histSeqNo = -1;
this.pageData.operatorId = operatorData.operatorId;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.scanRmRollNo.focus();
});
//
this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog() {
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*记录每一次录入字符串的时间*/
recordTime() {
//
if (this.pageData.scanRmRollNo.trim().length == 0) {
this.timeArray = [];
} else {
this.timeArray.push(new Date().getTime());
}
},
/*检查材料卷号的数据*/
checkRmRollNo() {
//100
let len = this.timeArray.length;
let timeDiff = this.timeArray[len - 1] - this.timeArray[0];
//
if (timeDiff > 1000) {
this.$message.error(this.labels.pleaseScanEnter);
}
//null
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == '') {
this.$message.error(this.labels.materialRollCantBeNull);
return false;
} else {
this.pageData.rmRollNo = this.pageData.scanRmRollNo.trim();
}
//
this.refreshSomItemNos();
},
/*获取BOM行号*/
refreshSomItemNos() {
getBomItemNosByKeyPartNo(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
return false;
}
this.bomList = data.rows;
//
if (this.bomList.length == 1) {
//
this.selectFlag = true;
//
this.pageData.bomItemNo = data.rows[0].itemNo;
} else {
//
this.selectFlag = false;
}
});
},
/*保存材料上机的记录*/
feedingMaterialRollFun() {
//
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == '') {
this.$message.error(this.labels.pleaseScanMaterialRollNo)
return false;
}
//
if (this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === '') {
this.$message.error(this.labels.pleaseSelectBomItemNo)
return false;
}
// rmRollNo
this.pageData.rmRollNo = this.pageData.scanRmRollNo;
//
this.pageData.scanRmRollNo = '';
//
feedingKeyMaterialRoll(this.pageData).then(({data}) => {
if (data.code == 500) {
this.$message.error(data.msg);
} else {
this.$message.success(data.msg);
//
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1;
this.bomList = [];
this.timeArray = [];
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

372
src/views/modules/scheduleReport/com_produce_material.vue

@ -1,372 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="200px" style="height: 580px;" class="customer-dialog">
<el-container style="height: 105px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label=labels.rmRollNo>
<el-input ref="scanRmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNo"
v-model="pageData.scanRmRollNo"
style="width: 120px">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label=labels.bomItemNo>
<el-select v-model="pageData.bomItemNo" :disabled="selectFlag" style="width: 120px">
<el-option
v-for="(item, index) in bomList"
:key="index"
:label="item.itemNo"
:value="item.itemNo">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="feedingMaterialRollFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getBomItemNosByPartNo,
feedingMaterialRoll,
} from "@/api/yieldReport/com_produce_material.js";
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000013';
export default {
data() {
return {
titleCon: '材料',
showDefault: false,
sfdcTimeList: [],
selectFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
timeArray: [],
bomList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
scanRmRollNo: '',/*扫描的时候用的*/
rmRollNo: '',
bomItemNo: '',
histSeqNo: -1,
operatorId: '',
closedFlag: 'N'
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '材料',
rmRollNo: '材料卷号:',
bomItemNo: 'BOM序号:',
pleaseScanEnter: '请扫码输入!',
materialRollCantBeNull: '材料卷号不能为空!',
pleaseScanMaterialRollNo: '请扫描材料卷号!',
pleaseSelectBomItemNo: '请选择BOM行号!',
},
labelsList: [
{
functionId: functionId,
languageValue: '材料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫码输入!',
objectId: 'pleaseScanEnter',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号不能为空!',
objectId: 'materialRollCantBeNull',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描材料卷号!',
objectId: 'pleaseScanMaterialRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请选择BOM行号!',
objectId: 'pleaseSelectBomItemNo',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.rollNo = scheduleData.rollNo;
this.pageData.scanRmRollNo = '';
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = '';
this.pageData.histSeqNo = -1;
this.pageData.operatorId = operatorData.operatorId;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.scanRmRollNo.focus();
});
//
this.timeArray = [];
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*记录每一次录入字符串的时间*/
recordTime(){
//
if(this.pageData.scanRmRollNo.trim().length == 0){
this.timeArray = [];
}else{
this.timeArray.push(new Date().getTime());
}
},
/*检查材料卷号的数据*/
checkRmRollNo() {
//100
let len = this.timeArray.length;
let timeDiff = this.timeArray[len - 1] - this.timeArray[0];
//
if(timeDiff > 1000){
this.$message.error(this.labels.pleaseScanEnter);
}
//null
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == '') {
this.$message.error(this.labels.materialRollCantBeNull);
return false;
}else{
this.pageData.rmRollNo = this.pageData.scanRmRollNo.trim();
}
//
this.refreshSomItemNos();
},
/*获取BOM行号*/
refreshSomItemNos(){
getBomItemNosByPartNo(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
return false;
}
this.bomList = data.rows;
//
if(this.bomList.length == 1){
//
this.selectFlag = true;
//
this.pageData.bomItemNo = data.rows[0].itemNo;
}else{
//
this.selectFlag = false;
}
});
},
/*保存材料上机的记录*/
feedingMaterialRollFun(){
//
if (this.pageData.scanRmRollNo == null || this.pageData.scanRmRollNo == ''){
this.$message.error(this.labels.pleaseScanMaterialRollNo)
return false;
}
//
if(this.pageData.bomItemNo == '请选择' || this.pageData.bomItemNo === ''){
this.$message.error(this.labels.pleaseSelectBomItemNo)
return false;
}
// rmRollNo
this.pageData.rmRollNo = this.pageData.scanRmRollNo;
//
this.pageData.scanRmRollNo = '';
//
feedingMaterialRoll(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.success(data.msg);
//
this.pageData.rmRollNo = '';
this.pageData.bomItemNo = -1;
this.bomList = [];
this.timeArray = [];
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

4511
src/views/modules/scheduleReport/com_produce_report_normal.vue
File diff suppressed because it is too large
View File

388
src/views/modules/scheduleReport/com_produce_tool.vue

@ -1,388 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="305px" style="height: 680px;" class="customer-dialog">
<el-container style="height: 225px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 扫描工具实例编码 -->
<el-row>
<el-col :span="12">
<el-form-item :label=labels.toolInstanceId>
<el-input ref="toolInstanceId" v-model="pageData.toolInstanceId"
@keyup.enter.native="checkToolInstanceIdFun" style="width: 120px"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 换刀模 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 280px;">
<legend>{{labels.replaceToolTitle}}</legend>
<el-row>
<el-col :span="16">
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" true-label="Y" false-label="N"
v-model="pageData.replaceFlag">{{labels.replaceTool}}</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.oriToolInstanceId>
<el-input v-model="pageData.oriToolInstanceId" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.currentRollProdQty>
<el-input v-model="pageData.consumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.oriRollProdQty>
<el-input v-model="pageData.oriConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.totalRollProdQty>
<el-input v-model="pageData.totalConsumeQty" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addToolInstanceIdFun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
checkToolInstanceId,
addToolInstanceId,
}
from '@/api/yieldReport/com_produce_tool.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000012';
export default {
data() {
return {
titleCon: '刀模板',
showDefault: false,
readonlyFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
operatorId: '',
toolInstanceId: '',
oriToolInstanceId: '',
consumeQty: 0,
oriConsumeQty: 0,
totalConsumeQty: 0,
checkFlag: false,
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '刀模板',
toolInstanceId: '工具实例编号:',
replaceToolTitle: '换刀模',
replaceTool: '换刀模',
oriToolInstanceId: '原工具实例编码:',
currentRollProdQty: '本卷生产数量:',
oriRollProdQty: '之前卷生产数量:',
totalRollProdQty: '累积生产数量:',
pleaseScanToolInstanceId: '请扫描工具实例!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '刀模板',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换刀模',
objectId: 'replaceToolTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换刀模',
objectId: 'replaceTool',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '原工具实例编码:',
objectId: 'oriToolInstanceId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '本卷生产数量:',
objectId: 'currentRollProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '之前卷生产数量:',
objectId: 'oriRollProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '累积生产数量:',
objectId: 'totalRollProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描工具实例!',
objectId: 'pleaseScanToolInstanceId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData, histSeqNo) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.$nextTick(() => {
this.$refs.toolInstanceId.focus();
});
//
this.pageData.toolInstanceId = '';
this.pageData.oriToolInstanceId = '';
if(histSeqNo > 0){
this.pageData.consumeQty = 0;
this.pageData.oriConsumeQty = 0;
this.pageData.totalConsumeQty = 0;
this.readonlyFlag = false;
this.replaceFlag = true;
}else{
this.pageData.consumeQty = '';
this.pageData.oriConsumeQty = '';
this.pageData.totalConsumeQty = '';
this.readonlyFlag = true;
this.replaceFlag = false;
}
//
this.getMultiLanguageList(); //
//
this.pageData.checkFlag = false;
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检查新的工具实例信息*/
checkToolInstanceIdFun(){
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){
this.$message.error(this.labels.pleaseScanToolInstanceId);
return false;
}
checkToolInstanceId(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == 201){
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: this.labels.confirmLabel,
cancelButtonText: this.labels.cancelLabel,
type: "warning"
}).then(() => {
this.pageData.checkFlag = true;
}).catch(() => {
this.pageData.checkFlag = false;
});
}else{
this.pageData.checkFlag = true;
}
});
},
/*添加刀模记录*/
addToolInstanceIdFun(){
/*添加工具的实例*/
addToolInstanceId(this.pageData).then(({data}) => {
if(data.code == 500){
this.$message.error(data.msg);
}else{
//
this.pageData.toolInstanceId = '';
this.pageData.oriToolInstanceId = '';
this.pageData.consumeQty = '';
this.pageData.oriConsumeQty = '';
this.pageData.totalConsumeQty = '';
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

425
src/views/modules/scheduleReport/com_replace_material.vue

@ -1,425 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="405px" style="height: 310px;" class="customer-dialog">
<el-container style="height: 135px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 换材料 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 165px;">
<legend>{{labels.replaceTitle}}</legend>
<!-- 材料卷号 序号 -->
<!-- 材料卷号和BOM序号 -->
<el-row>
<el-col :span="16">
<el-form-item :label=labels.rmRollNo>
<el-input ref="rmRollNo" @keyup.native="recordTime"
@keyup.enter.native="checkRmRollNoBun"
v-model="pageData.rmRollNo"
style="width: 120px">
</el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="16">
<el-form-item :label=labels.bomItemNo>
<el-input v-model="pageData.bomItemNo" readonly style="width: 120px"></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
<!-- 停机信息 -->
<el-container style="margin-left: 170px; margin-top: -120px;">
<fieldset class="customer-fieldset" style="width: 210px;">
<legend>{{ labels.downTimeTitle }}</legend>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.startTime>
<el-date-picker v-model="pageData.reportDate" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" style="width: 100px;"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" label=" ">
<el-time-picker v-model="pageData.reportTime" format="HH:mm:ss"
value-format="HH:mm:ss" style="width: 80px;"></el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.downTimes>
<el-input v-model="pageData.downTimeQty" @blur="changeTimeQty"type="number" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="connectMaterialRollBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
checkConnectMaterialRoll,
connectMaterialRoll,
}
from '@/api/yieldReport/com_replace_material.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000018';
export default {
data() {
return {
titleCon: '换料',
showDefault: false,
timeArray: [],
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
operatorId: '',
histSeqNo: 0,
bomItemNo: -1,
rmRollNo: '',
oriRmRollNo: '',
reportDate: '',
reportTime: '',
downTimeQty: 0,
consumeQty: 0,
oriConsumeQty: 0,
totalConsumeQty: 0,
checkFlag: false,
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
oriMaterialData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
seqNo: '',
histSeqNo: '',
rmRollNo: '',
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '换料',
replaceTitle: '换材料',
rmRollNo: '材料卷号:',
bomItemNo: 'BOM序号:',
downTimeTitle: '停机',
startTime: '开始时间:',
downTimes: '时长:',
downTimesMustMoreThanZero: '时长必须大于0!',
materialRollCantBeNull: '材料卷号不能为空!',
},
labelsList: [
{
functionId: functionId,
languageValue: '换料',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换材料',
objectId: 'replaceTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号:',
objectId: 'rmRollNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: 'BOM序号:',
objectId: 'bomItemNo',
objectType: 'label',
tableId: '*'
},
{
functionId: functionId,
languageValue: '停机',
objectId: 'downTimeTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始时间:',
objectId: 'startTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长:',
objectId: 'downTimes',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长必须大于0!',
objectId: 'durationMustMoreThanZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '材料卷号不能为空!',
objectId: 'materialRollCantBeNull',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData, oriMaterialData) {
//
this.scheduleData = scheduleData;
this.oriMaterialData = oriMaterialData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.histSeqNo = oriMaterialData.histSeqNo;
this.pageData.oriRmRollNo = oriMaterialData.rmRollNo;
this.pageData.bomItemNo = oriMaterialData.sAPBOMItemNo;
//
this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
this.pageData.downTimeQty = 0;
this.pageData.rmRollNo = '';
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.rmRollNo.focus();
});
//
this.pageData.checkFlag = false;
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*记录每一次录入字符串的时间*/
recordTime(){
//
if(this.pageData.rmRollNo.trim().length === 0){
this.timeArray = [];
}else{
this.timeArray.push(new Date().getTime());
}
},
/*验证时长的参数*/
changeTimeQty(){
let downTimeQty = this.pageData.downTimeQty;
if(downTimeQty <= 0){
this.$message.error(this.labels.downTimesMustMoreThanZero);
return false;
}
},
/*检查材料卷号的数据*/
checkRmRollNoBun() {
//100
let len = this.timeArray.length;
let timeDiff = this.timeArray[len - 1] - this.timeArray[0];
//
if(timeDiff > 1000){
// this.$message.error('!');
//return false;
}
//null
if (this.pageData.rmRollNo == null || this.pageData.rmRollNo === '') {
this.$message.error(this.labels.materialRollCantBeNull);
return false;
}else{
this.pageData.rmRollNo = this.pageData.rmRollNo.trim();
}
//()
this.checkConnectRmRollNoOperation();
},
/*检查新的工具实例信息*/
checkConnectRmRollNoOperation(){
/*调用检查的方法检验下*/
checkConnectMaterialRoll(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.pageData.checkFlag = true;
}
});
},
/*接料操作*/
connectMaterialRollBun(){
let downTimeQty = this.pageData.downTimeQty;
if(downTimeQty <= 0){
this.$message.error(this.labels.downTimesMustMoreThanZero);
return false;
}
connectMaterialRoll(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//
this.$message.success(data.msg);
//
this.closeDialog();
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

560
src/views/modules/scheduleReport/com_replace_tool.vue

@ -1,560 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="465px" style="height: 680px;" class="customer-dialog">
<el-container style="height: 225px;">
<el-form :inline="true" label-position="top" label-width="80px">
<!-- 扫描工具实例编码 -->
<el-row>
<el-col :span="12">
<el-form-item :label=labels.toolInstanceId>
<el-input ref="toolInstanceId" v-model="pageData.toolInstanceId"
@keyup.enter.native="checkConnectToolInstanceIdBun" style="width: 120px"></el-input>
</el-form-item>
</el-col>
</el-row>
<!-- 换刀模 -->
<el-container>
<fieldset class="customer-fieldset" style="width: 230px;">
<legend>{{labels.replaceToolTitle}}</legend>
<el-row>
<el-col :span="16">
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" true-label="Y" false-label="N"
v-model="pageData.replaceFlag">{{labels.replaceTool}}</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.oriToolInstanceId>
<el-input v-model="pageData.oriToolInstanceId" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.currentProdQty>
<el-input v-model="pageData.consumeQty" type="number" @blur="changeToolQty" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.oriProdQty>
<el-input v-model="pageData.oriConsumeQty" type="number" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.totalProdQty>
<el-input v-model="pageData.totalConsumeQty" type="number" :readonly="readonlyFlag" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
<!-- 停机信息 -->
<el-container style="margin-left: 235px; margin-top: -144px;">
<fieldset class="customer-fieldset" style="width: 210px;">
<legend>{{ labels.downTimeTitle }}</legend>
<el-row>
<el-col :span="16">
<el-form-item class="customer-item">
<el-checkbox disabled="disabled" true-label="Y" false-label="N"
v-model="pageData.downTimeFlag">{{ labels.downTime }}</el-checkbox>
</el-form-item>
</el-col>
</el-row>
<!-- 原工具信息 -->
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.startTime>
<el-date-picker v-model="pageData.reportDate" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" style="width: 100px;"></el-date-picker>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item class="customer-item" label=" ">
<el-time-picker v-model="pageData.reportTime" format="HH:mm:ss"
value-format="HH:mm:ss" style="width: 80px;"></el-time-picker>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item class="customer-item" :label=labels.downTimes>
<el-input v-model="pageData.downTimeQty" @blur="changeTimeQty"type="number" style="width: 100px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</fieldset>
</el-container>
</el-form>
</el-container>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="connectToolInstanceIdBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{buttons.closeButton}}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
countToolUsedQty,
checkConnectToolInstanceId,
connectToolInstanceId,
} from '@/api/yieldReport/com_replace_tool.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000019';
export default {
data() {
return {
titleCon: '刀模替换',
showDefault: false,
readonlyFlag: true,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
operatorId: '',
operatorName: '',
histSeqNo: 0,
toolInstanceId: '',
oriToolInstanceId: '',
replaceFlag: 'Y',
reportDate: '',
reportTime: '',
downTimeFlag: 'Y',
downTimeQty: 0,
consumeQty: 0,
oriConsumeQty: 0,
totalConsumeQty: 0,
checkFlag: false,
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
oriToolData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
seqNo: '',
toolInstanceId: ''
},
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '刀模替换',
toolInstanceId: '工具实例编码:',
replaceToolTitle: '换刀模',
replaceTool: '换刀模',
oriToolInstanceId: '原工具实例编码:',
currentProdQty: '本卷生产数量:',
oriProdQty: '之前卷以生产数量:',
totalProdQty: '累计生产数量:',
downTimeTitle: '停机',
downTime: '停机',
startTime: '开始时间:',
downTimes: '时长:',
pleaseScanToolInstanceId: '请扫描工具实例!',
currentRollProdQtyCantLessZero: '本卷生产数量不能小于0!:',
downTimesMustMoreThanZero: '时长必须大于0!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '刀模替换',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '工具实例编码:',
objectId: 'toolInstanceId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换刀模',
objectId: 'replaceToolTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '换刀模',
objectId: 'replaceTool',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '原工具实例编码:',
objectId: 'oriToolInstanceId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '本卷生产数量:',
objectId: 'currentProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '之前卷以生产数量:',
objectId: 'oriProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '累计生产数量:',
objectId: 'totalProdQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机',
objectId: 'downTimeTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '停机',
objectId: 'downTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '开始时间:',
objectId: 'startTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长:',
objectId: 'downTimes',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请扫描工具实例!',
objectId: 'pleaseScanToolInstanceId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '本卷生产数量不能小于0!',
objectId: 'currentRollProdQtyCantLessZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '时长必须大于0!',
objectId: 'downTimesMustMoreThanZero',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData, oriToolData) {
//
this.scheduleData = scheduleData;
this.oriToolData = oriToolData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
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.operatorName = operatorData.operatorName;
this.pageData.histSeqNo = oriToolData.histSeqNo;
this.pageData.oriToolInstanceId = oriToolData.toolInstanceId;
//
this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
this.pageData.toolInstanceId = '';
this.pageData.consumeQty = 0;
this.pageData.oriConsumeQty = 0;
this.pageData.totalConsumeQty = 0;
this.pageData.downTimeQty = 0;
this.readonlyFlag = true;
this.replaceFlag = true;
//
this.pageData.checkFlag = false;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.toolInstanceId.focus();
});
//
this.refreshToolUsedQty();
//
this.titleCon = this.labels.titleCon;
},
/*添加刀模记录*/
refreshToolUsedQty(){
countToolUsedQty(this.pageData).then(({data}) => {
this.pageData.oriConsumeQty = parseFloat(data.usedQty);
this.pageData.totalConsumeQty = parseFloat(data.usedQty);
});
},
/*数量失去焦点的事件*/
changeToolQty(){
let consumeQty = parseFloat(this.pageData.consumeQty);
if(consumeQty < 0){
//this.$message.error('0!');
return false;
}
//
this.pageData.totalConsumeQty = this.pageData.oriConsumeQty + consumeQty;
},
/*验证时长的参数*/
changeTimeQty(){
let downTimeQty = this.pageData.downTimeQty;
if(downTimeQty <= 0){
//this.$message.error('0!');
return false;
}
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检查新的工具实例信息*/
checkConnectToolInstanceIdBun(){
/*验证工具的实例*/
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){
this.$message.error(this.labels.pleaseScanToolInstanceId);
return false;
}
/*调用检查的方法检验下*/
checkConnectToolInstanceId(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == 201){
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: this.labels.confirmLabel,
cancelButtonText: this.labels.cancelLabel,
type: "warning"
}).then(() => {
this.pageData.checkFlag = true;
}).catch(() => {
this.pageData.checkFlag = false;
});
}else{
this.pageData.checkFlag = true;
}
});
},
/*检查新的工具实例信息*/
connectToolInstanceIdBun(){
/*验证工具的实例*/
if(this.pageData.toolInstanceId == null || this.pageData.toolInstanceId == ''){
this.$message.error(this.labels.pleaseScanToolInstanceId);
return false;
}
/*耗用的参数*/
let consumeQty = parseFloat(this.pageData.consumeQty);
if(consumeQty < 0){
this.$message.error(this.labels.currentRollProdQtyCantLessZero);
return false;
}
/*验证时长的参数*/
let downTimeQty = this.pageData.downTimeQty;
if(downTimeQty <= 0){
this.$message.error(this.labels.downTimesMustMoreThanZero);
return false;
}
checkConnectToolInstanceId(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else if (data.resultMap.resultCode == 201){
let msg = data.resultMap.resultMsg;
this.$confirm(msg, '提示', {
confirmButtonText: this.labels.confirmLabel,
cancelButtonText: this.labels.cancelLabel,
type: "warning"
}).then(() => {
//
this.connectToolInstanceIdOperation();
}).catch(() => {
this.pageData.checkFlag = false;
});
}else{
//
this.connectToolInstanceIdOperation();
}
});
},
/*替换刀模的功能*/
connectToolInstanceIdOperation(){
connectToolInstanceId(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.success(data.msg);
//
this.closeDialog();
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
</style>

358
src/views/modules/scheduleReport/com_select_shift.vue

@ -1,358 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="575px" style="height: 360px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 200px;"
label-width="80px">
<!-- 主材料 -->
<fieldset class="customer-fieldset" style="">
<el-table height="180"
:data="scheduleShiftList"
border
v-loading="dataListLoading"
@row-click="setCurrentShiftRow"
@row-dblclick="updateScheduleAndShift"
style="margin-top: 0px;">
<el-table-column
v-for="(item,index) in columnShiftArray" :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"
: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>
</fieldset>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateScheduleAndShift">{{buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
getScheduleShiftWithSelect,
} from '@/api/yieldReport/com_select_shift.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000023';
export default {
name: "com_select_shift",
data() {
return {
titleCon: '班次选择',
showDefault: false,
currentShiftRow: {},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
operatorId: '',
reportDate: '',
reportTime: '',
scheduledDate: '',
},
scheduleShiftList: [],
columnShiftArray: [
{
userId: this.$store.state.user.name,
functionId: 5306,
serialNumber: '5306ShiftScheduleDate',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "scheduleDate",
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: 5306,
serialNumber: '5306ShiftShiftNo',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "shiftNo",
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: 5306,
serialNumber: '5306ShiftShiftDesc',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "shiftDesc",
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: 5306,
serialNumber: '5306ShiftStartTime',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "startTime",
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: 5306,
serialNumber: '5306ShiftEndTime',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "endTime",
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: 5306,
serialNumber: '5306ShiftNextDayFlag',
tableId: "5306Shift",
tableName: "派工单材料",
columnProp: "nextDayFlag",
headerAlign: "center",
align: "right",
columnLabel: "次日",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
dataListLoading: false,
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '班次选择',
},
labelsList: [
{
functionId: functionId,
languageValue: '班次选择',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
/*初始化页面参数*/
init(pageData) {
//
this.pageData = JSON.parse(JSON.stringify(pageData));
//
this.getMultiLanguageList(); //
//
this.refreshPageData();
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageData(){
//
this.refreshScheduleShiftTable();
},
//
refreshScheduleShiftTable(){
getScheduleShiftWithSelect(this.pageData).then(({data}) => {
this.scheduleShiftList = data.rows;
});
},
/*设置当前选择的班次信息*/
setCurrentShiftRow(row, column, event){
this.currentShiftRow = JSON.parse(JSON.stringify(row));
},
//
updateScheduleAndShift(){
//
this.$emit("initScheduleShift", this.currentShiftRow.scheduleDate,
this.currentShiftRow.shiftNo, this.pageData.username);
//
this.closeDialog();
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /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>

430
src/views/modules/scheduleReport/com_separate_roll.vue

@ -1,430 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="270px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 100px;"
label-width="80px">
<!-- 时间 -->
<el-row style="margin-top: -10px;">
<el-col :span="8">
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="margin-left: 20px; margin-top: 27px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 80px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="12" style="margin-top: -5px;">
<el-form-item :label=labels.rollQty>
<el-input ref="rollQty" v-model="pageData.rollQty" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
<el-col :span="12" style="margin-top: -5px;">
<el-form-item :label=labels.rollNums>
<el-input v-model="pageData.rollNums" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="checkCreateSeparateRolllBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
checkCreateSplitSfdcRoll,/*校验是否可以创建分卷*/
createSplitSfdcRoll,/*执行创建分卷的操作*/
} from '@/api/yieldReport/com_separate_roll.js';
/*打印标签专用的js*/
import {
printSfdcLabel,
} from "@/views/modules/yieldReport/print_roll_label.js";
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000004';
export default {
name: "com_separate_roll",
data() {
return {
titleCon: '创建分卷',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: '',
seqNo: '',
rollNo: '',
reportDate: '',
reportTime: '',
operatorId: '',
rollQty: 0,
rollNums: 1
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
componentTitle: '创建分卷',
currentTime: '当前时间:',
rollQty: '良品数量:',
rollNums: '卷数:',
approvedQtyMustBeInteger: '良品数量必须是正整数!',
rollQtyMustBeInteger: '卷数必须是正整数!',
pleaseSwitchOperator: '请先切换人员!',
approvedQtyMustMoreTanZeroAndBeInteger: '良品数量必须大于零且是整数!',
rollQtyMustMoreTanZeroAndBeInteger: '卷数必须是正整数!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '创建分卷',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量:',
objectId: 'rollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数:',
objectId: 'rollNums',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量必须是正整数!',
objectId: 'approvedQtyMustBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数必须是正整数!',
objectId: 'rollQtyMustBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '良品数量必须大于零且是整数!',
objectId: 'approvedQtyMustMoreTanZeroAndBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数必须大于零且是整数!',
objectId: 'rollQtyMustMoreTanZeroAndBeInteger',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请先切换人员!',
objectId: 'pleaseSwitchOperator',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD HH:mm:ss');
this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
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.rollQty = 0;
this.pageData.rollNums = 1;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.rollQty.focus();
});
this.titleCon = this.labels.componentTitle;//
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*检查材料卷号的数据*/
checkValidQty() {
//
let rollQty = parseFloat(this.pageData.rollQty);
//
if (rollQty <= 0 || !Number.isInteger(rollQty)){
this.$message.error(this.labels.approvedQtyMustBeInteger);
return false;
}
},
/*检查材料卷号的数据*/
checkRollNums() {
//
let rollNums = parseFloat(this.pageData.rollNums);
//
if (rollNums <= 0 || !Number.isInteger(rollNums)){
this.$message.error(this.labels.rollQtyMustBeInteger);
return false;
}
},
checkCreateSeparateRolllBun() {
//
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) {
this.$message.error(this.labels.pleaseSwitchOperator);
return false;
}
//
let rollQty = parseFloat(this.pageData.rollQty);
//
if (rollQty <= 0 || !Number.isInteger(rollQty)){
this.$message.error(this.labels.approvedQtyMustMoreTanZeroAndBeInteger);
return false;
}
//
let rollNums = parseFloat(this.pageData.rollNums);
//
if (rollNums <= 0 || !Number.isInteger(rollNums)){
this.$message.error(this.labels.rollQtyMustMoreTanZeroAndBeInteger);
return false;
}
//
checkCreateSplitSfdcRoll(this.pageData)
.then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == '201') {
//
this.$confirm(data.resultMap.resultMsg, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.createSeparateRolllOperation();
});
} else { //
this.createSeparateRolllOperation();
}
});
},
/*执行创建分卷的操作*/
createSeparateRolllOperation() {
//
createSplitSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
//
let printList = data.printList;
printSfdcLabel(printList);
//
setTimeout(() =>{
//
this.closeDialog();
}, 1000)
}
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

891
src/views/modules/scheduleReport/com_separate_roll_with_split.vue

@ -1,891 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="755px" style="height: 560px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 400px;"
label-width="80px">
<fieldset class="customer-fieldset" style="width: 730px;">
<el-table height="100"
:data="orderPartList"
border ref="orderPartTable" highlight-current-row
v-loading="dataListLoading"
@current-change="changePartRow"
style="width: 730px; margin-left: 0px; margin-top: 0px;">
<el-table-column
v-for="(item,index) in columnPartArray" :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"
: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-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="#">{{labels.customerNo}}</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="#">{{labels.partNo}}</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=this.labels.partDesc>
<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=this.labels.referenceName>
<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=this.labels.supplierNo>
<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=this.labels.supplierName>
<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=this.labels.perRollQty>
<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=this.labels.rollNums>
<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;">
{{buttons.refreshButton}}</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;">
{{buttons.createSplitButton}}</el-button>
</el-form-item>
</el-col>
</el-row>
</fieldset>
<el-table height="200"
: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==''?false: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>
<span slot="footer" class="dialog-footer" >
<el-button type="primary" @click="closeDialog" style="margin-bottom: 5px;">{{buttons.closeButton}}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
/*组件*/
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
/*js请求*/
import {
getSplitOrderParts,/*获取分切工单的物料信息*/
refreshCurrentPageData,
refreshCurrentPageTable,
checkCreateSeparateRoll,/*检查是否可以创建分卷*/
createSeparateRoll,/*创建分卷*/
} from '@/api/yieldReport/com_separate_roll_with_split.js';
/*打印标签专用的js*/
import {
printMaterialLabel,
} from "@/views/modules/yieldReport/print_roll_label.js"
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000035';
export default {
data() {
return {
titleCon: '创建分卷',
showDefault: false,
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
partNo: '',
partDesc: '',
operatorId: '',
fgPartNo: '无',
fgPartDesc: '',
customerId: '无',
customerName: '',
referName: '',
supplierId: '*',
supplierName: '',
rollQty: 0,
rollNums: 1,
bomItemNo: 0,
splitType: 'S'
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
orderPartList: [],
columnPartArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5309PartBomItemNo',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "bomItemNo",
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: '5309PartPartNo',
tableId: "5309Part",
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: '5309PartPartDesc',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "partDesc",
headerAlign: "center",
align: "center",
columnLabel: "物料描述",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5309PartOrderQty',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "orderQty",
headerAlign: "center",
align: "center",
columnLabel: "数量",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
],
sfdcMaterialList: [],
columnMaterialArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
serialNumber: '5309PartRollNo',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "rollNo",
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: '5309PartRollQty',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "rollQty",
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: '5305MaterialPartNo',
tableId: "5305Material",
tableName: "材料",
columnProp: "partNo",
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: '5309PartSuppDeliveryNote',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "suppDeliveryNote",
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: '5309PartRollDate',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "rollDate",
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: '5305MaterialPartDesc',
tableId: "5305Material",
tableName: "材料",
columnProp: "partDesc",
headerAlign: "center",
align: "center",
columnLabel: "物料描述",
columnWidth: 180,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5305MaterialOriRollNo',
tableId: "5305Material",
tableName: "材料",
columnProp: "oriRollNo",
headerAlign: "center",
align: "center",
columnLabel: "原卷号",
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
},
{
userId: this.$store.state.user.name,
functionId: 5305,
serialNumber: '5309PartCreatedDate',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "createdDate",
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: '5309PartCreatedBy',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "createdBy",
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: '5309PartSuppRollNoFlag',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "suppRollNoFlag",
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: '5309PartSuppRollNo',
tableId: "5309Part",
tableName: "分切工单",
columnProp: "suppRollNo",
headerAlign: "center",
align: "center",
columnLabel: "供应商批号",
columnWidth: 80,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: false
}
],
dataListLoading: false,
buttons: {
refreshButton: '刷新数据',
createSplitButton: '创建分卷',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '刷新',
objectId: 'refreshButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '创建分卷',
objectId: 'createSplitButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '创建分卷',
customerNo: '客户编码:',
partNo: '产品编码:',
partDesc: '产品名称:',
referenceName: '参照名称:',
supplierNo: '供应商编码:',
supplierName: '供应名称:',
perRollQty: '每卷数量:',
rollNums: '卷数:',
noneData: '无',
pleaseEnterValidPerQty: '请输入有效的每卷数量!',
pleaseEnterValidRollNums: '请输入有效的卷数!',
pleaseSelectValidSupplierNo: '请选择有效的客户编码!',
pleaseSelectValidPartNo: '请选择有效的产品编码!',
supplierNoIsError: '供应商编码有误!',
},
labelsList: [
{
functionId: functionId,
languageValue: '创建分卷 ',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '客户编码:',
objectId: 'customerNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '产品编码:',
objectId: 'partNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '产品名称:',
objectId: 'partDesc',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '参照名称:',
objectId: 'referenceName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '供应商编码:',
objectId: 'supplierNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '供应名称:',
objectId: 'supplierName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '每卷数量:',
objectId: 'perRollQty',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷数:',
objectId: 'rollNums',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '无',
objectId: 'noneData',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入有效的每卷数量!',
objectId: 'pleaseEnterValidRollNums',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请选择有效的客户编码!',
objectId: 'pleaseSelectValidSupplierNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请选择有效的产品编码!',
objectId: 'pleaseSelectValidPartNo',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '供应商编码有误!',
objectId: 'supplierNoIsError',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
/*初始化页面参数*/
init (scheduleData, operatorData) {
//
this.pageData.partNo = '';
this.pageData.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.pageData.rollNums = 1;
this.pageData.rollQty = 0;
//
this.getMultiLanguageList(); //
//
this.sfdcMaterialList = []
//
this.operatorData = JSON.parse(JSON.stringify(operatorData))
//
this.titleCon = this.labels.titleCon
//
this.refreshSplitOrderParts();
//
this.refreshPageData()
},
/*关闭modal*/
closeDialog () {
this.$emit('update:visible', false)
//
this.$emit('refreshPageData')
},
/*刷新分期工单的*/
refreshSplitOrderParts () {
getSplitOrderParts(this.pageData).then(({data}) => {
this.orderPartList = data.rows;
setTimeout(() => {
this.$refs.orderPartTable.setCurrentRow(this.orderPartList[0]);
}, 300)
});
},
/*刷新当前的页面参数*/
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.supplierDesc
})
},
//
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
}
//
this.getCurrentPageData()
},
//
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 () {
//
checkCreateSeparateRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg)
} else {
//
this.createSeparateRollBun()
}
})
},
/*处理材料下料的记录*/
createSeparateRollBun: function () {
//
let rollQty = this.pageData.rollQty
//
if (rollQty <= 0) {
this.$message.error(this.labels.pleaseEnterValidPerQty)
return false
}
//
let rollNums = this.pageData.rollNums
if (rollNums <= 0) {
this.$message.error(this.labels.pleaseEnterValidRollNums)
return false
}
//
let customerId = this.pageData.customerId.trim()
let fgPartNo = this.pageData.fgPartNo.trim()
let supplierId = this.pageData.supplierId.trim()
//
if (customerId === '') {
this.$message.error(this.labels.pleaseSelectValidSupplierNo)
return false
}
//
if (fgPartNo === '') {
this.$message.error(this.labels.pleaseSelectValidPartNo)
return false
}
//
if (supplierId === '') {
this.$message.error(this.labels.supplierNoIsError)
return false
}
//
createSeparateRoll(this.pageData).then(({data}) => {
if (data.code === 500) {
this.$message.error(data.msg)
} else {
this.$message.success(data.msg)
//table
this.getCurrentPageTable();
//
this.pageData.customerId = '无';
this.pageData.customerName = '';
this.pageData.fgPartNo = '无';
this.pageData.fgPartDesc = '';
this.pageData.supplierId = '*';
this.pageData.supplierName = '';
this.pageData.rollNums = 1;
this.pageData.rollQty = 0;
//
//this.closeDialog()
//
let printList = data.printList;
printMaterialLabel(printList);
}
})
},
/*触发修改的时间*/
changePartRow(row, oldRow){
//
if(row){
this.pageData.partNo = row.partNo;
this.pageData.partDesc = row.partDesc;
this.pageData.itemNo = row.bomItemNo;
//
this.refreshPageData();
}
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
//
//this.refreshSplitOrderParts();
},
}
</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>

428
src/views/modules/scheduleReport/com_show_transformed_roll.vue

@ -1,428 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="labels.titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="720px" style="height: 485px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 360px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="5" >
<el-form-item :label="labels.partNo">
<el-input v-model="pageData.partNo" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="7" >
<el-form-item :label="labels.partDesc">
<el-input v-model="pageData.partDesc" readonly="readonly" style="width: 180px"></el-input>
</el-form-item>
</el-col>
<el-col :span="5" >
<el-form-item :label="labels.oriPartNo">
<el-input v-model="pageData.oriPartNo" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="7" >
<el-form-item :label="labels.oriPartDesc">
<el-input v-model="pageData.oriPartDesc" readonly="readonly" style="width: 180px"></el-input>
</el-form-item>
</el-col>
<el-col :span="5" >
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 695px;">
<legend>{{labels.wareHouseRollList}}</legend>
<div style="width: 680px;">
<el-table height="255"
:data="transformPartList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
v-for="(item,index) in transformPartColumns" :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">
<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>
</div>
</fieldset>
</el-form>
</el-form>
</el-dialog>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
</div>
</template>
<script>
import {
getTransformOrderBomData,
getTransformRollTable,
} from '@/api/yieldReport/com_show_transformed_roll.js';
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
import column from "@/views/modules/common/column";
import {
getTableDefaultListLanguage,
getTableUserListLanguage,
} from "@/api/table.js"
var functionId='C20000002';
export default {
components: {
column,
},
data() {
return {
visible: false,
queryTable: {
functionId: 'C20000002',
tableId: "C20000002TransRoll",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: 'C20000002',
tableId: "C20000002TransRoll",
status: true,
languageCode: this.$i18n.locale
},
labels: {
titleCon:'已入库卷清单',
partNo:'物料编码:',
partDesc:'物料描述:',
oriPartNo:'原物料编码:',
oriPartDesc:'原物料描述:',
wareHouseRollList:'入库卷列表',
},
buttons:{
search:'查询',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
titleCon: '已入库卷清单',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
rollNo: '',
oriPartNo: '',
oriPartDesc: '',
partNo: '',
partDesc: '',
transType: 'sw-part',
status: 'Y',
},
bomData: {},
transformPartList: [],
transformPartColumns: [
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollSortNo',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "sortNo",
headerAlign: "center",
align: "center",
columnLabel: "序号",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollRollNo',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "rollNo",
headerAlign: "center",
align: "center",
columnLabel: "卷号",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollRollDate',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "rollDate",
headerAlign: "center",
align: "center",
columnLabel: "卷日期",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollRollQty',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "rollQty",
headerAlign: "center",
align: "center",
columnLabel: "卷数量",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollOriRollNo',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "oriRollNo",
headerAlign: "center",
align: "center",
columnLabel: "原卷号",
columnWidth: 125,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollCreatedDate',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "createdDate",
headerAlign: "center",
align: "center",
columnLabel: "录入时间",
columnWidth: 130,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000002',
serialNumber: 'C20000002TransRollCreatedBy',
tableId: "C20000002TransRoll",
tableName: "转换卷号",
columnProp: "createdBy",
headerAlign: "center",
align: "center",
columnLabel: "录入人",
columnWidth: 85,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
],
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(transformOrder) {
//
this.pageData.orderNo = transformOrder.orderNo;
this.pageData.itemNo = transformOrder.orderItemNo;
this.pageData.partNo = transformOrder.partNo;
this.pageData.partDesc = transformOrder.partDescription;
this.pageData.oriPartNo = '';
this.pageData.oriPartDesc = '';
//BOM
this.refreshTransformOrderBomData();
//
this.refreshPageTableData();
this.getTableUserColumn();
this.getMultiLanguageList()//
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageTableData(){
//
this.refreshTransformRollTable();
},
//
refreshTransformRollTable(){
//
this.pageData.rollNo = '';
getTransformRollTable(this.pageData).then(({data}) => {
this.transformPartList = data.rows;
});
},
//
refreshTransformOrderBomData(){
//
getTransformOrderBomData(this.pageData).then(({data}) => {
this.bomData = data.row;
//
this.pageData.oriPartNo = data.row.partNo;
this.pageData.oriPartDesc = data.row.partDesc;
});
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: 'C20000002',
tableId:'C20000002TransRoll',
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.transformPartColumns = data.rows
} else {
this.getColumnList()
}
})
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.transformPartColumns = data.rows
} else {
// this.showDefault = true
}
})
},
},
created() {
this.getMultiLanguageList()//
//
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /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>

1374
src/views/modules/scheduleReport/com_split_order_finish_roll.vue
File diff suppressed because it is too large
View File

4167
src/views/modules/scheduleReport/com_split_order_report.vue
File diff suppressed because it is too large
View File

324
src/views/modules/scheduleReport/com_split_order_switch_roll.vue

@ -1,324 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="210px" style="height: 380px;" class="customer-dialog">
<el-form :inline="true" label-position="top" @submit.native.prevent style="height: 60px;"
label-width="80px">
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="24" style="margin-left: 35px;">
<el-form-item :label=labels.sfdcRoll>
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog" style="margin-bottom: 10px;">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
/*添加js的方法和请求*/
import {
checkSplitScheduleSwitchRoll,/*校验是否可以切换卷*/
splitScheduleSwitchRoll,/*执行切换卷的操作*/
} from '@/api/yieldReport/com_switch_roll.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000033';
export default {
data() {
return {
titleCon: '切换卷',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: '',
newRollNo: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
componentTitle: '切换卷',
sfdcRoll: '卷号:',
pleaseSwitchOperator: '请先切换人员!',
pleaseEnterSfdcRoll: '请输入半成品卷号!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '切换卷',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '卷号:',
objectId: 'sfdcRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请先切换人员!',
objectId: 'pleaseSwitchOperator',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入半成品卷号!',
objectId: 'pleaseEnterSfdcRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消:',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components: {
comExceptionReason,/*异常原因的组件*/
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.newRollNo = '';
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
//
this.titleCon = this.labels.titleCon;
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
switchRollBun() {
//
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) {
this.$message.error(this.labels.pleaseSwitchOperator);
return false;
}
//
let newRollNo = this.pageData.newRollNo;
if (newRollNo == null || newRollNo == '') {
this.$message.error(this.labels.pleaseEnterSfdcRoll);
return false;
}
//
checkSplitScheduleSwitchRoll(this.pageData).then(({data}) => {
//
if (data.code === 200) {
//
this.switchRollOperation();
} else if (data.code === '201') {
//
this.$confirm(data.msg, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.switchRollOperation();
});
} else {
//
this.$message.error(data.msg);
}
});
},
/*执行切换卷的操作*/
switchRollOperation() {
//
splitScheduleSwitchRoll(this.pageData).then(({data}) => {
//
if (data.code === 200) {
//
this.pageData.newRollNo = '';
this.closeDialog();
} else {
//
this.$message.error(data.msg);
}
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

311
src/views/modules/scheduleReport/com_start_produce.vue

@ -1,311 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="300px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 60px;"
label-width="80px">
<!-- 时间 -->
<el-row style="margin-top: -10px;">
<el-col :span="10" >
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="10" style="margin-top: 26px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 100px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="startProduceFun">{{ buttons.saveButton }}</el-button>
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
<!-- 卷调机-卷材料耗用 -->
<comEndTuning ref="comEndTuning" :close-on-click-modal="false"
:visible.sync="endTuningFlag" @closeDialog="closeDialog">
</comEndTuning>
</div>
</template>
<script>
import {
checkStartProduce,
startProduce,
getSystemTimeData,
}from '@/api/yieldReport//com_start_produce.js';
/*引入组件*/
import comEndTuning from './com_end_tuning';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000009';
/*开始生产时候报告调机的材料的使用数量*/
export default {
data() {
return {
titleCon: '开始生产',
showDefault: false,
endTuningFlag: false,
sfdcTimeList: [],
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
rollNo: '',
operatorId: '',
reportDate: '',
reportTime: '',
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
dataListLoading: false,
buttons: {
saveButton: '保存',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '保存',
objectId: 'saveButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '开始生产 ',
seqNoName: '派工单号:',
currentTime: '当前时间:',
},
labelsList: [
{
functionId: functionId,
languageValue: '开始生产 ',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '派工单号:',
objectId: 'seqNoName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components: {
comEndTuning,/*开始生产时 调用结束调机的功能*/
},
methods: {
/*页面的初始化方法*/
init(scheduleData, operatorData) {
//
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.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
// this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
this.getMultiLanguageList(); //
//
this.refreshSystemTime();
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
//
this.titleCon = this.labels.titleCon+this.labels.seqNoName+scheduleData.seqNo;
// this.currentRollOps.seqNo = seqNo;
// this.currentRollOps.rollNo = rollNo;
//
//this.refreshPageData();
},
/*刷新服务器的时间*/
refreshSystemTime(){
getSystemTimeData().then(({data}) => {
//
if(data.code == 200){
//
this.pageData.reportDate = data.resultMap.sysDate;
this.pageData.reportTime = data.resultMap.sysTime;
}
});
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*开始生产的方法*/
startProduceFun(){
//
checkStartProduce(this.pageData).then(({data}) => {
// ---
if(data.code == 500){
this.$message.error(data.msg);
//
}else if (data.resultMap.resultCode == 201){
//
this.comEndTuningModal();
}else{
//
this.startProduceOperation();
}
});
},
/*打开结束调机的modal*/
comEndTuningModal(){
//
this.$nextTick(() => {
//modal
this.endTuningFlag = true;
this.$refs.comEndTuning.init(this.pageData, this.operatorData);
});
},
/*打开结束调机的modal*/
startProduceOperation(){
startProduce(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
//modal
this.closeDialog();
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

292
src/views/modules/scheduleReport/com_start_tuning.vue

@ -1,292 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="300px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 60px;"
label-width="80px">
<!-- 时间 -->
<el-row style="margin-top: -10px;">
<el-col :span="10" >
<el-form-item :label=labels.currentTime>
<el-date-picker style="width: 100px;"
v-model="pageData.reportDate"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
placeholder="">
</el-date-picker>
</el-form-item>
</el-col>
<el-col :span="8" style="margin-top: 27px;">
<el-form-item :label="''">
<el-form-item :label="''">
<el-time-picker style="width: 80px;"
v-model="pageData.reportTime"
format="HH:mm:ss"
value-format="HH:mm:ss"
placeholder="">
</el-time-picker>
</el-form-item>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="startTuningFun"> {{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog"> {{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import {
startTuning,
getSystemTimeData,
}from '@/api/yieldReport/com_start_tuning.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000008';
export default {
data() {
return {
titleCon: '开始调机',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
scheduledDate: '',
shiftNo: '',
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
seqNo: '',
rollNo: '',
reportDate: '',
reportTime: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
titleCon: '开始调机 ',
seqNoName: '派工单号:',
currentTime: '当前时间:',
},
labelsList: [
{
functionId: functionId,
languageValue: '开始调机 ',
objectId: 'titleCon',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '派工单号:',
objectId: 'seqNoName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '当前时间:',
objectId: 'currentTime',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
methods: {
/*初始化页面的参数*/
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.titleCon = this.labels.titleCon+this.labels.seqNoName+scheduleData.seqNo;
//
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.reportDate = this.dayjs(new Date()).format('YYYY-MM-DD');
// this.pageData.reportTime = this.dayjs(new Date()).format('HH:mm:ss');
//
this.getMultiLanguageList(); //
//
this.refreshSystemTime();
},
/*刷新服务器的时间*/
refreshSystemTime(){
getSystemTimeData().then(({data}) => {
//
if(data.code == 200){
//
this.pageData.reportDate = data.resultMap.sysDate;
this.pageData.reportTime = data.resultMap.sysTime;
}
});
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
/*开始调机*/
startTuningFun(){
startTuning(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.success(data.msg);
//
this.closeDialog();
}
});
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

328
src/views/modules/scheduleReport/com_switch_operator.vue

@ -1,328 +0,0 @@
<template>
<!-- 展示员工切换的模块 -->
<div class="customer-css">
<el-dialog :title="titleCon" v-bind="$attrs" v-on="$listeners" width="280px">
<el-form :inline="true" @submit.native.prevent label-position="top" label-width="100px" style="margin-top: -5px;">
<el-row>
<el-form-item>
<span slot="label" style="" @click="getBaseList(26)"><a herf="#">{{ labels.operatorId }}</a></span>
<el-input ref="operatorId" @keyup.enter.native="saveOperatorData" @blur="checkOperatorId"
v-model="operatorData.operatorId"
style="width: 110px">
</el-input>
</el-form-item>
</el-row>
<el-row>
<el-form-item :label=labels.operatorName>
<el-input class="customer-color" v-model="operatorData.operatorName" readonly="readonly"
style="width: 110px;"></el-input>
</el-form-item>
</el-row>
</el-form>
<el-form :inline="true" label-position="top" label-width="100px"
style="margin-left: 180px; margin-top: -80px; width: 60px;">
<el-form-item label="" style="margin-top: 10px; margin-bottom: 0px;">
<el-button type="primary" @click="saveOperatorData">{{ buttons.saveButton }}</el-button>
</el-form-item>
<el-form-item label="" style="margin-top: 25px; margin-bottom: 15px;">
<el-button type="primary" @click="closeDialog">{{ buttons.closeButton }}</el-button>
</el-form-item>
<el-form-item label="" style="margin-top: 25px; margin-bottom: 15px; display: none;">
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!--列表的组件-->
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist>
</div>
</template>
<script>
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
import {
getOperatorData,
} from '@/api/yieldReport/produce_order.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
import comOpenRoutingMenu from "../schedule/com_open_routing_menu";
import comOpenScheduleMenu from "../schedule/com_open_schedule_menu";
var functionId = 'C10000001';
export default {
data() {
return {
titleCon: '操作员切换',
showDefault: false,
operatorFlag: false,
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
reportType: 0
},
buttons: {
saveButton: '保存',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '保存',
objectId: 'saveButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
componentTitle: '操作员切换',
operatorId: '操作员:',
operatorName: '操作员名称:',
pleaseEnterOperatorId: '请输入操作员!:',
accountError: '账号有误!',
operatorNotAvailable: '操作员信息不可用!',
},
labelsList: [
{
functionId: functionId,
languageValue: '操作员切换',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作员:',
objectId: 'operatorId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作员名称:',
objectId: 'operatorName',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入操作员!',
objectId: 'pleaseEnterOperatorId',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '账号有误!',
objectId: 'accountError',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '操作员信息不可用!',
objectId: 'operatorNotAvailable',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
/*组件*/
components: {
Chooselist,/*列表的组件*/
},
methods: {
/*关闭modal*/
closeDialog() {
//
this.$emit('notInitOperatorData', this.operatorData.reportType);
//
this.$emit('update:visible', false);
},
//
init(val) {
//
this.operatorData.operatorName = '';
this.operatorData.operatorId = '';
this.operatorData.reportType = val;
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.operatorId.focus();
});
//
//this.refreshPageData();
this.titleCon = this.labels.componentTitle;//
},
//
saveOperatorData() {
//
let operatorId = this.operatorData.operatorId.trim();
if (operatorId == null || '' === operatorId) {
this.$message.error(this.labels.pleaseEnterOperatorId);
return false;
}
getOperatorData(this.operatorData).then(({data}) => {
//
if (data.code === 500) {
this.operatorData.operatorName = '';
this.$message.error(data.msg);
return false;
} else if (!data.row) {
this.$message.error(this.labels.accountError);
this.operatorData.operatorName = '';
return false;
}
let status = data.row.status;
//
if (status === 'N') {
this.operatorFlag = false;
} else {
this.operatorFlag = true;
}
//
this.operatorData.status = status;
if (!this.operatorFlag) {
this.$message.error(this.labels.operatorNotAvailable);
this.operatorData.operatorName = '';
}
this.operatorData.operatorName = data.row.operatorName;
//
this.closeDialog();
// 0
//
this.$emit('initOperatorData', this.operatorData);
});
},
/*检查操作员的信息*/
checkOperatorId() {
getOperatorData(this.operatorData).then(({data}) => {
//
if (data.code === 500) {
//this.$message.error(data.msg);
this.operatorData.operatorName = '';
return false;
} else if (!data.row) {
//this.$message.error('!');
this.operatorData.operatorName = '';
return false;
}
let status = data.row.status;
//
if (status === 'N') {
this.operatorFlag = false;
} else {
this.operatorFlag = true;
}
//
this.operatorData.status = status;
if (!this.operatorFlag) {
//this.$message.error('!');
this.operatorData.operatorName = '';
} else {
this.operatorData.operatorName = data.row.operatorName;
}
});
},
/*列表方法的回调*/
getBaseData(val) {
if (this.tagNo === 26) {
this.operatorData.operatorId = val.OperatorID;
this.operatorData.operatorName = val.OperatorName;
}
},
//
getBaseList(val) {
this.tagNo = val
this.$nextTick(() => {
let strVal = "";
if (val === 26) {
strVal = this.operatorData.operatorId;
}
this.$refs.baseList.init(val, strVal)
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
}
}
</script>
<style scoped lang="scss">
/*控制操作员的字体颜色*/
.customer-color /deep/ .el-input__inner {
color: red;
}
</style>

320
src/views/modules/scheduleReport/com_switch_roll.vue

@ -1,320 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="210px" style="height: 680px;" class="customer-dialog">
<el-form :inline="true" label-position="top" @submit.native.prevent style="height: 60px;"
label-width="80px">
<!-- 半成品卷卷号 -->
<el-row>
<el-col :span="24" style="margin-left: 35px;">
<el-form-item :label=labels.sfdcRoll>
<el-input ref="newRollNo" v-model="pageData.newRollNo" style="width: 120px;" ></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="switchRollBun">{{ buttons.confirmButton }}</el-button>
<el-button type="primary" @click="closeDialog" style="margin-bottom: 10px;">{{ buttons.closeButton }}</el-button>
<el-button v-if="showDefault" @click="saveMultiLanguage()" type="primary">多语言设置</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
/*添加组件*/
import comExceptionReason from "./com_exception_reason";//
/*添加js的方法和请求*/
import {
checkSwitchSfdcRoll,/*校验是否可以切换卷*/
switchSfdcRoll,/*执行切换卷的操作*/
} from '@/api/yieldReport/com_switch_roll.js';
import {
searchSysLanguagePackList,
searchSysLanguageParam,
searchFunctionButtonList,
saveButtonList,
searchSysLanguage,
searchLanguageListByLanguageCode,
saveSysLanguageOne,
searchPageLanguageData,
removerLanguage,
saveSysLanguageList
} from "@/api/sysLanguage.js";
var functionId = 'C10000003';
export default {
name: "com_merge_roll",
data() {
return {
titleCon: '切换卷',
showDefault: false,
scheduleData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: 0,
resourceId: '',
scheduledDate: '',
shiftNo: '',
partNo: '',
workCenterNo: '',
workCenterDesc: '',
resourceDesc: '',
rollNo: '',
partDesc: '',
planStartTime: '',
planFinishTime: '',
qtyRequiredOriginal: 0,
preItemDesc: '',
nextItemDesc: '',
nextItemNo: 0,
operatorId: '',
functionName: '',
currentRollFlag: false
},
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
seqNo: '',
orderNo: '',
itemNo: '',
newRollNo: '',
operatorId: ''
},
operatorData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
operatorId: '',
operatorName: '',
status: '',
seqNo: '',
showFlag: false
},
buttons: {
confirmButton: '确定',
closeButton: '关闭',
},
buttonList: [
{
functionId: functionId,
languageValue: '确定',
objectId: 'confirmButton',
objectType: 'button',
tableId: '*'
}, {
functionId: functionId,
languageValue: '关闭',
objectId: 'closeButton',
objectType: 'button',
tableId: '*'
},
],
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
labels: {
componentTitle: '切换卷',
sfdcRoll: '半成品卷卷号:',
pleaseSwitchOperator: '请先切换人员!',
pleaseEnterSfdcRoll: '请输入半成品卷号!',
confirmLabel: '确认',
cancelLabel: '取消',
},
labelsList: [
{
functionId: functionId,
languageValue: '切换卷',
objectId: 'componentTitle',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '半成品卷卷号:',
objectId: 'sfdcRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请先切换人员!',
objectId: 'pleaseSwitchOperator',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '请输入半成品卷号!',
objectId: 'pleaseEnterSfdcRoll',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '确认',
objectId: 'confirmLabel',
objectType: 'label',
tableId: '*'
}, {
functionId: functionId,
languageValue: '取消:',
objectId: 'cancelLabel',
objectType: 'label',
tableId: '*'
},
],
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
}
},
components: {
comExceptionReason,/*异常原因的组件*/
},
methods: {
//
init(scheduleData, operatorData) {
//
this.scheduleData = scheduleData;
//
this.operatorData = JSON.parse(JSON.stringify(operatorData));
//
this.pageData.orderNo = scheduleData.orderNo;
this.pageData.itemNo = scheduleData.itemNo;
this.pageData.seqNo = scheduleData.seqNo;
this.pageData.operatorId = operatorData.operatorId;
this.pageData.newRollNo = '';
//
this.getMultiLanguageList(); //
//
this.$nextTick(() => {
this.$refs.newRollNo.focus();
});
this.titleCon = this.labels.componentTitle;//
},
/*关闭modal*/
closeDialog(){
//
this.$emit('refreshPageData');
//
this.$emit('update:visible', false);
},
switchRollBun() {
//
if (this.pageData.operatorId == '' || this.pageData.operatorId == null) {
this.$message.error(this.labels.pleaseSwitchOperator);
return false;
}
//
let newRollNo = this.pageData.newRollNo;
if (newRollNo == null || newRollNo == '') {
this.$message.error(this.labels.pleaseEnterSfdcRoll);
return false;
}
//
checkSwitchSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else if (data.resultMap.resultCode == '201') {
//
this.$confirm(data.resultMap.resultMsg, '提示', {
confirmButtonText: this.labels.confirmLabel,
celButtonText: this.labels.cancelLabel,
type: 'warning'
}).then(() => {
//
this.switchRollOperation();
});
} else { //
this.switchRollOperation();
}
});
},
/*执行切换卷的操作*/
switchRollOperation() {
//
switchSfdcRoll(this.pageData).then(({data}) => {
//
if (data.code == 500) {
this.$message.error(data.msg);
} else {
//
this.pageData.newRollNo = '';
this.closeDialog();
}
})
},
//
async saveMultiLanguage() {
// button label title
let buttons = this.buttonList;
let labels = this.labelsList;
await saveButtonList(buttons)
await saveButtonList(labels)
},
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0 ) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0 ) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
},
created() {
// this.factoryList()
// this.getLanguageList()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节fieldset下的样式*/
.customer-fieldset .customer-item{
margin-top: -15px;
}
/*fieldset下table的样式*/
.customer-fieldset /deep/ .el-table__header th.is-leaf{
line-height: 16px;
}
/deep/ .customer-tab .el-tabs__content{
padding: 0px !important;
}
</style>

476
src/views/modules/scheduleReport/com_transform_part.vue

@ -1,476 +0,0 @@
<template>
<div class="customer-css">
<el-dialog :title="labels.titleCon" v-drag v-bind="$attrs" v-on="$listeners"
width="800px" style="height: 485px;" class="customer-dialog">
<el-form :inline="true" label-position="top" style="height: 350px;"
label-width="80px">
<!-- 菜单信息 -->
<el-row>
<el-col :span="4" >
<el-form-item :label="labels.partNo">
<el-input v-model="pageData.partNo" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="7" >
<el-form-item :label="labels.partDesc">
<el-input v-model="pageData.partDesc" readonly="readonly" style="width: 180px"></el-input>
</el-form-item>
</el-col>
<el-col :span="4" >
<el-form-item :label="labels.oriPartNo">
<el-input v-model="pageData.oriPartNo" readonly="readonly" style="width: 120px"></el-input>
</el-form-item>
</el-col>
<el-col :span="7" >
<el-form-item :label="labels.oriPartDesc">
<el-input v-model="pageData.oriPartDesc" readonly="readonly" style="width: 180px"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="5" >
<el-form-item :label="labels.rollNo">
<el-input v-model="pageData.rollNo" ref="rollNo" style="width: 120px"
@keyup.enter.native="scanTransformOrderRollNo"></el-input>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item class="customer-button">
<el-button type="primary" @click="transformRollPartBun" style="margin-left: 10px; margin-bottom: 5px;">
{{buttons.change}}</el-button>
<el-button @click="userSetting" type="primary">{{ buttons.settingTable }}</el-button>
</el-form-item>
</el-col>
</el-row>
<!-- 主材料 -->
<el-form>
<fieldset class="customer-fieldset" style="width: 775px;">
<legend>{{labels.scanList}}</legend>
<div style="width: 775px;">
<el-table height="220"
:data="transformPartList"
border
v-loading="dataListLoading"
style="width: 100%; margin-top: -5px;">
<el-table-column
v-for="(item,index) in transformPartColumns" :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">
<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>
</div>
</fieldset>
</el-form>
</el-form>
</el-dialog>
<!-- 动态列 -->
<column v-if="visible" ref="column" @refreshData="getTableUserColumn" v-drag></column>
</div>
</template>
<script>
import {
getTransformOrderBomData,
getTransformRollTable,
scanTransformPartRollNo,
transformRollPart,
} from '@/api/yieldReport/com_transform_part.js';
import column from "@/views/modules/common/column";
import {
getTableDefaultListLanguage,
getTableUserListLanguage,
} from "@/api/table.js"
/*打印标签专用的js*/
import {
printMaterialLabel,
} from "@/views/modules/yieldReport/print_roll_label.js";
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
var functionId='C20000001';
export default {
components: {
column,
},
data() {
return {
visible: false,
queryTable: {
functionId: 'C20000001',
tableId: "C20000001TransRoll",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: 'C20000001',
tableId: "C20000001TransRoll",
status: true,
languageCode: this.$i18n.locale
},
labels: {
titleCon:'物料转换',
partNo:'物料编码:',
partDesc:'物料描述:',
oriPartNo:'原物料编码:',
oriPartDesc:'原物料描述:',
rollNo:'扫描卷号:',
scanList:'扫描卷列表',
rollNoIsNull:'卷号不能为空!',
scanFirst:'请先扫描卷后再试!',
},
buttons:{
change:'转换',
settingTable:'设置表格栏位',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
titleCon: '物料转换',
pageData: {
site: this.$store.state.user.site,
username: this.$store.state.user.name,
orderNo: '',
itemNo: 0,
rollNo: '',
oriPartNo: '',
oriPartDesc: '',
partNo: '',
partDesc: '',
transType: 'sw-part',
status: 'N',
reportTime: '',
},
bomData: {},
transformPartList: [],
transformPartColumns: [
{
userId: this.$store.state.user.name,
functionId: 'C20000001',
serialNumber: 'C20000001TransRollSortNo',
tableId: "C20000001TransRoll",
tableName: "转换卷号",
columnProp: "sortNo",
headerAlign: "center",
align: "center",
columnLabel: "序号",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000001',
serialNumber: 'C20000001TransRollRollNo',
tableId: "C20000001TransRoll",
tableName: "转换卷号",
columnProp: "rollNo",
headerAlign: "center",
align: "center",
columnLabel: "卷号",
columnWidth: 120,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000001',
serialNumber: 'C20000001TransRollRollQty',
tableId: "C20000001TransRoll",
tableName: "转换卷号",
columnProp: "rollQty",
headerAlign: "center",
align: "center",
columnLabel: "数量",
columnWidth: 60,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000001',
serialNumber: 'C20000001TransRollPartNo',
tableId: "C20000001TransRoll",
tableName: "转换卷号",
columnProp: "partNo",
headerAlign: "center",
align: "center",
columnLabel: "物料编码",
columnWidth: 100,
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
{
userId: this.$store.state.user.name,
functionId: 'C20000001',
serialNumber: 'C20000001TransRollPartDesc',
tableId: "C20000001TransRoll",
tableName: "转换卷号",
columnProp: "partDesc",
headerAlign: "center",
align: "center",
columnLabel: "物料描述",
columnWidth: '',
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: ''
},
],
dataListLoading: false,
}
},
methods: {
/*初始化页面参数*/
init(transformOrder) {
//
this.pageData.orderNo = transformOrder.orderNo;
this.pageData.itemNo = transformOrder.orderItemNo;
this.pageData.rollNo = '';
this.pageData.partNo = transformOrder.partNo;
this.pageData.partDesc = transformOrder.partDescription;
this.pageData.oriPartNo = '';
this.pageData.oriPartDesc = '';
//
this.$nextTick(() => {
this.$refs.rollNo.focus();
})
//BOM
this.refreshTransformOrderBomData();
//
this.refreshPageTableData();
this.getTableUserColumn();
this.getMultiLanguageList()//
},
/*关闭modal*/
closeDialog(){
this.$emit('update:visible', false);
},
/*刷新当前的页面参数*/
refreshPageTableData(){
//
this.refreshTransformRollTable();
},
//
refreshTransformRollTable(){
//
this.pageData.rollNo = '';
getTransformRollTable(this.pageData).then(({data}) => {
this.transformPartList = data.rows;
});
},
//
refreshTransformOrderBomData(){
//
getTransformOrderBomData(this.pageData).then(({data}) => {
this.bomData = data.row;
//
this.pageData.oriPartNo = data.row.partNo;
this.pageData.oriPartDesc = data.row.partDesc;
});
},
//
scanTransformOrderRollNo(){
//
this.pageData.rollNo = this.pageData.rollNo.trim();
//
if(this.pageData.rollNo == null || this.pageData.rollNo == ''){
this.$message.error(this.labels.rollNoIsNull)
return false;
}
scanTransformPartRollNo(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
//使
this.pageData.rollNo = '';
}else{
//使
this.pageData.rollNo = '';
//
this.refreshTransformRollTable();
//
this.$nextTick(() => {
this.$refs.rollNo.focus();
})
}
});
},
/*执行转换卷操作*/
transformRollPartBun(){
//
if(this.transformPartList.length == 0){
this.$message.error(this.labels.scanFirst);
return false;
}
//
transformRollPart(this.pageData).then(({data}) => {
//
if(data.code == 500){
this.$message.error(data.msg);
}else{
this.$message.success(data.msg);
//使
this.pageData.rollNo = '';
//
this.refreshTransformRollTable();
//
let printList = data.printList;
printMaterialLabel(printList);
}
});
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
//
userSetting() {
this.visible = true;
let queryTable = {
userId: this.$store.state.user.name,
functionId: 'C20000001',
tableId:'C20000001TransRoll',
languageCode: this.$i18n.locale
}
this.$nextTick(() => {
this.$refs.column.init(queryTable);
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.transformPartColumns = data.rows
} else {
this.getColumnList()
}
})
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.transformPartColumns = data.rows
} else {
// this.showDefault = true
}
})
},
},
created() {
// this.getMultiLanguageList()//
// this.getTableUserColumn()
}
}
</script>
<style scoped lang="scss">
/*调节页面button和input的上下间距*/
.customer-css .customer-button{
margin-top: 25px;
}
/*调节样式*/
.customer-item{
margin-top: -10px;
}
/*fieldset下table的样式*/
.customer-fieldset /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>

1454
src/views/modules/scheduleReport/not_over_finish_roll.vue
File diff suppressed because it is too large
View File

502
src/views/modules/scheduleReport/order_transform_part.vue

@ -1,502 +0,0 @@
<template>
<div class="customer-css">
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: 0px;">
<el-form-item :label="labels.site">
<el-input v-model="searchData.site" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="labels.orderNo">
<el-input v-model="searchData.orderNo" style="width: 130px"></el-input>
</el-form-item>
<el-form-item :label="labels.orderDate">
<el-date-picker
style="width: 130px"
v-model="searchData.date1"
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
</el-form-item>
<el-form-item :label="labels.to">
<el-date-picker
style="width: 130px"
v-model="searchData.date2"
value-format="yyyy-MM-dd"
:placeholder="labels.chooseDate">
</el-date-picker>
</el-form-item>
<el-form-item :label="labels.slittedFlag">
<el-select filterable v-model="searchData.slittedFlag" style="width: 130px">
<el-option :label="labels.all" value="ALL"></el-option>
<el-option :label="labels.yes" value="Y"></el-option>
<el-option :label="labels.no" value="N"></el-option>
</el-select>
<el-button @click="refreshPageTables" type="primary" style="margin-left: 10px;margin-top: 0px">{{buttons.search}}</el-button>
<download-excel
:fields="fields()"
:data="exportData"
type="xls"
:name="exportName"
:header="exportHeader"
:footer="exportFooter"
:fetch="createExportData"
worksheet="导出信息"
class="el-button el-button--primary el-button--medium">
{{ buttons.download }}
</download-excel>
</el-form-item>
</el-form>
<el-table
:height="height"
:data="transformOrderList"
border
v-loading="dataListLoading"
style="width: 100%;">
<el-table-column
header-align="center"
align="center"
width="120"
label="操作">
<template slot-scope="scope">
<a type="text" size="small" @click="transformPartModal(scope.row)"> {{ buttons.transformPartModal }}</a>
<a type="text" size="small" @click="showTransformedRollModal(scope.row)"> {{ buttons.showTransformedRollModal }}</a>
</template>
</el-table-column>
<el-table-column
v-for="(item,index) in transformOrderColumns" :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"
: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>
<!-- 转换物料的组件 -->
<comTransformPart ref="comTransformPart" :close-on-click-modal="false"
:visible.sync="showTransformPartFlag"
@refreshPageTables="refreshPageTables">
</comTransformPart>
<!-- 转换物料的卷列表组件 -->
<comShowTransformedRoll ref="comShowTransformedRoll" :close-on-click-modal="false"
:visible.sync="showTransformedRollFlag">
</comShowTransformedRoll>
</div>
</template>
<script>
/*组件*/
import comTransformPart from "./com_transform_part";/*转换物料*/
import comShowTransformedRoll from "./com_show_transformed_roll";/*展示转换物料卷列表*/
import {
searchSapTransformOrder,
} from "@/api/yieldReport/order_transform_part.js"
import {
searchFunctionButtonList,
} from "@/api/sysLanguage.js"
import {
saveTableDefaultList,
saveTableUser,
getTableDefaultListLanguage,
getTableUserListLanguage,
removerDefault,
removerUser
} from "@/api/table.js"
var functionId='102001007';
export default {
data() {
return {
queryTable: {
functionId: this.$route.meta.menuId,
tableId: "102001007Table",
languageCode: this.$i18n.locale
},
// table
queryTableUser: {
userId: this.$store.state.user.name,
functionId: this.$route.meta.menuId,
tableId: "102001007Table",
status: true,
languageCode: this.$i18n.locale
},
labels: {
site:'工厂编码:',
orderNo:'生产订单号:',
orderDate:'订单日期:',
to:'至:',
chooseDate:'选择日期',
slittedFlag:'是否已转换:',
all:'全部',
yes:'是',
no:'否',
},
buttons:{
search:'查询',
download:'导出',
transformPartModal:'转换',
showTransformedRollModal:'已转卷列表',
},
queryButton: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'button'
},
queryLabel: {
functionId: functionId,
table_id: '*',
languageCode: this.$i18n.locale,
objectType: 'label'
},
tagNo:'',
showTransformPartFlag: false,
showTransformedRollFlag: false,
currentRow: {},
// start
exportData: [],
exportName: "SAP分卷订单"+this.dayjs().format('YYYYMMDDHHmmss'),
exportHeader: ["SAP分卷订单"],
exportFooter: [],
// end
height: 200,
searchData: {
site: this.$store.state.user.site,
user: this.$store.state.user.name,
orderNo: '',
date1: '',
date2: '',
slittedFlag: 'N',
},
transformOrderList: [],
transformOrderColumns: [
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TableOrderNo',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "orderNo",
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: 102001007,
serialNumber: '102001007TableOrderDate',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "orderDate",
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: 102001007,
serialNumber: '102001007TablePlanReceiptDate',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "planReceiptDate",
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: 102001007,
serialNumber: '102001007TableStatus',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "status",
headerAlign: "center",
align: "left",
columnLabel: "订单状态",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TableOrderItemNo',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "orderItemNo",
headerAlign: "center",
align: "left",
columnLabel: "订单序号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TablePartNo',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "partNo",
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: 102001007,
serialNumber: '102001007TablePartDescription',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "partDescription",
headerAlign: "center",
align: "left",
columnLabel: "物料名称",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 300
},
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TableQuantity',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "quantity",
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: 102001007,
serialNumber: '102001007TableCancelledFlag',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "cancelledFlag",
headerAlign: "center",
align: "left",
columnLabel: "是否取消",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TableSAPOrderNo',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "sAPOrderNo",
headerAlign: "center",
align: "left",
columnLabel: "SAP订单识别号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 120
},
{
userId: this.$store.state.user.name,
functionId: 102001007,
serialNumber: '102001007TableSite',
tableId: "102001007Table",
tableName: "特殊订单表",
columnProp: "site",
headerAlign: "center",
align: "left",
columnLabel: "工厂编号",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 70
},
],
dataListLoading: false,
}
},
/*组件*/
components: {
comTransformPart, /*换物料*/
comShowTransformedRoll,/*展示转换物料卷列表*/
},
mounted() {
this.$nextTick(() => {
this.height = window.innerHeight - 138;
})
},
methods: {
//table
refreshPageTables() {
searchSapTransformOrder(this.searchData).then(({data}) => {
this.transformOrderList = data.rows
})
},
//excel
createExportData() {
return this.transformOrderList;
},
fields() {
let json = "{"
this.transformOrderColumns.forEach((item, index) => {
if (index == this.transformOrderColumns.length - 1) {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\""
} else {
json += "\"" + item.columnLabel + "\"" + ":" + "\"" + item.columnProp + "\"" + ","
}
})
json += "}"
let s = eval("(" + json + ")")
return s
},
// end
/*转换物料*/
transformPartModal(currentRow){
this.currentRow = currentRow;
//
this.$nextTick(() => {
this.showTransformPartFlag = true;
this.$refs.comTransformPart.init(this.currentRow);
});
},
/*转换物料*/
showTransformedRollModal(currentRow){
this.currentRow = currentRow;
//
this.$nextTick(() => {
this.showTransformedRollFlag = true;
this.$refs.comShowTransformedRoll.init(this.currentRow);
});
},
//
getMultiLanguageList() {
//
searchFunctionButtonList(this.queryButton).then(({data}) => {
if (data && data.code == 0) {
this.buttons = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
//
searchFunctionButtonList(this.queryLabel).then(({data}) => {
if (data && data.code == 0) {
this.labels = data.data
} else {
// saveButtonList(this.buttonList).then(({data}) => {
// })
}
});
},
//
getTableUserColumn() {
getTableUserListLanguage(this.queryTableUser).then(({data}) => {
if (data.rows.length > 0) {
//this.columnList = []
this.transformOrderColumns = data.rows
} else {
this.getColumnList()
}
})
},
// tableDefault
getColumnList() {
getTableDefaultListLanguage(this.queryTable).then(({data}) => {
if (!data.rows.length == 0) {
// this.showDefault = false
this.transformOrderColumns = data.rows
} else {
// this.showDefault = true
}
})
},
},
created() {
this.getMultiLanguageList()//
this.getTableUserColumn()
//
}
}
</script>
<style>
.el-textarea__inner {
padding: 5px 5px;
}
</style>
Loading…
Cancel
Save