Commit a4e63a6b authored by 吴春's avatar 吴春

少价信息

parent 09cc9f05
...@@ -2425,37 +2425,27 @@ ...@@ -2425,37 +2425,27 @@
} }
) )
this.Unit_PriceList=[]; this.Unit_PriceList=[];
this.apipost('sellorder_post_GetLessPrice', {}, res => { this.apipost('sellorder_post_GetLessPrice',{"TCID":obj.tcid}, res => {
this.LessMoney = res.data.data.lessMoney; this.LessMoney = res.data.data.lessMoney;
if (parseFloat(this.LessMoney)>0){ if (parseFloat(this.LessMoney)>0){
for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) { for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) {
var obj = { var obj = {
ID: '', ID: '',
LessMoney: '' LessMoney: ''
} }
obj.ID = this.addMsg.TC_Price-i*10; obj.ID = this.addMsg.TC_Price-i*10;
obj.LessMoney = this.addMsg.TC_Price-i*10; obj.LessMoney = this.addMsg.TC_Price-i*10;
this.Unit_PriceList.push(obj); this.Unit_PriceList.push(obj);
} }
// this.Unit_PriceList.forEach(person => {
if(this.Unit_PriceList.findIndex(markers => markers.ID == this.addMsg.Unit_Price)<0) { if(this.Unit_PriceList.findIndex(markers => markers.ID == this.addMsg.Unit_Price)<0) {
var obj = { var obj = {
ID: '', ID: '',
LessMoney: '' LessMoney: ''
} }
obj.ID = this.addMsg.Unit_Price; obj.ID = this.addMsg.Unit_Price;
obj.LessMoney = this.addMsg.Unit_Price; obj.LessMoney = this.addMsg.Unit_Price;
this.Unit_PriceList.push(obj); this.Unit_PriceList.push(obj);
} }
// });
//判断下拉价格里面是否包含了成交单价,未包含就添加进来
// const option = {ID:this.addMsg.TC_Price,LessMoney:this.addMsg.TC_Price}
// // 如果数组里面本身不存在这个对象则把这个加进去
// if(JSON.stringify(this.Unit_PriceList).indexOf(JSON.stringify(option))==-1){
// this.Unit_PriceList.push(option); // 进行动态的操作
// }
} }
else{ else{
var obj = { var obj = {
...@@ -2464,7 +2454,7 @@ ...@@ -2464,7 +2454,7 @@
} }
obj.ID = this.addMsg.Unit_Price; obj.ID = this.addMsg.Unit_Price;
obj.LessMoney = this.addMsg.Unit_Price; obj.LessMoney = this.addMsg.Unit_Price;
this.Unit_PriceList.push(obj); this.Unit_PriceList.push(obj);
} }
}, err => {}) }, err => {})
...@@ -2573,30 +2563,6 @@ ...@@ -2573,30 +2563,6 @@
this.addMsg.CustomerId = '0' this.addMsg.CustomerId = '0'
this.addMsg.CommissionShareMoney = '0' this.addMsg.CommissionShareMoney = '0'
} }
this.Unit_PriceList=[];
this.apipost('sellorder_post_GetLessPrice', {}, res => {
this.LessMoney = res.data.data.lessMoney;
if (parseFloat(this.LessMoney)>0){
for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) {
var obj = {
ID: '',
LessMoney: ''
}
obj.ID = this.addMsg.TC_Price-i*10;
obj.LessMoney = this.addMsg.TC_Price-i*10;
this.Unit_PriceList.push(obj);
}
}
else{
var obj = {
ID: '',
LessMoney: ''
}
obj.ID = this.addMsg.Unit_Price;
obj.LessMoney = this.addMsg.Unit_Price;
this.Unit_PriceList.push(obj);
}
}, err => {})
}, },
getTicheng () { getTicheng () {
//提成 //提成
......
...@@ -1045,7 +1045,7 @@ ...@@ -1045,7 +1045,7 @@
<span class="colorE95252" v-show='!returnPriceShow'>暂无报价!</span> <span class="colorE95252" v-show='!returnPriceShow'>暂无报价!</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4" v-if="isChecked==true">
<!-- <el-form-item label="成交单价" prop="Unit_Price"> <!-- <el-form-item label="成交单价" prop="Unit_Price">
<el-input v-model='addMsg.Unit_Price' @keyup.native="checkPrice(addMsg,'Unit_Price');getTotalPrice()" ></el-input> <el-input v-model='addMsg.Unit_Price' @keyup.native="checkPrice(addMsg,'Unit_Price');getTotalPrice()" ></el-input>
</el-form-item> --> </el-form-item> -->
...@@ -1062,6 +1062,14 @@ ...@@ -1062,6 +1062,14 @@
<p v-else="LessMoney>0" style="line-height: 18px; color: #E95252;">注:最多少价{{LessMoney}}元,如需少价更多请联系上级主管</p> <p v-else="LessMoney>0" style="line-height: 18px; color: #E95252;">注:最多少价{{LessMoney}}元,如需少价更多请联系上级主管</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4" v-else>
<el-form-item label="成交单价" prop="Unit_Price">
<el-input v-model='addMsg.Unit_Price' @keyup.native="checkPrice(addMsg,'Unit_Price');getTotalPrice()"></el-input>
</el-form-item>
<el-form-item>
<p style="line-height: 18px; color: #E95252;">注:如果超出本团的最低让价,差价将由你来承担</p>
</el-form-item>
</el-col>
</el-row> </el-row>
<div style="width: 100%; border-top:1px dashed #ccc;margin-bottom:25px;"></div> <div style="width: 100%; border-top:1px dashed #ccc;margin-bottom:25px;"></div>
<el-row :gutter="20"> <el-row :gutter="20">
...@@ -2741,7 +2749,7 @@ export default { ...@@ -2741,7 +2749,7 @@ export default {
} }
this.Unit_PriceList=[]; this.Unit_PriceList=[];
this.apipost('sellorder_post_GetLessPrice', {}, res => { this.apipost('sellorder_post_GetLessPrice', {"TCID":obj.tcid}, res => {
this.LessMoney = res.data.data.lessMoney; this.LessMoney = res.data.data.lessMoney;
if (parseFloat(this.LessMoney)>0){ if (parseFloat(this.LessMoney)>0){
for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) { for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) {
......
...@@ -1481,7 +1481,7 @@ ...@@ -1481,7 +1481,7 @@
this.addMsg.CommissionShareMoney = '0' this.addMsg.CommissionShareMoney = '0'
} }
this.Unit_PriceList=[]; this.Unit_PriceList=[];
this.apipost('sellorder_post_GetLessPrice', {}, res => { this.apipost('sellorder_post_GetLessPrice', {"TCID":this.addObj.TCID}, res => {
this.LessMoney = res.data.data.lessMoney; this.LessMoney = res.data.data.lessMoney;
if (parseFloat(this.LessMoney)>0){ if (parseFloat(this.LessMoney)>0){
for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) { for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) {
......
...@@ -1089,9 +1089,9 @@ ...@@ -1089,9 +1089,9 @@
<span class="colorE95252" v-show='!returnPriceShow'>暂无报价!</span> <span class="colorE95252" v-show='!returnPriceShow'>暂无报价!</span>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5" v-if="isChecked==true">
<el-form-item label="成交单价" prop="Unit_Price"> <el-form-item label="成交单价" prop="Unit_Price">
<el-select v-model='addMsg.Unit_Price' <el-select v-model='addMsg.Unit_Price'
filterable :placeholder="$t('pub.pleaseSel')" @change="getTotalPrice()"> filterable :placeholder="$t('pub.pleaseSel')" @change="getTotalPrice()">
<el-option v-for="item in Unit_PriceList" :label='item.LessMoney' :value='item.ID' :key='item.ID'> <el-option v-for="item in Unit_PriceList" :label='item.LessMoney' :value='item.ID' :key='item.ID'>
</el-option> </el-option>
...@@ -1104,6 +1104,14 @@ ...@@ -1104,6 +1104,14 @@
<p v-else="LessMoney>0" style="line-height: 18px; color: #E95252;">注:最多少价{{LessMoney}}元,如需少价更多请联系上级主管</p> <p v-else="LessMoney>0" style="line-height: 18px; color: #E95252;">注:最多少价{{LessMoney}}元,如需少价更多请联系上级主管</p>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5" v-else>
<el-form-item label="成交单价" prop="Unit_Price">
<el-input v-model='addMsg.Unit_Price' class="w210" @keyup.native="checkPrice(addMsg,'Unit_Price');getTotalPrice()"></el-input>
</el-form-item>
<el-form-item>
<p style="line-height: 18px; color: #E95252;">注:如果超出本团的最低让价,差价将由你来承担</p>
</el-form-item>
</el-col>
</el-row> </el-row>
<div style="width: 100%; border-top:1px dashed #ccc;margin-bottom:25px;"></div> <div style="width: 100%; border-top:1px dashed #ccc;margin-bottom:25px;"></div>
<el-row :gutter="20"> <el-row :gutter="20">
...@@ -2836,7 +2844,7 @@ import updateSalesMan from "../../commonPage/updateSalesMan.vue"; ...@@ -2836,7 +2844,7 @@ import updateSalesMan from "../../commonPage/updateSalesMan.vue";
} }
this.Unit_PriceList=[]; this.Unit_PriceList=[];
this.apipost('sellorder_post_GetLessPrice', {}, res => { this.apipost('sellorder_post_GetLessPrice', {"TCID":obj.TCID}, res => {
this.LessMoney = res.data.data.lessMoney; this.LessMoney = res.data.data.lessMoney;
if (parseFloat(this.LessMoney)>0){ if (parseFloat(this.LessMoney)>0){
for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) { for (var i = 0; i <= parseInt(this.LessMoney)/10; i++) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment