|
|
@@ -162,9 +162,14 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="单位类型" prop="ratioType">
|
|
|
- <el-select v-model="replaceForm.ratioTypeName" size="small" placeholder="请选择单位" @change="changeRatioTypeFn">
|
|
|
- <el-option v-for="(item, index) in ratioTypeList" :key="index" :value="item.name" >{{ item.name }}</el-option>
|
|
|
- </el-select>
|
|
|
+ <el-radio-group v-model="replaceForm.ratioType">
|
|
|
+ <el-radio :label="0">
|
|
|
+ <span>固定比例</span>
|
|
|
+ </el-radio>
|
|
|
+ <el-radio :label="1">
|
|
|
+ <span>模糊比例</span>
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="单位比" prop="ratio">
|
|
|
@@ -254,7 +259,6 @@ export default {
|
|
|
inTurn:100,
|
|
|
ratio:'',
|
|
|
ratioType:0,
|
|
|
- ratioTypeName:'',
|
|
|
allRank:0
|
|
|
},
|
|
|
replaceFormRules: {
|
|
|
@@ -297,7 +301,6 @@ export default {
|
|
|
},
|
|
|
itemClassList: [],
|
|
|
unitList: [],
|
|
|
- ratioTypeList:[{name:'固定比例',id:0},{name:'模糊比例',id:1}],
|
|
|
currentItemId: 0,
|
|
|
currentCpName:'',
|
|
|
currentCpClassName:'',
|
|
|
@@ -461,11 +464,6 @@ export default {
|
|
|
let index = this.unitList.findIndex((e) => e.name == val);
|
|
|
this.replaceForm.bigUnitId = this.unitList[index].id;
|
|
|
},
|
|
|
- changeRatioTypeFn(val){
|
|
|
- console.log(val)
|
|
|
- let index = this.ratioTypeList.findIndex((e) => e.name == val);
|
|
|
- this.replaceForm.ratioType = this.ratioTypeList[index].id;
|
|
|
- },
|
|
|
selSmallUnitFn(val) {
|
|
|
let index = this.unitList.findIndex((e) => e.name == val);
|
|
|
this.replaceForm.smallUnitId = this.unitList[index].id;
|
|
|
@@ -575,12 +573,7 @@ export default {
|
|
|
this.replaceForm.weight = res.weight
|
|
|
this.replaceForm.inTurn = res.inTurn
|
|
|
this.replaceForm.ratio = res.ratio
|
|
|
- this.replaceForm.ratioType = res.ratioType
|
|
|
- if(res.ratioType == 0){
|
|
|
- this.replaceForm.ratioTypeName = '固定比例'
|
|
|
- }else{
|
|
|
- this.replaceForm.ratioTypeName = '模糊比例'
|
|
|
- }
|
|
|
+ this.replaceForm.ratioType = Number(res.ratioType)
|
|
|
this.replaceForm.classId = res.classId
|
|
|
this.replaceForm.className = this.itemClassList[index].name
|
|
|
this.$forceUpdate()
|