|
|
@ -207,6 +207,39 @@ |
|
|
</span> |
|
|
</span> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="carrierNo" |
|
|
|
|
|
label="固定载具" |
|
|
|
|
|
min-width="120" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input |
|
|
|
|
|
v-model="scope.row.carrierNo" |
|
|
|
|
|
readonly |
|
|
|
|
|
placeholder="双击选择" |
|
|
|
|
|
@dblclick.native="openCarrierDialog(scope.$index)" |
|
|
|
|
|
style="cursor: pointer;"> |
|
|
|
|
|
</el-input> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="rowCount" |
|
|
|
|
|
label="排数" |
|
|
|
|
|
min-width="80" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input-number :controls="false" :step="0" v-model="scope.row.rowCount"></el-input-number> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="rollCount" |
|
|
|
|
|
label="卷数" |
|
|
|
|
|
min-width="80" |
|
|
|
|
|
align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-input-number :controls="false" :step="0" v-model="scope.row.rollCount"></el-input-number> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
</el-col> |
|
|
</el-col> |
|
|
</el-row> |
|
|
</el-row> |
|
|
@ -216,6 +249,64 @@ |
|
|
<el-button type="primary" @click="scheduleVisible = false">取消</el-button> |
|
|
<el-button type="primary" @click="scheduleVisible = false">取消</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
<!-- 固定载具选择对话框 --> |
|
|
|
|
|
<el-dialog title="固定载具清单" :close-on-click-modal="false" v-drag :visible.sync="carrierDialogVisible" width="720px"> |
|
|
|
|
|
<div class="rq"> |
|
|
|
|
|
<el-form :inline="true" label-position="top" :model="carrierSearchData"> |
|
|
|
|
|
<el-form-item label="标签条码"> |
|
|
|
|
|
<el-input v-model="carrierSearchData.carrierNo" clearable style="width: 150px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="载具类型名称"> |
|
|
|
|
|
<el-input v-model="carrierSearchData.carrierTypeName" clearable style="width: 150px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="规格描述"> |
|
|
|
|
|
<el-input v-model="carrierSearchData.specification" clearable style="width: 150px"></el-input> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label=" "> |
|
|
|
|
|
<el-button type="primary" @click="queryCarrierList">查询</el-button> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
</el-form> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:height="300" |
|
|
|
|
|
:data="carrierList" |
|
|
|
|
|
@row-dblclick="selectCarrier" |
|
|
|
|
|
border |
|
|
|
|
|
style="width: 100%;"> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="carrierNo" |
|
|
|
|
|
label="标签条码" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="100"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="carrierTypeName" |
|
|
|
|
|
label="载具类型名称" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="150"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="specification" |
|
|
|
|
|
label="规格描述" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="150"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column |
|
|
|
|
|
prop="dimensions" |
|
|
|
|
|
label="尺寸" |
|
|
|
|
|
header-align="center" |
|
|
|
|
|
align="left" |
|
|
|
|
|
min-width="100"> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
|
|
<el-button type="primary" @click="carrierDialogVisible=false">关闭</el-button> |
|
|
|
|
|
</el-footer> |
|
|
|
|
|
</el-dialog> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -231,6 +322,8 @@ import { |
|
|
batchScheduleOrderWithExpand |
|
|
batchScheduleOrderWithExpand |
|
|
} from '@/api/schedule/order_schedule_expand.js'; |
|
|
} from '@/api/schedule/order_schedule_expand.js'; |
|
|
|
|
|
|
|
|
|
|
|
import { getFixedCarrierList } from '@/api/yieldReport/com_separate_roll.js'; |
|
|
|
|
|
|
|
|
/*动态表头*/ |
|
|
/*动态表头*/ |
|
|
import { |
|
|
import { |
|
|
saveTableDefaultList, |
|
|
saveTableDefaultList, |
|
|
@ -271,6 +364,15 @@ export default { |
|
|
specifiedTime: 'N', |
|
|
specifiedTime: 'N', |
|
|
scheduleTime: '08:30', |
|
|
scheduleTime: '08:30', |
|
|
dataListSelections: [], |
|
|
dataListSelections: [], |
|
|
|
|
|
// 固定载具相关 |
|
|
|
|
|
carrierDialogVisible: false, // 固定载具对话框 |
|
|
|
|
|
carrierList: [], // 固定载具列表 |
|
|
|
|
|
carrierSearchData: { // 固定载具查询条件 |
|
|
|
|
|
carrierNo: '', |
|
|
|
|
|
carrierTypeName: '', |
|
|
|
|
|
specification: '' |
|
|
|
|
|
}, |
|
|
|
|
|
currentEditIndex: -1, // 当前编辑的行索引 |
|
|
scheduleColumnList: [ |
|
|
scheduleColumnList: [ |
|
|
{ |
|
|
{ |
|
|
userId: this.$store.state.user.name, |
|
|
userId: this.$store.state.user.name, |
|
|
@ -1278,7 +1380,10 @@ export default { |
|
|
site: item.site, |
|
|
site: item.site, |
|
|
specifiedTime: this.specifiedTime, |
|
|
specifiedTime: this.specifiedTime, |
|
|
username: this.$store.state.user.name, |
|
|
username: this.$store.state.user.name, |
|
|
workCenterNo: item.workCenterNo |
|
|
|
|
|
|
|
|
workCenterNo: item.workCenterNo, |
|
|
|
|
|
carrierNo: item.carrierNo || '', |
|
|
|
|
|
rowCount: item.rowCount || 0, |
|
|
|
|
|
rollCount: item.rollCount || 0 |
|
|
} |
|
|
} |
|
|
newItemList.push(newItem) |
|
|
newItemList.push(newItem) |
|
|
} |
|
|
} |
|
|
@ -1308,27 +1413,36 @@ export default { |
|
|
handleSelectionChange(val) { |
|
|
handleSelectionChange(val) { |
|
|
// 解析每个工单的可用机台字段 |
|
|
// 解析每个工单的可用机台字段 |
|
|
this.dataListSelections = val.map(item => { |
|
|
this.dataListSelections = val.map(item => { |
|
|
|
|
|
// 创建新对象以确保响应式 |
|
|
|
|
|
let newItem = Object.assign({}, item); |
|
|
|
|
|
|
|
|
// 解析availResource字段,格式如:ResourceID(ResourceDesc) ResourceID(ResourceDesc) |
|
|
// 解析availResource字段,格式如:ResourceID(ResourceDesc) ResourceID(ResourceDesc) |
|
|
if (item.availResource && item.availResource.trim()) { |
|
|
|
|
|
|
|
|
if (newItem.availResource && newItem.availResource.trim()) { |
|
|
// 匹配所有 ResourceID(ResourceDesc) 格式的字符串 |
|
|
// 匹配所有 ResourceID(ResourceDesc) 格式的字符串 |
|
|
const regex = /(\S+)\(([^)]+)\)/g; |
|
|
const regex = /(\S+)\(([^)]+)\)/g; |
|
|
const matches = []; |
|
|
const matches = []; |
|
|
let match; |
|
|
let match; |
|
|
while ((match = regex.exec(item.availResource)) !== null) { |
|
|
|
|
|
|
|
|
while ((match = regex.exec(newItem.availResource)) !== null) { |
|
|
matches.push({ |
|
|
matches.push({ |
|
|
resourceId: match[1], |
|
|
resourceId: match[1], |
|
|
resourceDesc: match[1] + '(' + match[2] + ')' |
|
|
resourceDesc: match[1] + '(' + match[2] + ')' |
|
|
}); |
|
|
}); |
|
|
} |
|
|
} |
|
|
item.availResourceList = matches; |
|
|
|
|
|
|
|
|
newItem.availResourceList = matches; |
|
|
// 如果当前没有选中机台,默认选择第一个 |
|
|
// 如果当前没有选中机台,默认选择第一个 |
|
|
if ((!item.resourceId || item.resourceId === '') && matches.length > 0) { |
|
|
|
|
|
item.resourceId = matches[0].resourceId; |
|
|
|
|
|
|
|
|
if ((!newItem.resourceId || newItem.resourceId === '') && matches.length > 0) { |
|
|
|
|
|
newItem.resourceId = matches[0].resourceId; |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
item.availResourceList = []; |
|
|
|
|
|
|
|
|
newItem.availResourceList = []; |
|
|
} |
|
|
} |
|
|
return item; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 初始化新增的字段(确保响应式) |
|
|
|
|
|
newItem.carrierNo = newItem.carrierNo || ''; |
|
|
|
|
|
newItem.rowCount = newItem.rowCount || 0; |
|
|
|
|
|
newItem.rollCount = newItem.rollCount || 0; |
|
|
|
|
|
|
|
|
|
|
|
return newItem; |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -1337,6 +1451,43 @@ export default { |
|
|
this.getShopOrderList(); |
|
|
this.getShopOrderList(); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*打开固定载具选择对话框*/ |
|
|
|
|
|
openCarrierDialog(index) { |
|
|
|
|
|
this.currentEditIndex = index; |
|
|
|
|
|
this.queryCarrierList(); |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*查询固定载具列表*/ |
|
|
|
|
|
queryCarrierList() { |
|
|
|
|
|
const params = { |
|
|
|
|
|
site: this.$store.state.user.site, |
|
|
|
|
|
carrierNo: this.carrierSearchData.carrierNo, |
|
|
|
|
|
carrierTypeName: this.carrierSearchData.carrierTypeName, |
|
|
|
|
|
specification: this.carrierSearchData.specification |
|
|
|
|
|
} |
|
|
|
|
|
getFixedCarrierList(params).then(({data}) => { |
|
|
|
|
|
if (data && data.code === 0) { |
|
|
|
|
|
this.carrierList = data.data |
|
|
|
|
|
this.carrierDialogVisible = true |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message.error(data.msg || '获取固定载具列表失败') |
|
|
|
|
|
} |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
this.$message.error('获取固定载具列表失败: ' + error.message) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
/*选中固定载具*/ |
|
|
|
|
|
selectCarrier(row) { |
|
|
|
|
|
if (this.currentEditIndex >= 0 && this.currentEditIndex < this.dataListSelections.length) { |
|
|
|
|
|
// 直接赋值 |
|
|
|
|
|
this.dataListSelections[this.currentEditIndex].carrierNo = row.carrierNo |
|
|
|
|
|
// 强制刷新视图 |
|
|
|
|
|
this.$forceUpdate() |
|
|
|
|
|
this.carrierDialogVisible = false |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
// 每页数 |
|
|
// 每页数 |
|
|
sizeChangeHandle (val) { |
|
|
sizeChangeHandle (val) { |
|
|
this.pageSize = val |
|
|
this.pageSize = val |
|
|
|