Browse Source

plm BMM

master
ruanqi 1 year ago
parent
commit
05e33527da
  1. 69
      src/views/modules/tooling/searchToolApply.vue
  2. 26
      src/views/modules/tooling/toolingInfo.vue

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

@ -204,8 +204,8 @@
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
<el-form-item :label="'总成本'">
<el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
<el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
@ -220,6 +220,9 @@
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
</el-form-item>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
@ -264,11 +267,15 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'applyQty' ">
<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>
@ -295,8 +302,8 @@
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
<el-form-item :label="'总成本'">
<el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
<el-input v-model="dataForm.applyBy" style="width: 130px" disabled></el-input>
@ -311,6 +318,9 @@
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" disabled style="width: 130px"></dict-data-select>
</el-form-item>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
@ -355,11 +365,15 @@
:min-width="item.columnWidth"
:label="item.columnLabel">
<template slot-scope="scope">
<div v-if="item.columnProp !== 'applyQty' ">
<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>
@ -517,6 +531,7 @@
tpName: '',
purchaser: '',
purchaserName: '',
totalCost:'',
menuId: this.$route.meta.menuId,
userName: this.$store.state.user.name,
},
@ -738,6 +753,42 @@
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table1ApplySumQty',
tableId: "106002Table1",
tableName: "刀具申请主表",
columnProp: "applySumQty",
headerAlign: "center",
align: "right",
columnLabel: "申请数量",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
serialNumber: '106002Table1TotalCost',
tableId: "106002Table1",
tableName: "刀具申请主表",
columnProp: "totalCost",
headerAlign: "center",
align: "right",
columnLabel: "总成本",
columnHidden: false,
columnImage: false,
columnSortable: false,
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
},
{
userId: this.$store.state.user.name,
functionId: 106002,
@ -954,7 +1005,7 @@
sortLv: 0,
status: true,
fixed: '',
columnWidth: 60
columnWidth: 80
},
{
userId: this.$store.state.user.name,
@ -1531,9 +1582,11 @@
},
changeSum() {
this.dataForm.applySumQty = 0
this.dataForm.totalCost =0
for (const item of this.toolData) {
// null undefined 0
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
}
},
saveHeaderMessage(){
@ -1550,6 +1603,7 @@
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.currentRow2.prNo=this.modelData.prNo
@ -1648,6 +1702,7 @@
this.dataList1[i].applyReason = this.dataForm.applyReason
this.dataList1[i].quoter = this.dataForm.quoter
this.dataList1[i].tp = this.dataForm.tp
this.dataList1[i].totalCost = this.dataForm.totalCost
this.dataList1[i].purchaser = this.dataForm.purchaser
this.dataList1[i].quoterName = this.dataForm.quoterName
this.dataList1[i].tpName = this.dataForm.tpName

26
src/views/modules/tooling/toolingInfo.vue

@ -92,11 +92,8 @@
<el-form-item :label="'申请总数'">
<el-input v-model="dataForm.applySumQty" style="width: 130px" disabled></el-input>
</el-form-item>
<!-- <el-form-item :label="'总金额'">-->
<!-- <el-input v-model="dataForm.allCost" style="width: 130px" disabled></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" style="width: 130px"></dict-data-select>
<el-form-item :label="'总成本'">
<el-input v-model="dataForm.totalCost" style="width: 130px" disabled></el-input>
</el-form-item>
<el-form-item :label="'申请人'" required="required">
<el-input v-model="dataForm.applyBy" style="width: 130px" ></el-input>
@ -110,6 +107,9 @@
placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item label="部门" required="required">
<dict-data-select :site="$store.state.user.site" v-model="dataForm.department" dict-type="tool_application_department" style="width: 130px"></dict-data-select>
</el-form-item>
<el-form-item required="required">
<span slot="label" style="" @click="getBaseList(103,1)"><a herf="#">报价员</a></span>
<el-input v-model="dataForm.quoterName" ref="quoterName" placeholder="请选择人员" readonly style="width: 130px" ></el-input>
@ -156,6 +156,12 @@
style="width:98%"></el-input>
</template>
</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,'')"
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="80" prop="routingRevision" show-overflow-tooltip/>
<el-table-column label="工艺类型" width="80" prop="routingType" show-overflow-tooltip/>
@ -163,7 +169,7 @@
<el-table-column label="替代名称" width="80" prop="alternativeDescription" show-overflow-tooltip/>
<el-table-column label="工序号" width="60" prop="operationNo" show-overflow-tooltip/>
<el-table-column label="工序名称" width="80" prop="operationName" show-overflow-tooltip/>
<el-table-column label="工具成本" width="60" prop="standardCost" show-overflow-tooltip/>
<!-- <el-table-column label="工具成本" width="60" prop="standardCost" show-overflow-tooltip/>-->
<!-- <el-table-column label="单位报价成本" width="90" prop="quotationUnitCost" show-overflow-tooltip/>-->
<!-- <el-table-column label="预计使用寿命" width="90" prop="expectedServiceLife" show-overflow-tooltip/>-->
</el-table>
@ -501,6 +507,7 @@
tp: '',
tpName: '',
purchaser: '',
totalCost:'',
purchaserName: '',
detailList:[],
},
@ -662,7 +669,7 @@
applyModel() {
if(this.dataListSelections.length===0){
this.$alert('请选择报价单!', '错误', {
this.$alert('请选择项目!', '错误', {
confirmButtonText: '确定'
})
return false;
@ -687,6 +694,7 @@
tp: '',
tpName: '',
purchaser: '',
totalCost: '',
purchaserName: '',
detailList:[],
};
@ -701,11 +709,11 @@
//
// }
this.dataForm.applySumQty =0
// this.dataForm.allCost =0
this.dataForm.totalCost =0
for (const item of this.toolData) {
// null undefined 0
this.dataForm.applySumQty += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty : 0);
// this.dataForm.allCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
this.dataForm.totalCost += Number(item.applyQty != null && item.applyQty !== '' ? item.applyQty*item.standardCost : 0);
}
},

Loading…
Cancel
Save