+ width="755px" style="height: 560px;" class="customer-dialog">
-
@@ -107,6 +134,7 @@
import Chooselist from '@/views/modules/common/Chooselist';/*列表组件*/
/*js请求*/
import {
+ getSplitOrderParts,/*获取分切工单的物料信息*/
refreshCurrentPageData,
refreshCurrentPageTable,
checkCreateSeparateRoll,/*检查是否可以创建分卷*/
@@ -136,6 +164,7 @@ export default {
supplierName: '',
rollQty: 0,
rollNums: 1,
+ bomItemNo: 0,
splitType: 'S'
},
operatorData: {
@@ -147,14 +176,89 @@ export default {
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: '',
+ 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: '',
+ 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: '',
+ columnHidden: false,
+ columnImage: false,
+ columnSortable: false,
+ sortLv: 0,
+ status: true,
+ fixed: false
+ },
+ ],
sfdcMaterialList: [],
columnMaterialArray: [
{
userId: this.$store.state.user.name,
functionId: 5303,
- serialNumber: '5303MaterialRollNo',
- tableId: "5303Material",
- tableName: "材料",
+ serialNumber: '5309PartRollNo',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "rollNo",
headerAlign: "center",
align: "center",
@@ -170,9 +274,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialRollQty',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartRollQty',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "rollQty",
headerAlign: "center",
align: "center",
@@ -188,9 +292,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialSuppDeliveryNote',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartSuppDeliveryNote',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "suppDeliveryNote",
headerAlign: "center",
align: "center",
@@ -206,9 +310,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialRollDate',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartRollDate',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "rollDate",
headerAlign: "center",
align: "center",
@@ -224,9 +328,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialCreatedDate',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartCreatedDate',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "createdDate",
headerAlign: "center",
align: "center",
@@ -242,9 +346,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialCreatedBy',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartCreatedBy',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "createdBy",
headerAlign: "center",
align: "right",
@@ -260,9 +364,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialSuppRollNoFlag',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartSuppRollNoFlag',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "suppRollNoFlag",
headerAlign: "center",
align: "right",
@@ -278,9 +382,9 @@ export default {
{
userId: this.$store.state.user.name,
functionId: 5305,
- serialNumber: '5305MaterialSuppRollNo',
- tableId: "5305Material",
- tableName: "材料",
+ serialNumber: '5309PartSuppRollNo',
+ tableId: "5309Part",
+ tableName: "分切工单",
columnProp: "suppRollNo",
headerAlign: "center",
align: "center",
@@ -303,105 +407,116 @@ export default {
},
methods: {
/*初始化页面参数*/
- init(scheduleData, operatorData) {
+ init (scheduleData, operatorData) {
//设置参数
- this.pageData.partNo = scheduleData.partNo;
- this.pageData.partDesc = scheduleData.partDesc;
- this.pageData.orderNo = scheduleData.orderNo;
- this.pageData.itemNo = scheduleData.itemNo;
- this.pageData.seqNo = scheduleData.seqNo;
- this.pageData.rollNo = scheduleData.rollNo;
- this.pageData.operatorId = operatorData.operatorId;
- this.pageData.customerId = '无';
- this.pageData.customerName = '';
- this.pageData.fgPartNo = '无';
- this.pageData.fgPartDesc = '';
- this.pageData.supplierId = '*';
- this.pageData.supplierName = '';
+ this.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.sfdcMaterialList = [];
+ this.sfdcMaterialList = []
//初始化操作员对象
- this.operatorData = JSON.parse(JSON.stringify(operatorData));
+ this.operatorData = JSON.parse(JSON.stringify(operatorData))
//初始化标题
- this.titleCon = '创建分卷';
+ this.titleCon = '创建分卷'
+ //刷新分切工单的物料信息
+ this.refreshSplitOrderParts();
//刷新当前派工单的信息
- this.refreshPageData();
+ this.refreshPageData()
},
/*关闭modal*/
- closeDialog(){
- this.$emit('update:visible', false);
+ closeDialog () {
+ this.$emit('update:visible', false)
+ },
+
+ /*刷新分期工单的*/
+ refreshSplitOrderParts () {
+ getSplitOrderParts(this.pageData).then(({data}) => {
+ this.orderPartList = data.rows;
+ setTimeout(() => {
+ this.$refs.orderPartTable.setCurrentRow(this.orderPartList[0]);
+ }, 300)
+ });
},
/*刷新当前的页面参数*/
- refreshPageData(){
+ refreshPageData () {
//获取页面显示的参数
- this.getCurrentPageData();
+ this.getCurrentPageData()
//刷新页面的table数据
- this.getCurrentPageTable();
+ this.getCurrentPageTable()
},
//获取当前页面的参数
- getCurrentPageData(){
+ 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;
- });
+ 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(){
+ getCurrentPageTable () {
refreshCurrentPageTable(this.pageData).then(({data}) => {
- this.sfdcMaterialList = data.rows;
- });
+ 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;
+ 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();
+ this.getCurrentPageData()
},
// 获取基础数据列表
- getBaseList(val){
+ getBaseList (val) {
this.tagNo = val
this.$nextTick(() => {
- let strVal = "";
- if (val === 92){
- strVal = this.pageData.customerId;
- }else if(val === 5){
- strVal = this.pageData.fgPartNo;
+ 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 () {
//调用创建分卷的方法
checkCreateSeparateRoll(this.pageData).then(({data}) => {
//判断操作是否成功
- if(data.code == 500){
- this.$message.error(data.msg);
- }else{
+ if (data.code == 500) {
+ this.$message.error(data.msg)
+ } else {
//调用创建分卷的方法
- this.createSeparateRollBun();
+ this.createSeparateRollBun()
}
- });
+ })
},
/*处理材料下料的记录*/
@@ -452,12 +567,23 @@ export default {
})
},
-
+ /*触发修改的时间*/
+ changePartRow(row, oldRow){
+ //判断是否是获取焦点的事件
+ if(row){
+ this.pageData.partNo = row.partNo;
+ this.pageData.partDesc = row.partDesc;
+ //触发刷新当前页面参数的操作
+ this.refreshPageData();
+ }
+ },
},
+
created() {
- //
- }
+ //刷新分切工单的物料信息
+ //this.refreshSplitOrderParts();
+ },
}
diff --git a/src/views/modules/yieldReport/com_split_order_switch_roll.vue b/src/views/modules/yieldReport/com_split_order_switch_roll.vue
index ca54d34..e52d1f1 100644
--- a/src/views/modules/yieldReport/com_split_order_switch_roll.vue
+++ b/src/views/modules/yieldReport/com_split_order_switch_roll.vue
@@ -29,7 +29,7 @@ import comExceptionReason from "./com_exception_reason";//异常远远
/*添加js的方法和请求*/
import {
checkSplitScheduleSwitchRoll,/*校验是否可以切换卷*/
- switchSfdcRoll,/*执行切换卷的操作*/
+ splitScheduleSwitchRoll,/*执行切换卷的操作*/
} from '@/api/yieldReport/com_switch_roll.js'
export default {
name: "com_merge_roll",
@@ -149,7 +149,7 @@ export default {
/*执行切换卷的操作*/
switchRollOperation() {
//处理信息
- switchSfdcRoll(this.pageData).then(({data}) => {
+ splitScheduleSwitchRoll(this.pageData).then(({data}) => {
//判断操作是否成功
if (data.code === 200) {
//关闭当前的页面