|
|
@ -124,8 +124,6 @@ |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
<el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -10px;"> |
|
|
<el-button @click="createOrderDetail()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'新增'}} |
|
|
<el-button @click="createOrderDetail()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'新增'}} |
|
|
</el-button> |
|
|
</el-button> |
|
|
<el-button @click="editOrderDetail()" type="primary" style="margin-left: 10px;margin-top: 0px">{{'编辑'}} |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</el-form> |
|
|
</el-form> |
|
|
<el-table |
|
|
<el-table |
|
|
:data="dataList2" |
|
|
:data="dataList2" |
|
|
@ -139,7 +137,7 @@ |
|
|
width="80" |
|
|
width="80" |
|
|
label="操作"> |
|
|
label="操作"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifySOSPlus(scope.row)">删除</a> |
|
|
|
|
|
|
|
|
<a type="text" size="small" @click="deleteNotifySOSPlus(scope.row)">删除</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
@ -179,7 +177,7 @@ |
|
|
<!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>--> |
|
|
<!-- <a type="text" size="small" @click="printLabel(scope.row)">打印标签</a>--> |
|
|
<!-- </template>--> |
|
|
<!-- </template>--> |
|
|
<!-- </el-table-column>--> |
|
|
<!-- </el-table-column>--> |
|
|
<el-table-column |
|
|
|
|
|
|
|
|
<!-- <el-table-column |
|
|
header-align="center" |
|
|
header-align="center" |
|
|
align="center" |
|
|
align="center" |
|
|
width="80" |
|
|
width="80" |
|
|
@ -188,7 +186,7 @@ |
|
|
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a> |
|
|
<a type="text" size="small" v-if="currentRow.status==='已下达'" @click="deleteNotifyMaterial(scope.row)">删除</a> |
|
|
|
|
|
|
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
</el-table-column>--> |
|
|
<el-table-column |
|
|
<el-table-column |
|
|
v-for="(item,index) in columnList3" :key="index" |
|
|
v-for="(item,index) in columnList3" :key="index" |
|
|
:sortable="item.columnSortable" |
|
|
:sortable="item.columnSortable" |
|
|
@ -835,16 +833,24 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
<el-row :gutter="20"> |
|
|
<el-row :gutter="20"> |
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-form-item :label="'工单/派工数量'"> |
|
|
|
|
|
<el-input v-model="orderDetailData.qtyRequired" disabled style="text-align: right" class="text-right"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-form-item :label="'此次领料数量'" > |
|
|
|
|
|
<el-input-number v-model="orderDetailData.issureQty" style="line-height: 20px;padding: 0;width: 100%" :controls="false" :step="0" :min="0" class="text-right"></el-input-number> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-form-item :label="'工单/派工数量'"> |
|
|
|
|
|
<el-input v-model="orderDetailData.qtyRequired" disabled style="text-align: right" |
|
|
|
|
|
class="text-right"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-form-item :label="'已申请领料总和'"> |
|
|
|
|
|
<el-input v-model="orderDetailData.alreadyApplyTotal" disabled style="text-align: right" |
|
|
|
|
|
class="text-right"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
<el-col :span="6"> |
|
|
|
|
|
<el-form-item :label="'此次领料数量'"> |
|
|
|
|
|
<el-input-number v-model="orderDetailData.issureQty" style="line-height: 20px;padding: 0;width: 100%" |
|
|
|
|
|
:controls="false" :step="0" :min="0" class="text-right"></el-input-number> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-col> |
|
|
<el-col :span="6"> |
|
|
<el-col :span="6"> |
|
|
<el-form-item :label="'要求发料时间'"> |
|
|
<el-form-item :label="'要求发料时间'"> |
|
|
<el-date-picker |
|
|
<el-date-picker |
|
|
@ -1127,7 +1133,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2ItemNo', |
|
|
serialNumber: '701002Table2ItemNo', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "itemNo", |
|
|
columnProp: "itemNo", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "right", |
|
|
align: "right", |
|
|
@ -1145,7 +1151,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2NeedDate', |
|
|
serialNumber: '701002Table2NeedDate', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "领料申请派工单子表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: 'needDate', |
|
|
columnProp: 'needDate', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1162,7 +1168,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2SOOrderNo', |
|
|
serialNumber: '701002Table2SOOrderNo', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "sOOrderNo", |
|
|
columnProp: "sOOrderNo", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1179,7 +1185,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2OpsItemNo', |
|
|
serialNumber: '701002Table2OpsItemNo', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "opsItemNo", |
|
|
columnProp: "opsItemNo", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "right", |
|
|
align: "right", |
|
|
@ -1196,7 +1202,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2ItemDesc', |
|
|
serialNumber: '701002Table2ItemDesc', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "itemDesc", |
|
|
columnProp: "itemDesc", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1213,7 +1219,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2SeqNo', |
|
|
serialNumber: '701002Table2SeqNo', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "seqNo", |
|
|
columnProp: "seqNo", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1230,7 +1236,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2FGPartNo', |
|
|
serialNumber: '701002Table2FGPartNo', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "fGPartNo", |
|
|
columnProp: "fGPartNo", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1247,7 +1253,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2PartDesc', |
|
|
serialNumber: '701002Table2PartDesc', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "partDesc", |
|
|
columnProp: "partDesc", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
@ -1263,13 +1269,13 @@ |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2LocationNo', |
|
|
|
|
|
|
|
|
serialNumber: '701002Table2ResourceId', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "领料申请派工单子表", |
|
|
|
|
|
columnProp: 'locationNo', |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
|
|
|
columnProp: 'resourceId', |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "left", |
|
|
align: "left", |
|
|
columnLabel: '库位编码', |
|
|
|
|
|
|
|
|
columnLabel: '机台', |
|
|
columnHidden: false, |
|
|
columnHidden: false, |
|
|
columnImage: false, |
|
|
columnImage: false, |
|
|
columnSortable: false, |
|
|
columnSortable: false, |
|
|
@ -1284,7 +1290,7 @@ |
|
|
functionId: 701002, |
|
|
functionId: 701002, |
|
|
serialNumber: '701002Table2IssureQty', |
|
|
serialNumber: '701002Table2IssureQty', |
|
|
tableId: "701002Table2", |
|
|
tableId: "701002Table2", |
|
|
tableName: "申请单派工单明细表", |
|
|
|
|
|
|
|
|
tableName: "申请单工单信息明细表", |
|
|
columnProp: "issureQty", |
|
|
columnProp: "issureQty", |
|
|
headerAlign: "center", |
|
|
headerAlign: "center", |
|
|
align: "right", |
|
|
align: "right", |
|
|
@ -1854,6 +1860,7 @@ |
|
|
workCenterNo:'', |
|
|
workCenterNo:'', |
|
|
itemNo:0, |
|
|
itemNo:0, |
|
|
materialType:'BOM物料', |
|
|
materialType:'BOM物料', |
|
|
|
|
|
alreadyApplyTotal: 0 |
|
|
}, |
|
|
}, |
|
|
chooseSOSModalFlag: false, |
|
|
chooseSOSModalFlag: false, |
|
|
chooseSOSData: { |
|
|
chooseSOSData: { |
|
|
@ -2608,60 +2615,45 @@ |
|
|
itemNo: 0, |
|
|
itemNo: 0, |
|
|
workCenterNo: '', |
|
|
workCenterNo: '', |
|
|
needDate: '', |
|
|
needDate: '', |
|
|
materialType: 'BOM物料' |
|
|
|
|
|
|
|
|
materialType: 'BOM物料', |
|
|
|
|
|
alreadyApplyTotal: 0 |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
this.saveOrderDetailFlag = true |
|
|
this.saveOrderDetailFlag = true |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//编辑派工单明细 |
|
|
|
|
|
editOrderDetail(){ |
|
|
|
|
|
// 检查是否选择了明细行 |
|
|
|
|
|
if (!this.dataList2 || this.dataList2.length === 0) { |
|
|
|
|
|
this.$alert('请先选择一条明细记录!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
saveIssueNoOrderDetail(){ |
|
|
saveIssueNoOrderDetail(){ |
|
|
// 数据验证 |
|
|
// 数据验证 |
|
|
// 非BOM物料时,只校验领取数量和要求发料时间 |
|
|
// 非BOM物料时,只校验领取数量和要求发料时间 |
|
|
if (this.orderDetailData.materialType === 'BOM物料') { |
|
|
if (this.orderDetailData.materialType === 'BOM物料') { |
|
|
if (!this.orderDetailData.orderNo ) { |
|
|
if (!this.orderDetailData.orderNo ) { |
|
|
this.$alert('请选择工单或者派工单!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$message.error('请选择工单或者派工单'); |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
if (!this.orderDetailData.itemNo) { |
|
|
if (!this.orderDetailData.itemNo) { |
|
|
this.$alert('请选择工序!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$message.error('请选择工序'); |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
//校验如果是BOM物料的话,领料数量不能大于工单数量 |
|
|
//校验如果是BOM物料的话,领料数量不能大于工单数量 |
|
|
if (this.orderDetailData.issureQty > this.orderDetailData.qtyRequired){ |
|
|
if (this.orderDetailData.issureQty > this.orderDetailData.qtyRequired){ |
|
|
this.$alert('领取数量不可大于工单/派工数量!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$message.error('领取数量不可大于工单/派工数量!'); |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//校验如果是BOM物料的话,领料数量不能大于工单数量 |
|
|
|
|
|
if ((this.orderDetailData.issureQty + this.orderDetailData.alreadyApplyTotal) > this.orderDetailData.qtyRequired){ |
|
|
|
|
|
this.$message.error('申请总和不可超出工单/派工数量!'); |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!this.orderDetailData.needDate) { |
|
|
if (!this.orderDetailData.needDate) { |
|
|
this.$alert('请选择要求发料时间!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$message.error('请选择要求发料时间'); |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (!this.orderDetailData.issureQty || this.orderDetailData.issureQty <= 0) { |
|
|
if (!this.orderDetailData.issureQty || this.orderDetailData.issureQty <= 0) { |
|
|
this.$alert('请填写领取数量!', '提示', { |
|
|
|
|
|
confirmButtonText: '确定' |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
this.$message.error('请填写领取数量'); |
|
|
return false |
|
|
return false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -2720,7 +2712,8 @@ |
|
|
itemNo: 0, |
|
|
itemNo: 0, |
|
|
workCenterNo: '', |
|
|
workCenterNo: '', |
|
|
needDate: '', |
|
|
needDate: '', |
|
|
materialType: 'BOM物料' |
|
|
|
|
|
|
|
|
materialType: 'BOM物料', |
|
|
|
|
|
alreadyApplyTotal: 0 |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
this.$alert(data.msg || '保存失败', '错误', { |
|
|
this.$alert(data.msg || '保存失败', '错误', { |
|
|
@ -2788,6 +2781,7 @@ |
|
|
this.orderDetailData.itemNo = ''; |
|
|
this.orderDetailData.itemNo = ''; |
|
|
this.orderDetailData.workCenterNo = ''; |
|
|
this.orderDetailData.workCenterNo = ''; |
|
|
this.orderDetailData.issureQty = 0; |
|
|
this.orderDetailData.issureQty = 0; |
|
|
|
|
|
this.orderDetailData.alreadyApplyTotal = 0; |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
//派工单选择部分 |
|
|
//派工单选择部分 |
|
|
@ -2870,6 +2864,7 @@ |
|
|
this.orderDetailData.partDesc = row.partDesc || ''; |
|
|
this.orderDetailData.partDesc = row.partDesc || ''; |
|
|
this.orderDetailData.partNo = row.partNo || ''; |
|
|
this.orderDetailData.partNo = row.partNo || ''; |
|
|
this.orderDetailData.workCenterNo = row.sWorkcenterno || ''; |
|
|
this.orderDetailData.workCenterNo = row.sWorkcenterno || ''; |
|
|
|
|
|
this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0; |
|
|
this.orderDetailData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
this.orderDetailData.needDate = this.dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
|
|
|
|
// 根据物料类型设置 |
|
|
// 根据物料类型设置 |
|
|
@ -2957,6 +2952,7 @@ |
|
|
this.orderDetailData.partNo = row.partNo || ''; |
|
|
this.orderDetailData.partNo = row.partNo || ''; |
|
|
this.orderDetailData.partDesc = row.partDescription || ''; |
|
|
this.orderDetailData.partDesc = row.partDescription || ''; |
|
|
this.orderDetailData.qtyRequired = row.lotSize || ''; |
|
|
this.orderDetailData.qtyRequired = row.lotSize || ''; |
|
|
|
|
|
this.orderDetailData.alreadyApplyTotal = row.alreadyApplyTotal || 0; |
|
|
|
|
|
|
|
|
// 清空相关字段 |
|
|
// 清空相关字段 |
|
|
this.orderDetailData.seqNo = ''; |
|
|
this.orderDetailData.seqNo = ''; |
|
|
|