Browse Source

plm BMM

master
ruanqi 1 year ago
parent
commit
283bcd639b
  1. 294
      src/views/modules/tooling/searchToolApply.vue

294
src/views/modules/tooling/searchToolApply.vue

@ -142,7 +142,7 @@
<el-tab-pane label="处理信息" name="tab4">
<el-form :inline="true" label-position="top" style="margin-top: 0px">
<!-- <el-button type="primary" :disabled="!(currentRow.statusCode==='50'||currentRow.statusCode==='60')" @click="openMassageModel()">申请信息录入</el-button>-->
<el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>
<!-- <el-button type="primary" @click="openMassageModel()">申请信息录入</el-button>-->
</el-form>
<el-form label-position="top" :model="currentRow" >
<el-row :gutter="15">
@ -248,42 +248,90 @@
v-model="dataForm.remark"/>
</el-form-item>
</el-form>
<div class="rq" style="margin-top: 60px">
<el-table
height="250"
:data="toolData"
border
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<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">
<div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
<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>
</div>
<div v-if=" (item.columnProp === 'standardCost')">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
<div v-else>
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card" >
<el-tab-pane label="工具明细" name="detail">
<div class="rq" >
<el-table
height="250"
:data="toolData"
border
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<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">
<div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
<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>
</div>
<div v-if=" (item.columnProp === 'standardCost')">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
<div v-else>
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="TP处理结果" name="tp">
<el-form label-position="top" >
<el-row :gutter="15" >
<el-col :span="6">
<el-form-item label="IFS PR编号" >
<el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注" style="height: 80px">
<el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="采购处理结果" name="caigou">
<el-form label-position="top" >
<el-row :gutter="15" style="margin-top: 0px" >
<el-col :span="6">
<el-form-item label="采购订单号" >
<el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="厂商名称" >
<el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="总成本(元)" >
<el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15" style="margin-top: 0px">
<el-col :span="24">
<el-form-item label="备注" style="height: 80px">
<el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveData()">{{'保存'}}</el-button>
<el-button type="primary" @click="visibleU = false">{{'取消'}}</el-button>
@ -346,42 +394,90 @@
v-model="dataForm.remark"/>
</el-form-item>
</el-form>
<div class="rq" style="margin-top: 60px">
<el-table
height="250"
:data="toolData"
border
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<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">
<div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
<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>
</div>
<div v-if=" (item.columnProp === 'standardCost')">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量"
style="width:98%"></el-input>
</div>
<div v-else>
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
</template>
</el-table-column>
</el-table>
</div>
<el-tabs style="font-size: 12px;min-height: 330px;margin-top: 60px" class="customer-tab" v-model="activeModelName" type="border-card" >
<el-tab-pane label="工具明细" name="detail">
<div class="rq" style="margin-top: 60px">
<el-table
height="250"
:data="toolData"
border
ref="toolTable"
v-loading="dataListLoading"
style="width: 100%;">
<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">
<div v-if="(item.columnProp !== 'applyQty')&& (item.columnProp !== 'standardCost')">
<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>
</div>
<div v-if=" (item.columnProp === 'standardCost')">
<el-input v-model="scope.row.standardCost" type="number" @change="changeSum(scope.row)" placeholder="请输入数量"
style="width:98%"></el-input>
</div>
<div v-else>
<el-input v-model="scope.row.applyQty" type="number" @change="changeSum(scope.row)" placeholder="请输入数量" onkeyup="value=value.replace(/^(0+)|[^\d]+/g,'')"
style="width:98%"></el-input>
</div>
</template>
</el-table-column>
</el-table>
</div>
</el-tab-pane>
<el-tab-pane label="TP处理结果" name="tp">
<el-form label-position="top" >
<el-row :gutter="15" >
<el-col :span="6">
<el-form-item label="IFS PR编号" >
<el-input v-model="modelData.prNo" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
</el-form-item>
</el-col>
<el-col :span="24" >
<el-form-item label="备注" style="height: 80px">
<el-input type="textarea" v-model="modelData.remark1" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.tp"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
<el-tab-pane label="采购处理结果" name="caigou">
<el-form label-position="top" >
<el-row :gutter="15" style="margin-top: 0px" >
<el-col :span="6">
<el-form-item label="采购订单号" >
<el-input v-model="modelData.poNo" :disabled="$store.state.user.name!==dataForm.purchaser" ></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="厂商名称" >
<el-input v-model="modelData.supplierName" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="总成本(元)" >
<el-input v-model="modelData.allCost" type="number" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="15" style="margin-top: 0px">
<el-col :span="24">
<el-form-item label="备注" style="height: 80px">
<el-input type="textarea" v-model="modelData.remark2" :rows="3" style="height: 60px" :disabled="$store.state.user.name!==dataForm.purchaser"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</el-tab-pane>
</el-tabs>
<span slot="footer" class="dialog-footer">
<!-- <el-button type="primary" @click="saveData()">{{'保存'}}</el-button>-->
<el-button type="primary" @click="visible = false">{{'取消'}}</el-button>
@ -502,6 +598,7 @@
visible:false,
fileContentList: [],
activeName: 'detail',
activeModelName: 'detail',
searchData:{
page: 1,
limit: 100,
@ -1498,6 +1595,7 @@
userName: this.$store.state.user.name,
nodeId: row.nodeId
}
this.openModelMessage()
searchProjectToolApplyDetail({ site: row.site,
applyNo: row.applyNo,}).then(({data}) => {
if (data.code == 0) {
@ -1533,6 +1631,7 @@
userName: this.$store.state.user.name,
nodeId: row.nodeId
}
this.openModelMessage()
searchProjectToolApplyDetail({ site: row.site,
applyNo: row.applyNo,}).then(({data}) => {
if (data.code == 0) {
@ -1657,6 +1756,20 @@
this.pageIndex = val
this.search()
},
openModelMessage(){
this.modelData={
site:this.currentRow.site,
applyNo:this.currentRow.applyNo,
prNo:this.currentRow.prNo,
remark1:this.currentRow.remark1,
poNo:this.currentRow.poNo,
supplierName:this.currentRow.supplierName,
allCost:this.currentRow.allCost,
remark2:this.currentRow.remark2,
}
},
openMassageModel(){
if(Object.keys(this.currentRow).length === 0){
@ -1709,12 +1822,6 @@
this.currentRow.totalCost=this.modelData.totalCost
this.currentRow.remark2=this.modelData.remark2
this.currentRow2.prNo=this.modelData.prNo
this.currentRow2.remark1=this.modelData.remark1
this.currentRow2.poNo=this.modelData.poNo
this.currentRow2.supplierName=this.modelData.supplierName
this.currentRow2.allCost=this.modelData.allCost
this.currentRow2.remark2=this.modelData.remark2
this.$message({
message: '操作成功',
type: 'success',
@ -1730,7 +1837,34 @@
})
})
},
saveHeaderMessage2(){
saveProjectHeaderMessage(this.modelData).then(({data}) => {
if (data && data.code == 0) {
this.modelFlag=false;
this.currentRow.prNo=this.modelData.prNo
this.currentRow.remark1=this.modelData.remark1
this.currentRow.poNo=this.modelData.poNo
this.currentRow.supplierName=this.modelData.supplierName
this.currentRow.allCost=this.modelData.allCost
this.currentRow.totalCost=this.modelData.totalCost
this.currentRow.remark2=this.modelData.remark2
this.$message({
message: '操作成功',
type: 'success',
duration: 1500,
onClose: () => {
}
})
} else {
this.$alert(data.msg, '错误', {
confirmButtonText: '确定'
})
}
})
},
//
agreeSubmit () {
this.$confirm(`是否确认提交?`, '提示', {
@ -1769,6 +1903,7 @@
this.dataForm.detailList = this.toolData
submitChange(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.saveHeaderMessage2()
for (let i = 0; i <this.dataList1.length ; i++) {
if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
this.dataList1[i].remark = this.dataForm.remark
@ -1799,6 +1934,7 @@
this.dataForm.detailList = this.toolData
editToolApplication(this.dataForm).then(({data}) => {
if (data && data.code === 0) {
this.saveHeaderMessage2()
for (let i = 0; i <this.dataList1.length ; i++) {
if (this.dataList1[i].applyNo === this.dataForm.applyNo) {
this.dataList1[i].remark = this.dataForm.remark

Loading…
Cancel
Save