|
|
|
@ -304,8 +304,8 @@ |
|
|
|
</el-tab-pane> |
|
|
|
<el-tab-pane label="工具明细" name="detail"> |
|
|
|
<div class="rq"> |
|
|
|
<!-- <el-button type="primary" @click="toolDetailFlag = true" >新增</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="toolDetailBatchDelete" >删除</el-button>--> |
|
|
|
<el-button type="primary" v-if="isAuth('106002:saveDetail')" @click="addChangeDetail" >新增</el-button> |
|
|
|
<el-button type="primary" v-if="isAuth('106002:removeDetail')" @click="toolDetailBatchDelete" >删除</el-button> |
|
|
|
<el-table |
|
|
|
height="278" |
|
|
|
:data="toolData" |
|
|
|
@ -631,73 +631,76 @@ |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- <el-dialog title="新增工具明细" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag">--> |
|
|
|
<!-- <div class="rq">--> |
|
|
|
<!-- <el-form :inline="true" label-position="top" :model="toolDetailData">--> |
|
|
|
<!-- <el-form-item :label="'BU'">--> |
|
|
|
<!-- <el-select v-model="toolDetailData.buNo" disabled style="width: 70px">--> |
|
|
|
<!-- <el-option--> |
|
|
|
<!-- v-for = "i in buList"--> |
|
|
|
<!-- :key = "i.buNo"--> |
|
|
|
<!-- :label = "i.buNo"--> |
|
|
|
<!-- :value = "i.buNo">--> |
|
|
|
<!-- </el-option>--> |
|
|
|
<!-- </el-select>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="技术参数卡编码">--> |
|
|
|
<!-- <el-input v-model="searchData2.codeNo" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="PLM物料编码">--> |
|
|
|
<!-- <el-input v-model="searchData2.testPartNo" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="IFS物料编码">--> |
|
|
|
<!-- <el-input v-model="searchData2.partNo" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="客户编码">--> |
|
|
|
<!-- <el-input v-model="searchData2.customerId" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item label="项目号">--> |
|
|
|
<!-- <el-input v-model="searchData2.projectId" clearable style="width: 120px"></el-input>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- <el-form-item :label="' '">--> |
|
|
|
<!-- <el-button type="primary" @click="addChangeDetail()">查询</el-button>--> |
|
|
|
<!-- </el-form-item>--> |
|
|
|
<!-- </el-form>--> |
|
|
|
<!-- <el-table--> |
|
|
|
<!-- :height="300"--> |
|
|
|
<!-- :data="dataList2"--> |
|
|
|
<!-- @selection-change="selectionData2"--> |
|
|
|
<!-- border--> |
|
|
|
<!-- style="width: 100%;">--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- type="selection"--> |
|
|
|
<!-- header-align="center"--> |
|
|
|
<!-- align="center"--> |
|
|
|
<!-- width="50">--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- <el-table-column--> |
|
|
|
<!-- v-for="(item,index) in columnList2" :key="index"--> |
|
|
|
<!-- :sortable="item.columnSortable"--> |
|
|
|
<!-- :prop="item.columnProp"--> |
|
|
|
<!-- :header-align="item.headerAlign"--> |
|
|
|
<!-- :show-overflow-tooltip="item.showOverflowTooltip"--> |
|
|
|
<!-- :align="item.align"--> |
|
|
|
<!-- :fixed="item.fixed==''?false:item.fixed"--> |
|
|
|
<!-- :min-width="item.columnWidth"--> |
|
|
|
<!-- :label="item.columnLabel">--> |
|
|
|
<!-- <template slot-scope="scope">--> |
|
|
|
<!-- <span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span>--> |
|
|
|
<!-- <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span>--> |
|
|
|
<!-- </template>--> |
|
|
|
<!-- </el-table-column>--> |
|
|
|
<!-- </el-table>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- <el-footer style="height:40px;margin-top: 20px;text-align:center">--> |
|
|
|
<!-- <el-button type="primary" @click="">应用</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="addDetail">确认</el-button>--> |
|
|
|
<!-- <el-button type="primary" @click="addDetailModal = false">关闭</el-button>--> |
|
|
|
<!-- </el-footer>--> |
|
|
|
<!-- </el-dialog>--> |
|
|
|
<el-dialog title="新增工具明细" top="30vh" :close-on-click-modal="false" v-drag :visible.sync="toolDetailFlag"> |
|
|
|
<div class="rq"> |
|
|
|
<el-form :inline="true" label-position="top" :model="toolDetailSearchData"> |
|
|
|
<el-form-item label="项目号"> |
|
|
|
<el-input v-model="toolDetailSearchData.projectId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="项目名称"> |
|
|
|
<el-input v-model="toolDetailSearchData.projectName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户名称"> |
|
|
|
<el-input v-model="toolDetailSearchData.customerName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="PLM物料编码"> |
|
|
|
<el-input v-model="toolDetailSearchData.testPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="IFS物料编码"> |
|
|
|
<el-input v-model="toolDetailSearchData.finalPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="物料名称"> |
|
|
|
<el-input v-model="toolDetailSearchData.partName" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="客户料号"> |
|
|
|
<el-input v-model="toolDetailSearchData.customerPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="工具编码"> |
|
|
|
<el-input v-model="toolDetailSearchData.toolId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="工具描述"> |
|
|
|
<el-input v-model="toolDetailSearchData.toolDescription" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="addChangeDetail()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
:height="300" |
|
|
|
:data="dataList2" |
|
|
|
@selection-change="selectionData" |
|
|
|
border |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column |
|
|
|
type="selection" |
|
|
|
header-align="center" |
|
|
|
align="center" |
|
|
|
width="50" |
|
|
|
> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column |
|
|
|
v-for="(item,index) in columnList3" :key="index" |
|
|
|
:sortable="item.columnSortable" |
|
|
|
:prop="item.columnProp" |
|
|
|
:header-align="item.headerAlign" |
|
|
|
:show-overflow-tooltip="item.showOverflowTooltip" |
|
|
|
:align="item.align" |
|
|
|
:fixed="item.fixed==''?false:item.fixed" |
|
|
|
:min-width="item.columnWidth" |
|
|
|
:label="item.columnLabel"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="!item.columnHidden">{{ scope.row[item.columnProp] }}</span> |
|
|
|
<span v-if="item.columnImage"><img :src="scope.row[item.columnProp]" style="width: 100px; height: 80px"/></span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</div> |
|
|
|
<el-footer style="height:40px;margin-top: 20px;text-align:center"> |
|
|
|
<el-button type="primary" @click="applyDetail">应用</el-button> |
|
|
|
<el-button type="primary" @click="addDetail">保存</el-button> |
|
|
|
<el-button type="primary" @click="toolDetailFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 上传文件的modal --> |
|
|
|
<projectUploadFile ref="projectUploadFile" @refreshPageTables="getFileContentData()" v-drag></projectUploadFile> |
|
|
|
@ -743,7 +746,11 @@ import DictDataSelect from "../sys/dict-data-select.vue" |
|
|
|
import orderAttribute from "../demoComponents/orderProperties" |
|
|
|
import FilterSearch from "../../common/filterSearch.vue"; |
|
|
|
import {technicalSpecificationListSearchByAnyField} from "../../../api/sampleManagement/technicalSpecificationList"; |
|
|
|
import {searchProjectToolApplyHeaderByAnyField, toolDetailBatchDelete} from "../../../api/tool/toolApply"; |
|
|
|
import { |
|
|
|
queryProjectPartToolForApply, |
|
|
|
searchProjectToolApplyHeaderByAnyField, |
|
|
|
toolDetailBatchDelete, toolDetailBatchSave |
|
|
|
} from "../../../api/tool/toolApply"; |
|
|
|
import {isAuth} from "../../../utils"; |
|
|
|
/*組件*/ |
|
|
|
export default { |
|
|
|
@ -809,6 +816,8 @@ export default { |
|
|
|
toolData: [], |
|
|
|
fileList: [], |
|
|
|
selectionDataList: [], |
|
|
|
dataSelections: [], |
|
|
|
chooseDataList: [], |
|
|
|
visibleU: false, |
|
|
|
plmChangeApplyHeaderArr: [], |
|
|
|
plmChangeApplyDetailArr: [], |
|
|
|
@ -850,7 +859,17 @@ export default { |
|
|
|
remark2: '', |
|
|
|
}, |
|
|
|
toolDetailSearchData:{ |
|
|
|
|
|
|
|
projectId: '', |
|
|
|
projectName: '', |
|
|
|
customerName: '', |
|
|
|
testPartNo: '', |
|
|
|
finalPartNo: '', |
|
|
|
partName: '', |
|
|
|
customerPartNo: '', |
|
|
|
toolId: '', |
|
|
|
toolDescription: '', |
|
|
|
no:1, |
|
|
|
size:20, |
|
|
|
}, |
|
|
|
toolDetailData:{ |
|
|
|
|
|
|
|
@ -860,8 +879,10 @@ export default { |
|
|
|
currentRow: {}, |
|
|
|
currentRow2: {}, |
|
|
|
height: 200, |
|
|
|
dataList2: [], |
|
|
|
dataList1: [], |
|
|
|
detailList: [], |
|
|
|
toolDetailList: [], |
|
|
|
dataListLoading: false, |
|
|
|
// 导出 start |
|
|
|
exportData: [], |
|
|
|
@ -1598,6 +1619,143 @@ export default { |
|
|
|
fixed: false |
|
|
|
}, |
|
|
|
], |
|
|
|
columnList3: [ |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'projectId', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '项目号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'projectName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '项目名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'customerName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '客户名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'testPartNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'PLM物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'finalPartNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: 'IFS物料编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'partName', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '物料名称', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'customerPartNo', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '客户料号', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'toolId', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '工具编码', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 106002, |
|
|
|
columnProp: 'toolDescription', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'center', |
|
|
|
columnLabel: '工具描述', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 40 |
|
|
|
} |
|
|
|
], |
|
|
|
toolDetailRules:{ |
|
|
|
agentId:[ |
|
|
|
{ |
|
|
|
@ -1645,6 +1803,24 @@ export default { |
|
|
|
visible(newV, oldV){ |
|
|
|
this.$refs.oss.handleQuery() |
|
|
|
this.$refs.dialogAttribute.getProperties() |
|
|
|
}, |
|
|
|
|
|
|
|
toolDetailFlag(newV, oldV){ |
|
|
|
if(newV === false){ |
|
|
|
this.toolDetailSearchData={ |
|
|
|
projectId: '', |
|
|
|
projectName: '', |
|
|
|
customerName: '', |
|
|
|
testPartNo: '', |
|
|
|
finalPartNo: '', |
|
|
|
partName: '', |
|
|
|
customerPartNo: '', |
|
|
|
toolId: '', |
|
|
|
toolDescription: '', |
|
|
|
no:1, |
|
|
|
size:20, |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
@ -2423,6 +2599,111 @@ export default { |
|
|
|
this.selectionDataList = val; |
|
|
|
}, |
|
|
|
|
|
|
|
selectionData (val) { |
|
|
|
this.dataSelections = val |
|
|
|
}, |
|
|
|
|
|
|
|
addChangeDetail(){ |
|
|
|
this.toolDetailFlag = true |
|
|
|
queryProjectPartToolForApply(this.toolDetailSearchData).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.dataList2 = data.rows |
|
|
|
// this.dataList2 = data.rows.map(row => { |
|
|
|
// const match = this.toolData.some(toolItem => |
|
|
|
// toolItem.site === row.site && |
|
|
|
// toolItem.applyNo === row.applyNo && |
|
|
|
// toolItem.seqNo === row.seqNo |
|
|
|
// ); |
|
|
|
// return { |
|
|
|
// ...row, |
|
|
|
// added: match |
|
|
|
// }; |
|
|
|
// }); |
|
|
|
this.total = data.total |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
addDetail(){ |
|
|
|
if (this.dataSelections.length === 0) { |
|
|
|
this.$message.warning("请勾选工具明细!") |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataSelections.forEach(item => { |
|
|
|
// 确保没有重复的元素 |
|
|
|
if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) { |
|
|
|
this.chooseDataList.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.chooseDataList = this.chooseDataList.map(item => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
applyNo: this.dataForm.applyNo |
|
|
|
}; |
|
|
|
}); |
|
|
|
toolDetailBatchSave(this.chooseDataList).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success("添加成功") |
|
|
|
searchProjectToolApplyDetail({ |
|
|
|
site: this.dataForm.site, |
|
|
|
applyNo: this.dataForm.applyNo, |
|
|
|
}).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.toolData = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
|
|
|
|
this.toolDetailFlag = false |
|
|
|
this.dataSelections = [] |
|
|
|
}, |
|
|
|
|
|
|
|
applyDetail(){ |
|
|
|
if (this.dataSelections.length === 0) { |
|
|
|
this.$message.warning("请勾选工具明细!") |
|
|
|
return |
|
|
|
} |
|
|
|
this.dataSelections.forEach(item => { |
|
|
|
// 确保没有重复的元素 |
|
|
|
if (!this.chooseDataList.some(cdItem => cdItem.site === item.site && cdItem.projectId === item.projectId && cdItem.testPartNo === item.testPartNo && cdItem.toolId === item.toolId)) { |
|
|
|
this.chooseDataList.push(item) |
|
|
|
} |
|
|
|
}) |
|
|
|
this.chooseDataList = this.chooseDataList.map(item => { |
|
|
|
return { |
|
|
|
...item, |
|
|
|
applyNo: this.dataForm.applyNo |
|
|
|
}; |
|
|
|
}); |
|
|
|
toolDetailBatchSave(this.chooseDataList).then(({data})=>{ |
|
|
|
if (data && data.code === 0){ |
|
|
|
this.$message.success("添加成功") |
|
|
|
}else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
searchProjectToolApplyDetail({ |
|
|
|
site: this.dataForm.site, |
|
|
|
applyNo: this.dataForm.applyNo, |
|
|
|
}).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.toolData = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
this.dataSelections = [] |
|
|
|
}, |
|
|
|
|
|
|
|
toolDetailBatchDelete(){ |
|
|
|
if (this.selectionDataList.length === 0) { |
|
|
|
this.$message.warning('请勾选要删除的工具明细信息!') |
|
|
|
@ -2433,13 +2714,18 @@ export default { |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
// let tempData = { |
|
|
|
// ____: this.selectionDataList |
|
|
|
// } |
|
|
|
toolDetailBatchDelete(this.selectionDataList).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.searchToolApplyDetail() |
|
|
|
this.selectionDataList = [] |
|
|
|
searchProjectToolApplyDetail({ |
|
|
|
site: this.dataForm.site, |
|
|
|
applyNo: this.dataForm.applyNo, |
|
|
|
}).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.toolData = data.rows |
|
|
|
} |
|
|
|
}) |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
|