|
|
|
@ -14,7 +14,7 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2"> |
|
|
|
<el-form-item label="项目责任人"> |
|
|
|
<el-form-item label="项目负责人"> |
|
|
|
<el-input v-model="searchData.projectOwnerName" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
@ -122,7 +122,9 @@ |
|
|
|
<span slot="label" style="" @click="getBaseList(103,3)"><a herf="#">采购员</a></span> |
|
|
|
<el-input v-model="dataForm.purchaserName" ref="purchaserName" placeholder="请选择人员" readonly style="width: 130px" ></el-input> |
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
<el-form-item label=" " > |
|
|
|
<el-checkbox v-model="jumpFlag">跳转至申请记录</el-checkbox> |
|
|
|
</el-form-item> |
|
|
|
</el-form> |
|
|
|
<el-form :inline="true" label-position="top" label-width="100px" > |
|
|
|
<el-form-item :label="'申请原因'"> |
|
|
|
@ -147,7 +149,7 @@ |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%;"> |
|
|
|
<el-table-column label="项目号" width="90" prop="projectId" show-overflow-tooltip/> |
|
|
|
<el-table-column label="物料编码" width="100" prop="partNo" show-overflow-tooltip/> |
|
|
|
<el-table-column label="工具编码" width="100" prop="toolId" show-overflow-tooltip/> |
|
|
|
<el-table-column label="工具描述" width="120" prop="toolDescription" show-overflow-tooltip/> |
|
|
|
<el-table-column label="工具数量" width="60" prop="toolQty" show-overflow-tooltip/> |
|
|
|
<el-table-column label="申请数量" width="70" prop="applyQty" show-overflow-tooltip> |
|
|
|
@ -158,11 +160,14 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="工具成本" width="70" prop="standardCost" show-overflow-tooltip> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')" |
|
|
|
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" |
|
|
|
style="width:98%"></el-input> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="物料名称" width="160" prop="partDesc" show-overflow-tooltip/> |
|
|
|
<el-table-column label="物料编码" width="100" prop="partNo" show-overflow-tooltip/> |
|
|
|
<el-table-column label="物料名称" width="160" prop="partName" show-overflow-tooltip/> |
|
|
|
<el-table-column label="Ifs料号" width="100" prop="finalPartNo" show-overflow-tooltip/> |
|
|
|
<el-table-column label="客户料号" width="100" prop="customerPartNo" show-overflow-tooltip/> |
|
|
|
<el-table-column label="工艺版本" width="80" prop="routingRevision" show-overflow-tooltip/> |
|
|
|
<el-table-column label="工艺类型" width="80" prop="routingType" show-overflow-tooltip/> |
|
|
|
<el-table-column label="替代编码" width="80" prop="alternativeNo" show-overflow-tooltip/> |
|
|
|
@ -492,6 +497,7 @@ |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
], |
|
|
|
jumpFlag:true, |
|
|
|
dataForm:{ |
|
|
|
site: '', |
|
|
|
applyNo: '', |
|
|
|
@ -699,15 +705,16 @@ |
|
|
|
detailList:[], |
|
|
|
}; |
|
|
|
this.visible=true; |
|
|
|
this.jumpFlag=true; |
|
|
|
}, |
|
|
|
changeSum(row){ |
|
|
|
// if(row.applyQty!=null&&row.applyQty!==''&& row.toolQuantity<row.applyQty){ |
|
|
|
// row.applyQty='' |
|
|
|
// this.$alert(data.msg, '错误', { |
|
|
|
// confirmButtonText: '确定' |
|
|
|
// }) |
|
|
|
// |
|
|
|
// } |
|
|
|
if(row.standardCost<0||row.standardCost==null||row.standardCost==''){ |
|
|
|
row.standardCost='' |
|
|
|
this.$alert('成本不能为负数或者不填', '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
this.dataForm.applySumQty =0 |
|
|
|
this.dataForm.totalCost =0 |
|
|
|
for (const item of this.toolData) { |
|
|
|
@ -778,7 +785,7 @@ |
|
|
|
this.toolData[i].applyQty=0 |
|
|
|
} |
|
|
|
} |
|
|
|
this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0) |
|
|
|
this.dataForm.detailList=this.toolData.filter(item => item.applyQty > 0).filter(item => item.standardCost > 0) |
|
|
|
saveProjectToolApply(this.dataForm).then(({data}) => { |
|
|
|
if (data && data.code == 0) { |
|
|
|
this.visible=false; |
|
|
|
@ -790,6 +797,19 @@ |
|
|
|
onClose: () => { |
|
|
|
} |
|
|
|
}) |
|
|
|
if(this.jumpFlag){ |
|
|
|
this.$nextTick(function () { |
|
|
|
setTimeout(() => { |
|
|
|
let inData = { |
|
|
|
site: this.$store.state.user.site, |
|
|
|
applyNo: data.applyNo, |
|
|
|
username: this.$store.state.user.name |
|
|
|
}; |
|
|
|
localStorage.setItem('ToolApplyData', JSON.stringify(inData)) |
|
|
|
this.$router.push('tooling-searchToolApply') |
|
|
|
},500) |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$alert(data.msg, '错误', { |
|
|
|
confirmButtonText: '确定' |
|
|
|
|