-
-
+
+
+
+
item.value==e)
+ val.coupon = Math.floor(val.price*obj.coupon)
+ val.growth = Math.floor(val.price*obj.growth)
+ },
// 规格值变化
handleCost(val,i,e,type){
if(type == 'batchAdd'){
@@ -2655,8 +2729,10 @@ export default {
if(i=='price'){
val.price=val.price.replace(/^([0-9-]\d*\.?\d{0,2})?.*$/,'$1')
val.cost = (e * val.proportion).toFixed(2)
- // val.growth = parseInt(val.price*(0.9-(val.cost/val.price)))
- val.growth = parseInt(val.price*0.5)
+
+ let obj = this.proportionList.find(item=>item.value==val.proportion)
+ val.coupon = Math.floor(val.price*obj.coupon)
+ val.growth = Math.floor(val.price*obj.growth)
}
if(i=='bar_code'){
val.bar_code = val.bar_code.replace(/[\W]/g,'')
@@ -3142,6 +3218,7 @@ export default {
volume: 0,
growth:0,
proportion:'0.6',
+ coupon:'',
extension_one: 0,
extension_two: 0
}
@@ -3181,6 +3258,7 @@ export default {
volume: 0,
growth:0,
proportion:'0.6',
+ coupon:'',
extension_one: 0,
extension_two: 0,
detail: { [v['value']]: vv }
@@ -3207,6 +3285,7 @@ export default {
res[i]['growth'] = v.growth
res[i]['gist_url'] = v.gist_url
res[i]['proportion'] = v.proportion
+ res[i]['coupon'] = v.coupon
res[i]['extension_one'] = v.extension_one
res[i]['extension_two'] = v.extension_two
res[i]['cdkey'] = v.cdkey && v.cdkey.length && v.cdkey[0] || null
@@ -3447,6 +3526,7 @@ export default {
svip_price: null,
stock: null,
proportion:0.6,
+ coupon:'',
growth:0,
bar_code: '',
weight: null,
@@ -3473,6 +3553,7 @@ export default {
weight: null,
volume: null,
proportion:0.6,
+ coupon:'',
growth:0,
gist_url:''
}
@@ -3523,6 +3604,7 @@ export default {
if (this.oneFormBatch[0].volume != null && this.oneFormBatch[0].volume != '') this.$set(val, 'volume', this.oneFormBatch[0].volume)
if (this.oneFormBatch[0].growth != null && this.oneFormBatch[0].growth != '') this.$set(val, 'growth', this.oneFormBatch[0].growth)
if (this.oneFormBatch[0].proportion != null && this.oneFormBatch[0].proportion != '') this.$set(val, 'proportion', this.oneFormBatch[0].proportion)
+ if (this.oneFormBatch[0].coupon != null && this.oneFormBatch[0].coupon != '') this.$set(val, 'coupon', this.oneFormBatch[0].coupon)
if (this.oneFormBatch[0].gist_url != null && this.oneFormBatch[0].gist_url != '') this.$set(val, 'gist_url', this.oneFormBatch[0].gist_url)
if (this.oneFormBatch[0].extension_one != null && this.oneFormBatch[0].extension_one != '') this.$set(val, 'extension_one', this.oneFormBatch[0].extension_one)
if (this.oneFormBatch[0].extension_two != null && this.oneFormBatch[0].extension_two != '') this.$set(val, 'extension_two', this.oneFormBatch[0].extension_two)
@@ -3733,6 +3815,7 @@ export default {
svip_price: null,
stock: null,
proportion:0.6,
+ coupon:'',
growth:0,
// cdkey: {},
bar_code: "",
diff --git a/src/views/product/productList/proDetails.vue b/src/views/product/productList/proDetails.vue
index 67f6287..5ec79d8 100644
--- a/src/views/product/productList/proDetails.vue
+++ b/src/views/product/productList/proDetails.vue
@@ -520,7 +520,7 @@
- 助农文件及其他资质:
+ 其他资质:
+
+ 签署电子合同:
+ 去签署
+
-import { serviceCodeApi,goodsCodeApi,storeGetInfoApi, marginCode, marginMakeCode, marginRecordLst,offlineRecordLst, marginRefund, marginRefundApply,offlinePayApi } from '@/api/setting'
+import { serviceCodeApi,goodsCodeApi,storeGetInfoApi, marginCode, marginMakeCode, marginRecordLst,offlineRecordLst, marginRefund, marginRefundApply,offlinePayApi,contactApi } from '@/api/setting'
import { getBaseInfo, merchantUpdate } from '@/api/user.js'
import Maps from '@/components/map/map.vue'
@@ -791,6 +795,13 @@ export default {
this.getInfo()
},
methods: {
+ // 去签署
+ handleSign(){
+ contactApi().then((res)=>{
+ window.open(res.message)
+ // console.log(res.message);
+ })
+ },
handleShow(){
console.log(this.merData.offline.includes('30'));
},