|
@@ -168,7 +168,6 @@ export default {
|
|
|
showCustomer: false,
|
|
showCustomer: false,
|
|
|
today:'',
|
|
today:'',
|
|
|
monthLater:'',
|
|
monthLater:'',
|
|
|
- modifyPrice:0,
|
|
|
|
|
hasHb:0,
|
|
hasHb:0,
|
|
|
selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
|
|
selectedHb:{couponAmount:0,hbId:0,couponSelInx:0},
|
|
|
customData: {
|
|
customData: {
|
|
@@ -181,26 +180,6 @@ export default {
|
|
|
this.getGhsData(e.id);
|
|
this.getGhsData(e.id);
|
|
|
},
|
|
},
|
|
|
onShow() {
|
|
onShow() {
|
|
|
- let selectList = this.$util.copyObject(this.selectList);
|
|
|
|
|
- let list = [];
|
|
|
|
|
- for (let i=0;i<selectList.length;i++){
|
|
|
|
|
- if(list==''){
|
|
|
|
|
- list.push(selectList[i])
|
|
|
|
|
- }else{
|
|
|
|
|
- let has = false
|
|
|
|
|
- list.map(res=>{
|
|
|
|
|
- if(res.id == selectList[i].id){
|
|
|
|
|
- res.bigCount = (res.bigCount+selectList[i].bigCount)
|
|
|
|
|
- res.smallCount = (res.smallCount+selectList[i].smallCount)
|
|
|
|
|
- has = true
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- if(has == false){
|
|
|
|
|
- list.push(selectList[i])
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- this.list = list;
|
|
|
|
|
if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
|
|
if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
|
|
|
this.form.hbId = this.selectedHb.hbId
|
|
this.form.hbId = this.selectedHb.hbId
|
|
|
this.calcPrice()
|
|
this.calcPrice()
|
|
@@ -211,7 +190,13 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
|
- ...mapGetters(["getMerchantInfo", "getLoginInfo"])
|
|
|
|
|
|
|
+ ...mapGetters(["getMerchantInfo", "getLoginInfo"]),
|
|
|
|
|
+ modifyPrice(){
|
|
|
|
|
+ let allPrice = this.allPrice.toFixed(2)
|
|
|
|
|
+ let price = Number(allPrice)
|
|
|
|
|
+ price = parseFloat(price)
|
|
|
|
|
+ return price
|
|
|
|
|
+ }
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
...mapActions(["initMerchantInfo"]),
|
|
...mapActions(["initMerchantInfo"]),
|
|
@@ -292,14 +277,6 @@ export default {
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- calcPrice(){
|
|
|
|
|
- let allPrice = this.allPrice.toFixed(2)
|
|
|
|
|
- this.modifyPrice = Number(allPrice)
|
|
|
|
|
- if(this.selectedHb.hbId && this.selectedHb.hbId > 0) {
|
|
|
|
|
- this.modifyPrice = (this.modifyPrice - Number(this.selectedHb.couponAmount)).toFixed(2)
|
|
|
|
|
- }
|
|
|
|
|
- this.modifyPrice = parseFloat(this.modifyPrice)
|
|
|
|
|
- },
|
|
|
|
|
init() {
|
|
init() {
|
|
|
this._getDet()
|
|
this._getDet()
|
|
|
},
|
|
},
|
|
@@ -351,10 +328,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
getGhsData(id) {
|
|
getGhsData(id) {
|
|
|
getGhsDataApi({id:id}).then(res => {
|
|
getGhsDataApi({id:id}).then(res => {
|
|
|
- this.ghsInfo = res.data;
|
|
|
|
|
- //注释计算运费
|
|
|
|
|
- //this.purchaseFreight(this.ghsInfo);
|
|
|
|
|
- this.calcPrice()
|
|
|
|
|
|
|
+ this.ghsInfo = res.data
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
countAllPrices(e){
|
|
countAllPrices(e){
|
|
@@ -404,7 +378,7 @@ export default {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
affirmFormSubmit(){
|
|
affirmFormSubmit(){
|
|
|
- const product = this.list.map(ele => {
|
|
|
|
|
|
|
+ const product = this.selectList.map(ele => {
|
|
|
return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
|
|
return { productId: ele.id, bigNum: ele.bigCount, smallNum: ele.smallCount,classId:ele.classId,itemId:ele.itemId };
|
|
|
});
|
|
});
|
|
|
let xj = uni.getStorageSync("ghsXj"+this.ghsInfo.id)
|
|
let xj = uni.getStorageSync("ghsXj"+this.ghsInfo.id)
|