|
@@ -201,7 +201,7 @@
|
|
<el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
|
|
<el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item class="hang">
|
|
<el-form-item class="hang">
|
|
- <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.reservedProportion">
|
|
|
|
|
|
+ <el-select clearable :disabled="sonDisable" size="small" v-model="scope.row.reservedProportion" @change="getYLSL(scope.$index,scope.row.reservedProportion)">
|
|
<el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
<el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -263,7 +263,7 @@
|
|
<el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="120px">
|
|
<el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center" prop="qty" width="120px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
|
|
<el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
|
|
- <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty"/>
|
|
|
|
|
|
+ <el-input clearable :readonly="sonDisable" size="small" v-model="scope.row.qty" @change="getYL(scope.$index, scope.row.qty)"/>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -598,6 +598,26 @@ export default {
|
|
return '总供应可满足'
|
|
return '总供应可满足'
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 获取预留数量
|
|
|
|
+ getYLSL(index,val) {
|
|
|
|
+ if (val) {
|
|
|
|
+ let newVal = val.replace('%', '')
|
|
|
|
+ newVal = newVal/100
|
|
|
|
+ this.basicForm.puDemandItemList[index].reservedQty = newVal * this.basicForm.puDemandItemList[index].qty
|
|
|
|
+ } else {
|
|
|
|
+ this.basicForm.puDemandItemList[index].reservedQty = null
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ // 实际业务需求量获取
|
|
|
|
+ getYL(index, val) {
|
|
|
|
+ if (val && this.basicForm.puDemandItemList[index].reservedProportion) {
|
|
|
|
+ let newVal = this.basicForm.puDemandItemList[index].reservedProportion.replace('%', '')
|
|
|
|
+ newVal = newVal/100
|
|
|
|
+ this.basicForm.puDemandItemList[index].reservedQty = val * newVal
|
|
|
|
+ } else {
|
|
|
|
+ this.basicForm.puDemandItemList[index].reservedQty = null
|
|
|
|
+ }
|
|
|
|
+ },
|
|
copy() {
|
|
copy() {
|
|
this.$modal.msgSuccess("复制成功");
|
|
this.$modal.msgSuccess("复制成功");
|
|
this.sonPageStu = 'add'
|
|
this.sonPageStu = 'add'
|