shish 4 лет назад
Родитель
Сommit
57f766885c
2 измененных файлов с 10 добавлено и 6 удалено
  1. 6 2
      ghs/src/views/item/list.vue
  2. 4 4
      hdApp/src/components/module/app-commodity.vue

+ 6 - 2
ghs/src/views/item/list.vue

@@ -154,11 +154,14 @@
 			<el-input style="width:80%;" ref="add-price-input" focus size="mini" v-else v-model="scope.row.weight" @blur="changeInputValue(scope.row, 'weight')"></el-input>
 		</template>
 
+      <template #slot-download-price-btn>
+        <el-button type="primary" size="mini" @click="downloadPrice('gatheringCode', scope.row.id)">下载价格表</el-button>
+      </template>
 
       <template #slot-add-goods-btn>
-		<!-- <el-button type="primary" size="mini" @click="addFn()">从平台导入</el-button> -->
         <el-button type="primary" size="mini" @click="$util.pageTo({url: '/item/import'})">从平台导入</el-button>
       </template>
+
 		<template #slot-addNew-goods-btn>
         <el-button type="primary" size="mini" @click="replaceBtnFn(0)">新增</el-button>
       </template>
@@ -430,6 +433,7 @@ export default {
     this.init();
   },
   methods: {
+
 	copyProduct(id){
 		this.$service.product.copy({id:id}).then(res => {
 			this.$message.success('操作成功!')
@@ -696,7 +700,7 @@ export default {
 		.set('pagination', {
 			size: 50
 		})
-        .set('layout', [['slot-tabs'],['search-key'],['flex1', 'slot-addNew-goods-btn','slot-add-goods-btn', 'refresh-btn'],['data-table'],['flex1', 'pagination']])
+        .set('layout', [['slot-tabs'],['search-key'],['flex1', 'slot-addNew-goods-btn','slot-add-goods-btn','slot-download-price-btn', 'refresh-btn'],['data-table'],['flex1', 'pagination']])
 		  .on('refresh', async (params, { next }) => {
 			  // 继续执行刷新
 			  let  asset  = await next(params);

+ 4 - 4
hdApp/src/components/module/app-commodity.vue

@@ -7,13 +7,13 @@
 			<view class="tit" >{{ info.itemName || "" }}</view>
 			<view class="kc num-open_bx flex-space" v-if="type == COMMODITY_TYPE.COMMON">
 				<view v-if="!offPrice">
-					<view class="flex-space" style="margin-bottom: 50rpx;margin-top:15rpx" v-if="Number(info.discountPrice)>0 && Number(info.discountPrice)<Number(info.price)">
+					<view class="flex-space" style="margin-bottom: 50rpx;margin-top:15rpx" v-if="Number(info.discountPrice)>0">
 						<view style="padding:3rpx 10rpx 3rpx 10rpx;text-align: center;color: red;border: 1px solid red;margin-right: 20rpx;line-height: 1;font-size: 20rpx">
-							{{((Number(info.discountPrice)/Number(info.price)).toFixed(2)*10).toFixed(1)+'折'}}
+							{{((Number(info.discountPrice)/Number(info.prePrice)).toFixed(2)*10).toFixed(1)+'折'}}
 						</view>
-						<text style="text-decoration:line-through;color:#A9A9A9">¥{{info.price}}</text>
+						<text style="text-decoration:line-through;color:#A9A9A9">¥{{info.prePrice}}</text>
 					</view>
-					<view v-if="Number(info.discountPrice)>0 && Number(info.discountPrice)<Number(info.price)" class="price" >¥{{ info.discountPrice }}</view>
+					<view v-if="Number(info.discountPrice)>0" class="price" >¥{{ info.discountPrice }}</view>
 					<view v-else class="price" >¥{{ info.price }}</view>
 				</view>