|
|
|
@ -25,6 +25,7 @@ |
|
|
|
<el-option label="审批中" value="spz"></el-option> |
|
|
|
<el-option label="已升版" value="death"></el-option> |
|
|
|
<el-option label="已完成" value="已完成"></el-option> |
|
|
|
<el-option label="Dead" value="dead"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="'ECN'"> |
|
|
|
@ -54,6 +55,7 @@ |
|
|
|
<!-- <el-button @click="test()" type="primary" style="margin-left: 2px;margin-top:0px">测试</el-button>--> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
|
|
|
|
<el-table |
|
|
|
:data="dataList1" |
|
|
|
:height="height" |
|
|
|
@ -92,9 +94,20 @@ |
|
|
|
<a type="text" size="small" @click="deleteData(scope.row)" v-if="scope.row.statusDesc!=='已完成'&&scope.row.statusDesc!=='已升版'">删除</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.status === 'cg'" @click="issueModal(scope.row)">下达</a> |
|
|
|
<a type="text" size="small" v-if="scope.row.statusDesc!=='已升版'" @click="copyBM(scope.row)">拷贝</a> |
|
|
|
<el-dropdown trigger="click"> |
|
|
|
<el-link style="cursor: pointer;font-size: 12px"> |
|
|
|
更多 |
|
|
|
</el-link > |
|
|
|
<el-dropdown-menu slot="dropdown"> |
|
|
|
<el-dropdown-item v-if="isAuth('103002:dead') && scope.row.statusDesc === '审批中'" @click.native="bmStatusToDead(scope.row)">Dead</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="isAuth('103002:reSample') && scope.row.statusDesc === 'Dead'" @click.native="bmStatusToCg(scope.row)">Re-Sample</el-dropdown-item> |
|
|
|
<el-dropdown-item v-if="isAuth('103002:finish') && scope.row.statusDesc === '草稿'" @click.native="bmStatusToFinish(scope.row)">归档</el-dropdown-item> |
|
|
|
</el-dropdown-menu> |
|
|
|
</el-dropdown> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle" |
|
|
|
@current-change="currentChangeHandle" |
|
|
|
@ -104,6 +117,7 @@ |
|
|
|
:total="totalPage" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
|
|
|
|
<el-tabs style="font-size: 12px;min-height: 330px" class="customer-tab" v-model="activeName" type="border-card" @tab-click="refreshCurrentTabTable"> |
|
|
|
<el-tab-pane label="基本信息" name="info"> |
|
|
|
<el-form label-position="top" label-width="100px" > |
|
|
|
@ -346,12 +360,10 @@ |
|
|
|
<approval-information ref="approvalTable" v-model:data-list="approvalList" :height="240"></approval-information> |
|
|
|
</el-tab-pane> |
|
|
|
</el-tabs> |
|
|
|
|
|
|
|
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="search" v-drag></add-or-update> |
|
|
|
|
|
|
|
<el-dialog width="500px" |
|
|
|
:title="'升版'" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="revNoFlag"> |
|
|
|
<el-dialog width="500px" :title="'升版'" :close-on-click-modal="false" :visible.sync="revNoFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'参数卡编码'"> |
|
|
|
<el-input v-model="revNoData.oriCodeNo" style="width: 130px" disabled></el-input> |
|
|
|
@ -373,28 +385,30 @@ |
|
|
|
<el-button type="primary" @click="revNoFlag = false">{{'关闭'}}</el-button> |
|
|
|
</el-form> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
width="750px" |
|
|
|
title="选择物料" |
|
|
|
:close-on-click-modal="false" |
|
|
|
:visible.sync="partModelFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item style="margin-left: 0px" label="技术参数卡"> |
|
|
|
|
|
|
|
<el-input v-model="copyData.oriCodeNo" style="width: 130px" disabled ></el-input> |
|
|
|
<el-dialog width="750px" title="选择物料" :close-on-click-modal="false" :visible.sync="partModelFlag"> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px"> |
|
|
|
<el-form-item label="正式料号"> |
|
|
|
<el-input v-model="copyData.finalPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="项目料号"> |
|
|
|
<el-input v-model="copyData.testPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-left: 0px" label="版本"> |
|
|
|
<el-input v-model="copyData.revNo" style="width: 130px" disabled ></el-input> |
|
|
|
<el-form-item label="项目号"> |
|
|
|
<el-input v-model="copyData.projectId" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-left: 0px" label="项目料号"> |
|
|
|
<el-input v-model="copyData.testPartNo" style="width: 130px" disabled ></el-input> |
|
|
|
<el-form-item label="客户料号"> |
|
|
|
<el-input v-model="copyData.customerPartNo" clearable style="width: 120px"></el-input> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item style="margin-left: 0px" label="项目号"> |
|
|
|
<el-input v-model="copyData.projectId" style="width: 130px" disabled ></el-input> |
|
|
|
<el-form-item label="BU"> |
|
|
|
<bu-select v-model="copyData.buNo" style="width: 80px"></bu-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item :label="' '"> |
|
|
|
<el-button type="primary" @click="searchCopyPart()">查询</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-table |
|
|
|
height="450" |
|
|
|
height="250" |
|
|
|
:data="partList" |
|
|
|
border |
|
|
|
@row-dblclick="choosePartNo" |
|
|
|
@ -445,8 +459,22 @@ |
|
|
|
label="BU"> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
<!-- 分页插件 --> |
|
|
|
<el-pagination |
|
|
|
@size-change="sizeChangeHandle2" |
|
|
|
@current-change="currentChangeHandle2" |
|
|
|
:current-page="pageIndex2" |
|
|
|
:page-sizes="[20, 50, 100, 200, 500]" |
|
|
|
:page-size="pageSize2" |
|
|
|
:total="totalPage2" |
|
|
|
layout="total, sizes, prev, pager, next, jumper"> |
|
|
|
</el-pagination> |
|
|
|
<el-footer style="height:40px;margin-top: 10px;text-align:center"> |
|
|
|
<el-button type="primary" @click="partModelFlag = false">关闭</el-button> |
|
|
|
</el-footer> |
|
|
|
</el-dialog> |
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
|
|
|
|
<Chooselist ref="baseList" @getBaseData="getBaseData"></Chooselist> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
@ -459,6 +487,9 @@ |
|
|
|
issueChange, // 下达 |
|
|
|
searchCopyPart, |
|
|
|
copyBm, |
|
|
|
bmStatusToDead, // Dead |
|
|
|
bmStatusToCg, // Re-Sample |
|
|
|
bmStatusToFinish, // 归档 |
|
|
|
} from "@/api/sampleManagement/technicalSpecificationList.js" |
|
|
|
import Chooselist from '@/views/modules/common/Chooselist' |
|
|
|
import AddOrUpdate from './com_technical-add-or-update' |
|
|
|
@ -481,22 +512,25 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
approvalList:[], |
|
|
|
activeName:'info', |
|
|
|
addOrUpdateVisible:false, |
|
|
|
height:200, |
|
|
|
approvalList: [], |
|
|
|
activeName: 'info', |
|
|
|
addOrUpdateVisible: false, |
|
|
|
height: 200, |
|
|
|
dataList1: [], |
|
|
|
partList:[], |
|
|
|
copyData:{ |
|
|
|
site:'', |
|
|
|
codeNo:'', |
|
|
|
oriCodeNo:'', |
|
|
|
testPartNo:'', |
|
|
|
projectId:'', |
|
|
|
revNo:'', |
|
|
|
newPartNo:'', |
|
|
|
partList: [], |
|
|
|
copyData: { |
|
|
|
site: '', |
|
|
|
buNo: '', |
|
|
|
codeNo: '', |
|
|
|
oriCodeNo: '', |
|
|
|
testPartNo: '', |
|
|
|
projectId: '', |
|
|
|
revNo: '', |
|
|
|
newPartNo: '', |
|
|
|
page: 1, |
|
|
|
limit: 20 |
|
|
|
}, |
|
|
|
partModelFlag:false, |
|
|
|
partModelFlag: false, |
|
|
|
searchData: { |
|
|
|
page: 1, |
|
|
|
limit: 20, |
|
|
|
@ -505,14 +539,17 @@ |
|
|
|
testPartNo: '', |
|
|
|
oriCodeNo: '', |
|
|
|
statusDesc: '', |
|
|
|
codeNo:'', |
|
|
|
codeNo: '', |
|
|
|
ecnFlag: '', |
|
|
|
buNo:'', |
|
|
|
customerDesc:'', |
|
|
|
buNo: '', |
|
|
|
customerDesc: '', |
|
|
|
}, |
|
|
|
pageIndex: 1, |
|
|
|
pageSize: 20, |
|
|
|
totalPage: 0, |
|
|
|
pageIndex2: 1, |
|
|
|
pageSize2: 20, |
|
|
|
totalPage2: 0, |
|
|
|
dataListLoading: false, |
|
|
|
currentRow:'', |
|
|
|
exportList:[], |
|
|
|
@ -1019,12 +1056,27 @@ |
|
|
|
this.pageIndex = 1 |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle (val) { |
|
|
|
this.pageIndex = val |
|
|
|
this.search() |
|
|
|
}, |
|
|
|
search(){ |
|
|
|
|
|
|
|
// 每页数 |
|
|
|
sizeChangeHandle2 (val) { |
|
|
|
this.pageSize2 = val |
|
|
|
this.pageIndex2 = 1 |
|
|
|
this.searchCopyPart() |
|
|
|
}, |
|
|
|
|
|
|
|
// 当前页 |
|
|
|
currentChangeHandle2 (val) { |
|
|
|
this.pageIndex2 = val |
|
|
|
this.searchCopyPart() |
|
|
|
}, |
|
|
|
|
|
|
|
search () { |
|
|
|
this.searchData.limit = this.pageSize |
|
|
|
this.searchData.page = this.pageIndex |
|
|
|
this.dataListLoading = true; |
|
|
|
@ -1041,15 +1093,17 @@ |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error); |
|
|
|
this.dataListLoading = false; |
|
|
|
this.$message.error(error) |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeData(row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)); |
|
|
|
this.infoData=row; |
|
|
|
this.refreshCurrentTabTable (); |
|
|
|
|
|
|
|
changeData (row) { |
|
|
|
this.currentRow = JSON.parse(JSON.stringify(row)) |
|
|
|
this.infoData = row |
|
|
|
this.refreshCurrentTabTable() |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取基础数据列表S |
|
|
|
getBaseList (val, type) { |
|
|
|
this.tagNo = val |
|
|
|
@ -1074,6 +1128,7 @@ |
|
|
|
this.$refs.baseList.init(val, strVal) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
refreshCurrentTabTable () { |
|
|
|
if (this.activeName == 'customerInfo') { |
|
|
|
this.getTechnicalCustomerInfoData(); |
|
|
|
@ -1082,19 +1137,21 @@ |
|
|
|
this.getApprovalList() |
|
|
|
} |
|
|
|
}, |
|
|
|
getTechnicalCustomerInfoData(){ |
|
|
|
let inData={ |
|
|
|
id:this.currentRow.id |
|
|
|
|
|
|
|
getTechnicalCustomerInfoData () { |
|
|
|
let inData = { |
|
|
|
id: this.currentRow.id |
|
|
|
} |
|
|
|
getTechnicalCustomerInfoData(inData).then(({data}) => { |
|
|
|
//区分请求成功和失败的状况 |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.customerData = data.row; |
|
|
|
this.customerData = data.row |
|
|
|
} else { |
|
|
|
this.customerData = []; |
|
|
|
this.customerData = [] |
|
|
|
} |
|
|
|
}); |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
/* 列表方法的回调 */ |
|
|
|
getBaseData (val) { |
|
|
|
if (this.tagNo === 1013) { |
|
|
|
@ -1231,51 +1288,133 @@ |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
copyBM(row){ |
|
|
|
this.copyData={ |
|
|
|
site:row.site, |
|
|
|
codeNo:row.codeNo, |
|
|
|
oriCodeNo:row.oriCodeNo, |
|
|
|
testPartNo:row.testPartNo, |
|
|
|
projectId:row.projectId, |
|
|
|
revNo:row.revNo, |
|
|
|
newPartNo:'', |
|
|
|
|
|
|
|
copyBM (row) { |
|
|
|
this.copyData = { |
|
|
|
site: row.site, |
|
|
|
buNo: '', |
|
|
|
codeNo: row.codeNo, |
|
|
|
oriCodeNo: row.oriCodeNo, |
|
|
|
testPartNo: row.testPartNo, |
|
|
|
projectId: row.projectId, |
|
|
|
revNo: row.revNo, |
|
|
|
newPartNo: '', |
|
|
|
limit: this.pageSize2, |
|
|
|
page: this.pageIndex2 |
|
|
|
} |
|
|
|
searchCopyPart(this.copyData).then(({data}) => { |
|
|
|
if (data.code == 0) { |
|
|
|
this.partList=data.rows |
|
|
|
if (data.code === 0) { |
|
|
|
this.partList = data.page.list |
|
|
|
this.pageIndex2 = data.page.currPage |
|
|
|
this.pageSize2 = data.page.pageSize |
|
|
|
this.totalPage2 = data.page.totalCount |
|
|
|
} |
|
|
|
this.dataListLoading = false |
|
|
|
}) |
|
|
|
this.partModelFlag=true |
|
|
|
this.partModelFlag = true |
|
|
|
}, |
|
|
|
choosePartNo(row){ |
|
|
|
let saveData={ |
|
|
|
site:this.copyData.site, |
|
|
|
codeNo:this.copyData.codeNo, |
|
|
|
testPartNo:this.copyData.testPartNo, |
|
|
|
projectId:this.copyData.projectId, |
|
|
|
revNo:this.copyData.revNo, |
|
|
|
newPartNo:row.testPartNo, |
|
|
|
username:this.$store.state.user.name |
|
|
|
|
|
|
|
// copy part 列表查询 |
|
|
|
searchCopyPart () { |
|
|
|
this.copyData.limit = this.pageSize2 |
|
|
|
this.copyData.page = this.pageIndex2 |
|
|
|
searchCopyPart(this.copyData).then(({data}) => { |
|
|
|
if (data.code === 0) { |
|
|
|
this.partList = data.page.list |
|
|
|
this.pageIndex2 = data.page.currPage |
|
|
|
this.pageSize2 = data.page.pageSize |
|
|
|
this.totalPage2 = data.page.totalCount |
|
|
|
} else { |
|
|
|
this.partList = [] |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 双击选择 |
|
|
|
choosePartNo (row) { |
|
|
|
let tempData = { |
|
|
|
site: this.copyData.site, |
|
|
|
codeNo: this.copyData.codeNo, |
|
|
|
testPartNo: this.copyData.testPartNo, |
|
|
|
projectId: this.copyData.projectId, |
|
|
|
revNo: this.copyData.revNo, |
|
|
|
newPartNo: row.testPartNo, |
|
|
|
username: this.$store.state.user.name |
|
|
|
} |
|
|
|
this.$confirm('确定要拷贝?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
copyBm(saveData).then(({data}) => { |
|
|
|
copyBm(tempData).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.partModelFlag=false; |
|
|
|
this.search(); |
|
|
|
this.partModelFlag = false |
|
|
|
this.search() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// Dead |
|
|
|
bmStatusToDead (row) { |
|
|
|
this.$confirm('确定将技术参数卡设置为【Dead】?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
row.username = this.$store.state.user.name |
|
|
|
bmStatusToDead(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.search() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// Re-Sample |
|
|
|
bmStatusToCg (row) { |
|
|
|
this.$confirm('确定将技术参数卡设置为【草稿】?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
row.username = this.$store.state.user.name |
|
|
|
bmStatusToCg(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.search() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 归档 |
|
|
|
bmStatusToFinish (row) { |
|
|
|
this.$confirm('确定将技术参数卡归档?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
row.username = this.$store.state.user.name |
|
|
|
bmStatusToFinish(row).then(({data}) => { |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success( '操作成功') |
|
|
|
this.search() |
|
|
|
} else { |
|
|
|
this.$message.error(data.msg) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
</script> |
|
|
|
|