|
|
@ -143,7 +143,13 @@ |
|
|
class="el-icon-success project-part-sync-icon" |
|
|
class="el-icon-success project-part-sync-icon" |
|
|
aria-hidden="true" |
|
|
aria-hidden="true" |
|
|
></i> |
|
|
></i> |
|
|
{{ getTrackingColumnDisplayValue(scope.row, item.columnProp) }} |
|
|
|
|
|
|
|
|
<a |
|
|
|
|
|
v-if="canOpenNpiFromTracking(scope.row, item.columnProp)" |
|
|
|
|
|
class="npi-jump-link" |
|
|
|
|
|
href="javascript:void(0)" |
|
|
|
|
|
@click.stop="openNpiFromTracking(item.columnProp, scope.row)" |
|
|
|
|
|
>{{ getTrackingColumnDisplayValue(scope.row, item.columnProp) }}</a> |
|
|
|
|
|
<span v-else>{{ getTrackingColumnDisplayValue(scope.row, item.columnProp) }}</span> |
|
|
</span> |
|
|
</span> |
|
|
<a |
|
|
<a |
|
|
v-else-if="item.columnProp === 'proofingStatus'" |
|
|
v-else-if="item.columnProp === 'proofingStatus'" |
|
|
@ -470,7 +476,7 @@ |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
<el-dialog :title="oneKeyDialogTitle" :visible.sync="oneKeyDialogVisible" :close-on-click-modal="false" width="1000px"> |
|
|
<el-dialog :title="oneKeyDialogTitle" :visible.sync="oneKeyDialogVisible" :close-on-click-modal="false" width="1000px"> |
|
|
<el-form :model="oneKeyForm" label-position="top" :class="['one-key-grid-form', { 'one-key-grid-form--detail': isOneKeyDetailMode }]"> |
|
|
|
|
|
|
|
|
<el-form :model="oneKeyForm" label-position="top" class="one-key-grid-form"> |
|
|
<el-row :gutter="16"> |
|
|
<el-row :gutter="16"> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('buNo')"> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('buNo')"> |
|
|
<el-form-item label="BU" required> |
|
|
<el-form-item label="BU" required> |
|
|
@ -522,7 +528,7 @@ |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="12" v-show="isOneKeyCreateFieldVisible('customerDesc')"> |
|
|
<el-col :span="12" v-show="isOneKeyCreateFieldVisible('customerDesc')"> |
|
|
<el-form-item label="客户名称"> |
|
|
<el-form-item label="客户名称"> |
|
|
<el-input v-model="oneKeyForm.customerDesc" disabled style="width: 100%"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="oneKeyForm.customerDesc" :disabled="!isOneKeyDetailMode" style="width: 100%"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('cProjectRegion')"> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('cProjectRegion')"> |
|
|
@ -621,7 +627,7 @@ |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('projectManager')"> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('projectManager')"> |
|
|
<el-form-item> |
|
|
<el-form-item> |
|
|
<span slot="label" class="big-label"><a href="javascript:void(0)" @click="openRoleDialog('projectManager')">PM/Sales</a></span> |
|
|
<span slot="label" class="big-label"><a href="javascript:void(0)" @click="openRoleDialog('projectManager')">PM/Sales</a></span> |
|
|
<el-input v-model="oneKeyForm.projectManagerName" disabled style="width: 100%"></el-input> |
|
|
|
|
|
|
|
|
<el-input v-model="oneKeyForm.projectManagerName" :disabled="!isOneKeyDetailMode" style="width: 100%"></el-input> |
|
|
</el-form-item> |
|
|
</el-form-item> |
|
|
</el-col> |
|
|
</el-col> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('projectOwner')"> |
|
|
<el-col :span="6" v-show="isOneKeyCreateFieldVisible('projectOwner')"> |
|
|
@ -1843,6 +1849,53 @@ export default { |
|
|
isSyncIconTrackingColumn (columnProp) { |
|
|
isSyncIconTrackingColumn (columnProp) { |
|
|
return ['projectNo', 'testPartNo', 'proofingNo'].indexOf(columnProp) > -1 |
|
|
return ['projectNo', 'testPartNo', 'proofingNo'].indexOf(columnProp) > -1 |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 仅已同步到 NPI 的项目编码/项目物料可跳转,避免临时 tracking 主键误进正式库页面。 |
|
|
|
|
|
canOpenNpiFromTracking (row, columnProp) { |
|
|
|
|
|
if (!row || this.isBlankValue(this.getTrackingColumnDisplayValue(row, columnProp))) { |
|
|
|
|
|
return false |
|
|
|
|
|
} |
|
|
|
|
|
if (columnProp === 'projectNo') { |
|
|
|
|
|
return this.isSyncedByIdRule(row.projectId || row.project_id) |
|
|
|
|
|
} |
|
|
|
|
|
if (columnProp === 'testPartNo') { |
|
|
|
|
|
return this.isSyncedByIdRule(this.getTrackingProjectPartId(row)) |
|
|
|
|
|
} |
|
|
|
|
|
return false |
|
|
|
|
|
}, |
|
|
|
|
|
openNpiFromTracking (columnProp, row) { |
|
|
|
|
|
if (!this.canOpenNpiFromTracking(row, columnProp)) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (columnProp === 'projectNo') { |
|
|
|
|
|
this.openNpiTab('eam-eamProjectInfo', { |
|
|
|
|
|
projectNo: this.getTrackingColumnDisplayValue(row, 'projectNo') |
|
|
|
|
|
}) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.openNpiTab('eam-eamProjectPartInfo', { |
|
|
|
|
|
projectNo: this.getTrackingColumnDisplayValue(row, 'projectNo'), |
|
|
|
|
|
testPartNo: this.getTrackingColumnDisplayValue(row, 'testPartNo') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
// 跳转时同步更新已打开页签上的 query,否则再次点页签会带回第一次进入时的旧查询条件。 |
|
|
|
|
|
openNpiTab (routeName, query) { |
|
|
|
|
|
const tabs = this.$store.state.common.mainTabs || [] |
|
|
|
|
|
const existingTab = tabs.find(item => item && item.name === routeName) |
|
|
|
|
|
if (existingTab) { |
|
|
|
|
|
this.$store.commit('common/updateMainTabs', tabs.map(item => { |
|
|
|
|
|
if (!item || item.name !== routeName) { |
|
|
|
|
|
return item |
|
|
|
|
|
} |
|
|
|
|
|
return Object.assign({}, item, { query: query }) |
|
|
|
|
|
})) |
|
|
|
|
|
} |
|
|
|
|
|
this.$router.push({ name: routeName, query: query }).catch((err) => { |
|
|
|
|
|
if (err && err.name === 'NavigationDuplicated') { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
this.$message.error('未找到对应NPI页面,请确认是否有菜单权限') |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
getTrackingColumnDisplayValue (row, columnProp) { |
|
|
getTrackingColumnDisplayValue (row, columnProp) { |
|
|
if (!row || !columnProp) { |
|
|
if (!row || !columnProp) { |
|
|
return '' |
|
|
return '' |
|
|
@ -6116,10 +6169,6 @@ export default { |
|
|
padding: 0 8px; |
|
|
padding: 0 8px; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.one-key-grid-form--detail { |
|
|
|
|
|
pointer-events: none; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.one-key-grid-form .el-form-item { |
|
|
.one-key-grid-form .el-form-item { |
|
|
margin-bottom: 10px; |
|
|
margin-bottom: 10px; |
|
|
} |
|
|
} |
|
|
@ -6163,6 +6212,15 @@ export default { |
|
|
align-items: center; |
|
|
align-items: center; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.npi-jump-link { |
|
|
|
|
|
color: #0c4dbb; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.npi-jump-link:hover { |
|
|
|
|
|
text-decoration: underline; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.project-part-sync-icon { |
|
|
.project-part-sync-icon { |
|
|
margin-left: -4px; |
|
|
margin-left: -4px; |
|
|
margin-right: 2px; |
|
|
margin-right: 2px; |
|
|
|