|
|
@ -19,6 +19,18 @@ |
|
|
<el-form-item label="打样单号"> |
|
|
<el-form-item label="打样单号"> |
|
|
<el-input v-model="searchData.proofingNo" clearable placeholder="请输入打样单号" style="width: 150px" /> |
|
|
<el-input v-model="searchData.proofingNo" clearable placeholder="请输入打样单号" style="width: 150px" /> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="项目/物料同步"> |
|
|
|
|
|
<el-select v-model="searchData.projectPartSyncFlag" clearable placeholder="全部" style="width: 120px"> |
|
|
|
|
|
<el-option label="已同步" value="Y" /> |
|
|
|
|
|
<el-option label="未同步" value="N" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
|
|
|
<el-form-item label="打样单同步"> |
|
|
|
|
|
<el-select v-model="searchData.proofSyncFlag" clearable placeholder="全部" style="width: 120px"> |
|
|
|
|
|
<el-option label="已同步" value="Y" /> |
|
|
|
|
|
<el-option label="未同步" value="N" /> |
|
|
|
|
|
</el-select> |
|
|
|
|
|
</el-form-item> |
|
|
<el-form-item label="打样状态"> |
|
|
<el-form-item label="打样状态"> |
|
|
<el-select v-model="searchData.proofingStatus" clearable placeholder="全部" style="width: 120px"> |
|
|
<el-select v-model="searchData.proofingStatus" clearable placeholder="全部" style="width: 120px"> |
|
|
<el-option label="进行中" value="进行中" /> |
|
|
<el-option label="进行中" value="进行中" /> |
|
|
@ -31,11 +43,10 @@ |
|
|
<el-form-item class="button-group-col"> |
|
|
<el-form-item class="button-group-col"> |
|
|
<el-row :gutter="8" type="flex" class="button-row" > |
|
|
<el-row :gutter="8" type="flex" class="button-row" > |
|
|
<el-button type="primary" @click="openOneKeyDialog">一键创建</el-button> |
|
|
<el-button type="primary" @click="openOneKeyDialog">一键创建</el-button> |
|
|
<el-button type="warning" plain @click="openOneKeyDialog('edit')">一键修改</el-button> |
|
|
|
|
|
<el-button type="warning" @click="toggleBatchEdit">{{ batchEditMode ? '取消修改' : '批量修改' }}</el-button> |
|
|
|
|
|
<el-button v-if="batchEditMode" type="success" @click="saveBatchPlan">保存修改</el-button> |
|
|
|
|
|
<el-button type="primary" @click="openCreateProofDialog()">新增打样</el-button> |
|
|
|
|
|
<el-button type="success" :loading="syncNpiLoading" @click="syncToNpi()">同步项目物料到NPI</el-button> |
|
|
|
|
|
|
|
|
<!-- <el-button type="warning" @click="toggleBatchEdit">{{ batchEditMode ? '取消修改' : '批量修改' }}</el-button> |
|
|
|
|
|
<el-button v-if="batchEditMode" type="success" @click="saveBatchPlan">保存修改</el-button>--> |
|
|
|
|
|
<el-button type="warning" @click="openCreateProofDialog()">新增打样</el-button> |
|
|
|
|
|
<el-button type="success" plain :loading="syncNpiLoading" @click="syncToNpi()">同步项目物料到NPI</el-button> |
|
|
<el-button type="success" plain :loading="syncProofLoading" @click="syncProofToNpi()">同步打样到NPI</el-button> |
|
|
<el-button type="success" plain :loading="syncProofLoading" @click="syncProofToNpi()">同步打样到NPI</el-button> |
|
|
</el-row> |
|
|
</el-row> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
@ -53,16 +64,36 @@ |
|
|
style="width: 100%; margin-top: 8px" |
|
|
style="width: 100%; margin-top: 8px" |
|
|
> |
|
|
> |
|
|
<!-- <el-table-column type="selection" width="45" />--> |
|
|
<!-- <el-table-column type="selection" width="45" />--> |
|
|
<el-table-column prop="projectNo" label="项目编码" width="90" show-overflow-tooltip /> |
|
|
|
|
|
<el-table-column prop="projectDesc" label="项目描述" width="120" show-overflow-tooltip /> |
|
|
|
|
|
<el-table-column prop="testPartNo" label="项目物料" width="90" show-overflow-tooltip /> |
|
|
|
|
|
<el-table-column prop="partDesc" label="物料描述" :fixed="'left'" width="150" show-overflow-tooltip /> |
|
|
|
|
|
|
|
|
<el-table-column prop="projectNo" label="项目编码" width="90" show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="getProjectPartSyncTextClass(scope.row)">{{ scope.row.projectNo || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="projectDesc" label="项目描述" width="120" show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="getProjectPartSyncTextClass(scope.row)">{{ scope.row.projectDesc || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="testPartNo" label="项目物料" width="90" show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="getProjectPartSyncTextClass(scope.row)">{{ scope.row.testPartNo || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="partDesc" label="物料描述" :fixed="'left'" width="150" show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="getProjectPartSyncTextClass(scope.row)">{{ scope.row.partDesc || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<!-- <el-table-column prop="customerNo" label="客户编码" width="110" show-overflow-tooltip /> |
|
|
<!-- <el-table-column prop="customerNo" label="客户编码" width="110" show-overflow-tooltip /> |
|
|
<el-table-column prop="customerDesc" label="客户名称" width="130" show-overflow-tooltip />--> |
|
|
<el-table-column prop="customerDesc" label="客户名称" width="130" show-overflow-tooltip />--> |
|
|
<el-table-column prop="proofingNo" label="打样单号" width="90" show-overflow-tooltip /> |
|
|
|
|
|
|
|
|
<el-table-column prop="proofingNo" label="打样单号" width="90" show-overflow-tooltip> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span :class="getProofSyncTextClass(scope.row)">{{ scope.row.proofingNo || '-' }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
<el-table-column prop="proofingStatus" label="打样状态" width="60"> |
|
|
<el-table-column prop="proofingStatus" label="打样状态" width="60"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<a :style="{color: (scope.row.proofingStatus === '打样完成' || scope.row.proofingStatus === '打样结束') ? '#67c23a' : '#e6a23c'}"> |
|
|
|
|
|
|
|
|
<a :style="{color: (scope.row.proofingStatus === '打样完成' || scope.row.proofingStatus === '打样结束') ? '#67c23a' : '#046e97'}"> |
|
|
{{ scope.row.proofingStatus || '进行中' }}</a> |
|
|
{{ scope.row.proofingStatus || '进行中' }}</a> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
@ -155,10 +186,11 @@ |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column label="操作" fixed="right" width="120" align="center"> |
|
|
|
|
|
|
|
|
<el-table-column label="操作" fixed="right" width="150" align="center"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- <a class="action-link" @click="syncToNpi(scope.row)">同步NPI</a>--> |
|
|
<!-- <a class="action-link" @click="syncToNpi(scope.row)">同步NPI</a>--> |
|
|
<!-- <a class="action-link" @click="openCreateProofDialog(scope.row)">新增打样</a>--> |
|
|
<!-- <a class="action-link" @click="openCreateProofDialog(scope.row)">新增打样</a>--> |
|
|
|
|
|
<a @click="openOneKeyDialog('edit', scope.row)">修改</a> |
|
|
<a class="action-link delete-link" @click="deleteProof(scope.row)">删除</a> |
|
|
<a class="action-link delete-link" @click="deleteProof(scope.row)">删除</a> |
|
|
<a class="action-link end-link" v-if="scope.row.proofingStatus !== '打样完成'" @click="finishProof(scope.row)">打样完成</a> |
|
|
<a class="action-link end-link" v-if="scope.row.proofingStatus !== '打样完成'" @click="finishProof(scope.row)">打样完成</a> |
|
|
</template> |
|
|
</template> |
|
|
@ -809,6 +841,8 @@ export default { |
|
|
partDesc: '', |
|
|
partDesc: '', |
|
|
customerNo: '', |
|
|
customerNo: '', |
|
|
proofingNo: '', |
|
|
proofingNo: '', |
|
|
|
|
|
projectPartSyncFlag: '', |
|
|
|
|
|
proofSyncFlag: '', |
|
|
proofingStatus: '' |
|
|
proofingStatus: '' |
|
|
}, |
|
|
}, |
|
|
processColumns: [ |
|
|
processColumns: [ |
|
|
@ -1333,6 +1367,8 @@ export default { |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.customerNo = '' |
|
|
this.searchData.customerNo = '' |
|
|
this.searchData.proofingNo = '' |
|
|
this.searchData.proofingNo = '' |
|
|
|
|
|
this.searchData.projectPartSyncFlag = '' |
|
|
|
|
|
this.searchData.proofSyncFlag = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
this.getDataList('Y') |
|
|
this.getDataList('Y') |
|
|
}, |
|
|
}, |
|
|
@ -1432,6 +1468,35 @@ export default { |
|
|
} |
|
|
} |
|
|
return row.projectPartId || row.project_part_id || null |
|
|
return row.projectPartId || row.project_part_id || null |
|
|
}, |
|
|
}, |
|
|
|
|
|
isSyncedByIdRule (idValue) { |
|
|
|
|
|
if (idValue == null || String(idValue).trim() === '') { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
// 约定:NPI 正式库主键 < 100000,tracking 临时主键 >= 100000。 |
|
|
|
|
|
const numericId = Number(idValue) |
|
|
|
|
|
return Number.isFinite(numericId) && numericId > 0 && numericId < 100000 |
|
|
|
|
|
}, |
|
|
|
|
|
isProjectPartSynced (row) { |
|
|
|
|
|
if (!row) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
const projectId = row.projectId || row.project_id || null |
|
|
|
|
|
const projectPartId = this.getTrackingProjectPartId(row) |
|
|
|
|
|
return this.isSyncedByIdRule(projectId) && this.isSyncedByIdRule(projectPartId) |
|
|
|
|
|
}, |
|
|
|
|
|
isProofSynced (row) { |
|
|
|
|
|
if (!row) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
const proofingId = row.proofingId || row.proofing_id || row.trackingId || null |
|
|
|
|
|
return this.isSyncedByIdRule(proofingId) |
|
|
|
|
|
}, |
|
|
|
|
|
getProjectPartSyncTextClass (row) { |
|
|
|
|
|
return this.isProjectPartSynced(row) ? 'sync-text--ok' : 'sync-text--pending' |
|
|
|
|
|
}, |
|
|
|
|
|
getProofSyncTextClass (row) { |
|
|
|
|
|
return this.isProofSynced(row) ? 'sync-text--ok' : 'sync-text--pending' |
|
|
|
|
|
}, |
|
|
getProjectCategoryValue (source) { |
|
|
getProjectCategoryValue (source) { |
|
|
if (!source) { |
|
|
if (!source) { |
|
|
return '' |
|
|
return '' |
|
|
@ -1608,7 +1673,7 @@ export default { |
|
|
form.cQualityEngineer7Name = this.getRoleDisplayName(form.cQualityEngineer7) |
|
|
form.cQualityEngineer7Name = this.getRoleDisplayName(form.cQualityEngineer7) |
|
|
return form |
|
|
return form |
|
|
}, |
|
|
}, |
|
|
openOneKeyDialog (mode) { |
|
|
|
|
|
|
|
|
openOneKeyDialog (mode, row) { |
|
|
const dialogMode = mode === 'edit' ? 'edit' : 'create' |
|
|
const dialogMode = mode === 'edit' ? 'edit' : 'create' |
|
|
this.oneKeyDialogMode = dialogMode |
|
|
this.oneKeyDialogMode = dialogMode |
|
|
if (dialogMode !== 'edit') { |
|
|
if (dialogMode !== 'edit') { |
|
|
@ -1619,7 +1684,7 @@ export default { |
|
|
this.oneKeyDialogVisible = true |
|
|
this.oneKeyDialogVisible = true |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
const current = this.getActionRow() |
|
|
|
|
|
|
|
|
const current = this.getActionRow(row) |
|
|
if (!current) { |
|
|
if (!current) { |
|
|
this.$message.warning('请先选择一条记录后再修改项目/物料/打样') |
|
|
this.$message.warning('请先选择一条记录后再修改项目/物料/打样') |
|
|
this.oneKeyDialogMode = 'create' |
|
|
this.oneKeyDialogMode = 'create' |
|
|
@ -1707,6 +1772,8 @@ export default { |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.partDesc = '' |
|
|
this.searchData.customerNo = '' |
|
|
this.searchData.customerNo = '' |
|
|
this.searchData.proofingNo = '' |
|
|
this.searchData.proofingNo = '' |
|
|
|
|
|
this.searchData.projectPartSyncFlag = '' |
|
|
|
|
|
this.searchData.proofSyncFlag = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
this.searchData.proofingStatus = '' |
|
|
this.getDataList('Y') |
|
|
this.getDataList('Y') |
|
|
} else { |
|
|
} else { |
|
|
@ -2492,6 +2559,15 @@ export default { |
|
|
color: #35b4b4; |
|
|
color: #35b4b4; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sync-text--ok { |
|
|
|
|
|
color: #67c23a; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.sync-text--pending { |
|
|
|
|
|
color: #e6a23c; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.process-cell { |
|
|
.process-cell { |
|
|
background: #fff; |
|
|
background: #fff; |
|
|
min-height: 44px; |
|
|
min-height: 44px; |
|
|
@ -2617,6 +2693,10 @@ export default { |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.edit-link { |
|
|
|
|
|
color: #e6a23c; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.delete-link { |
|
|
.delete-link { |
|
|
color: #f56c6c; |
|
|
color: #f56c6c; |
|
|
} |
|
|
} |
|
|
|