|
|
@@ -450,7 +450,6 @@
|
|
450
|
450
|
<el-input v-model="scope.row.pension_num" placeholder="请输入" type="number" :min="0" :max="100" class="priceBox" @input="handleChangePension" />
|
|
451
|
451
|
</template>
|
|
452
|
452
|
</el-table-column>
|
|
453
|
|
-
|
|
454
|
453
|
</template>
|
|
455
|
454
|
|
|
456
|
455
|
<template>
|
|
|
@@ -481,14 +480,14 @@
|
|
481
|
480
|
</template>
|
|
482
|
481
|
|
|
483
|
482
|
<template v-if="this.Spu_id==null||this.Spu_id==''||this.Spu_id==undefined">
|
|
484
|
|
- <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
|
|
483
|
+ <el-table-column v-if="formThead[iii].title != '成本价格'" v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
|
485
|
484
|
<template slot-scope="scope">
|
|
486
|
|
- <el-input @input="handleInput(scope.row,formThead[iii].title)" v-model="scope.row[iii]" :disabled="formThead[iii].title==='销售价格'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
|
|
|
485
|
+ <el-input @input="handleInput(scope.row,formThead[iii].title)" v-model="scope.row[iii]" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
|
|
487
|
486
|
</template>
|
|
488
|
487
|
</el-table-column>
|
|
489
|
488
|
</template>
|
|
490
|
489
|
|
|
491
|
|
- <template v-else>
|
|
|
490
|
+ <template v-else>
|
|
492
|
491
|
<el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
|
493
|
492
|
<template slot-scope="scope">
|
|
494
|
493
|
<el-input v-model="scope.row[iii]" :disabled="formThead[iii].title==='成本价'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" :min="0" class="priceBox" placeholder="请输入" />
|
|
|
@@ -592,9 +591,9 @@
|
|
592
|
591
|
</template>
|
|
593
|
592
|
|
|
594
|
593
|
<template v-if="this.Spu_ids==null || this.Spu_ids=='' || this.Spu_ids==undefined">
|
|
595
|
|
- <el-table-column v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
|
|
594
|
+ <el-table-column v-if="formThead[iii].title != '成本价格'" v-for="(item,iii) in attrValue" :key="iii" :label="formThead[iii].title" align="center" min-width="120">
|
|
596
|
595
|
<template slot-scope="scope">
|
|
597
|
|
- <el-input v-model="scope.row[iii]" @input="handleInput(scope.row,formThead[iii].title)" :disabled="formThead[iii].title==='销售价格'?'text':disabled" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
|
|
|
596
|
+ <el-input v-model="scope.row[iii]" @input="handleInput(scope.row,formThead[iii].title)" :type="formThead[iii].title==='商品编号'?'text':'number'" class="priceBox" placeholder="请输入" />
|
|
598
|
597
|
</template>
|
|
599
|
598
|
</el-table-column>
|
|
600
|
599
|
</template>
|
|
|
@@ -878,25 +877,25 @@ export default {
|
|
878
|
877
|
},
|
|
879
|
878
|
methods: {
|
|
880
|
879
|
handleInput(value, title) {
|
|
881
|
|
- if(title == '成本价格' || title == '分润比例'){
|
|
882
|
|
- if (title == '分润比例') {
|
|
883
|
|
- console.log('输入的分润比例', value.extension_one)
|
|
884
|
|
- if(value.extension_one < 5){
|
|
885
|
|
- value.extension_one = 5;
|
|
886
|
|
- this.$message.error('分润比例不得低于百分之5')
|
|
887
|
|
- }
|
|
888
|
|
- }
|
|
889
|
|
- console.log('输入的内容:', value);
|
|
890
|
|
- var bili = value.extension_one / 100;//比例
|
|
891
|
|
- var gong_mer_profit = value.cost * bili//利润
|
|
892
|
|
- var gong_market_price = Number(value.cost) + Number(gong_mer_profit)//加入利润后的价格
|
|
893
|
|
- var plate_mer_profit = gong_mer_profit;
|
|
894
|
|
- value.price = gong_market_price
|
|
895
|
|
- value.gong_mer_profit = gong_mer_profit
|
|
896
|
|
- value.gong_market_price = gong_market_price
|
|
897
|
|
- value.plate_mer_profit = plate_mer_profit
|
|
898
|
|
- console.log('计算的内容:', value);
|
|
899
|
|
- }
|
|
|
880
|
+ // if(title == '成本价格' || title == '分润比例'){
|
|
|
881
|
+ // if (title == '分润比例') {
|
|
|
882
|
+ // console.log('输入的分润比例', value.extension_one)
|
|
|
883
|
+ // if(value.extension_one < 5){
|
|
|
884
|
+ // value.extension_one = 5;
|
|
|
885
|
+ // this.$message.error('分润比例不得低于百分之5')
|
|
|
886
|
+ // }
|
|
|
887
|
+ // }
|
|
|
888
|
+ // console.log('输入的内容:', value);
|
|
|
889
|
+ // var bili = value.extension_one / 100;//比例
|
|
|
890
|
+ // var gong_mer_profit = value.cost * bili//利润
|
|
|
891
|
+ // var gong_market_price = Number(value.cost) + Number(gong_mer_profit)//加入利润后的价格
|
|
|
892
|
+ // var plate_mer_profit = gong_mer_profit;
|
|
|
893
|
+ // value.price = gong_market_price
|
|
|
894
|
+ // value.gong_mer_profit = gong_mer_profit
|
|
|
895
|
+ // value.gong_market_price = gong_market_price
|
|
|
896
|
+ // value.plate_mer_profit = plate_mer_profit
|
|
|
897
|
+ // console.log('计算的内容:', value);
|
|
|
898
|
+ // }
|
|
900
|
899
|
// 这里可以执行其他逻辑,如发送数据到服务器等
|
|
901
|
900
|
},
|
|
902
|
901
|
// 获取商户分润比例
|