|
|
|
@ -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 |
|
|
|
|