|
@@ -4,7 +4,8 @@
|
|
|
<view class="st-detailList-main">
|
|
|
<view class="st-detailList-main-item" v-for="(item, index) in listData" :key="item.id">
|
|
|
<view class="st-detailList-tit flex">
|
|
|
- <view class="u-line-1" style="font-weight: bold;margin-right: 20upx;max-width: 60%;">{{item.product.name}}</view>
|
|
|
+ <view class="p-tit u-line-1" @click="item.titFlag=!item.titFlag" style="font-weight: bold;margin-right: 20upx;max-width: 60%;cursor: pointer;">{{item.product.name}}</view>
|
|
|
+ <view class="p-tit-box" v-show="item.titFlag">{{item.product.name}}</view>
|
|
|
<u-tag size="mini" :type="item.product.onlineFalg==1?'success':'info'" :text="item.product.onlineFalgDictValue"></u-tag>
|
|
|
<copyText :text="item.product.name" label="产品名称"></copyText>
|
|
|
</view>
|
|
@@ -12,7 +13,12 @@
|
|
|
<view class="flex_1">
|
|
|
<view class="padding_3">产品编码:{{item.productCode}} <copyText :text="item.productCode" label="产品编码"></copyText></view>
|
|
|
<view class="padding_3">通用产品编码:{{item.productCommonCode}} </view>
|
|
|
- <view class="padding_3 u-line-2" style="max-width: 100%;">通用产品名称:{{item.productCommon.name || '--'}} </view>
|
|
|
+ <view class="padding_3 u-line-2" @click="item.c_titFlag=!item.c_titFlag">
|
|
|
+ <text>通用产品名称:</text>
|
|
|
+ <u-tag style="margin:0 20rpx 10rpx 0" size="mini" :type="item.productCommon.onlineFalg==1?'success':'info'" :text="item.productCommon.onlineFalgDictValue"></u-tag>
|
|
|
+ <text>{{item.productCommon.name || '--'}}</text>
|
|
|
+ </view>
|
|
|
+ <view class="p-t-tit-box" v-show="item.c_titFlag">{{item.productCommon.name || '--'}}</view>
|
|
|
<view class="padding_3">通用产品分类:
|
|
|
<text v-if="item.productCommon.productTypeName2 || item.productCommon.productTypeName3">{{ item.productCommon.productTypeName2 }} {{ item.productCommon.productTypeName3 ? '>' : '' }} {{ item.productCommon.productTypeName3 }}</text>
|
|
|
<text v-else>--</text>
|
|
@@ -22,24 +28,6 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="price-all flex" v-if="selPriceShow">
|
|
|
- <view class="price-item1" v-if="priceList[0].checked">
|
|
|
- <text>{{(item.offerCost||item.offerCost==0)?toThousands(item.offerCost,2):'--'}} </text>
|
|
|
- <view>成本价</view>
|
|
|
- </view>
|
|
|
- <view class="price-item1" v-if="priceList[1].checked">
|
|
|
- <text>{{(item.cityPrice || item.cityPrice==0)?toThousands(item.cityPrice,2):'--'}} </text>
|
|
|
- <view>市级价</view>
|
|
|
- </view>
|
|
|
- <view class="price-item1" v-if="priceList[2].checked">
|
|
|
- <text>{{(item.specialPrice||item.specialPrice==0)?toThousands(item.specialPrice,2):'--'}} </text>
|
|
|
- <view>特约价</view>
|
|
|
- </view>
|
|
|
- <view class="price-item2" v-if="priceList[3].checked">
|
|
|
- <text>{{(item.terminalPrice||item.terminalPrice==0)?toThousands(item.terminalPrice,2):'--'}}/{{item.dealerProductPrice&&(item.dealerProductPrice.terminalPrice||item.dealerProductPrice.terminalPrice==0)?toThousands(item.dealerProductPrice.terminalPrice,2):'--'}} </text>
|
|
|
- <view>终端价/自定义终端价</view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</view>
|
|
|
<u-empty v-if="listData.length == 0 &&status!='loading'" :text="noDataText" mode="list" ></u-empty>
|
|
|
<view style="padding-bottom: 20upx;">
|
|
@@ -48,39 +36,31 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<!-- 搜索弹窗 -->
|
|
|
- <search :showModal="showModal" @refresh="refreshList" @close="showModal=false"/>
|
|
|
+ <searchParts :showModal="showModal" @refresh="refreshList" @close="showModal=false"/>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import { toThousands } from '@/libs/tools'
|
|
|
import { productUniversalQueryPage } from '@/api/sales'
|
|
|
- import search from './search.vue'
|
|
|
import copyText from '@/pages/common/copyText.vue'
|
|
|
+ import searchParts from './searchParts.vue'
|
|
|
export default{
|
|
|
- components:{search,copyText},
|
|
|
+ components:{searchParts,copyText},
|
|
|
data(){
|
|
|
return{
|
|
|
- toThousands,
|
|
|
listData:[],
|
|
|
totalNum:0,
|
|
|
- priceList:[
|
|
|
- { name: '成本价', checked: false, val: 'offerCost' },
|
|
|
- { name: '市级价', checked: false, val: 'cityPrice' },
|
|
|
- { name: '特约价', checked: false, val: 'specialPrice' },
|
|
|
- { name: '终端价/自定义终端价', checked: false, val: 'terminalPrice' },
|
|
|
- ],
|
|
|
pageNo:1,
|
|
|
pageSize:15,
|
|
|
noDataText: '暂无数据',
|
|
|
- theme: '',
|
|
|
status: 'loadmore',
|
|
|
showModal:false,
|
|
|
params:{
|
|
|
- "code": "",
|
|
|
- "name": "",
|
|
|
- "origCode": "",
|
|
|
- "putStockFlag": 1
|
|
|
+ productCode:'',
|
|
|
+ productName:'',
|
|
|
+ productCommonCode:'',
|
|
|
+ productCommonName:'',
|
|
|
+ onlineFalg:undefined
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -93,22 +73,10 @@
|
|
|
return true
|
|
|
}
|
|
|
},
|
|
|
- computed: {
|
|
|
- selPriceShow() {
|
|
|
- const a = this.priceList.filter(item => item.checked)
|
|
|
- return a.length > 0
|
|
|
- }
|
|
|
- },
|
|
|
onLoad(option) {
|
|
|
- this.theme = getApp().globalData.theme
|
|
|
this.getList()
|
|
|
},
|
|
|
methods:{
|
|
|
- toPage(url){
|
|
|
- uni.switchTab({
|
|
|
- url:url
|
|
|
- })
|
|
|
- },
|
|
|
// 刷新列表
|
|
|
refreshList(val){
|
|
|
this.params =val ? val : {},
|
|
@@ -126,6 +94,12 @@
|
|
|
this.status = "loading"
|
|
|
productUniversalQueryPage(params).then(res => {
|
|
|
if (res.status == 200) {
|
|
|
+ if(res.data.list.length>0){
|
|
|
+ res.data.list.forEach(con=>{
|
|
|
+ con.titFlag = false
|
|
|
+ con.c_titFlag = false
|
|
|
+ })
|
|
|
+ }
|
|
|
if(this.pageNo>1){
|
|
|
this.listData = this.listData.concat(res.data.list || [])
|
|
|
}else{
|
|
@@ -146,12 +120,6 @@
|
|
|
this.pageNo += 1
|
|
|
this.getList()
|
|
|
}
|
|
|
- },
|
|
|
- // 查看销售记录
|
|
|
- toViewDetail(row){
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages/sales/salesRecord?productSn="+row.productSn + "&productName="+row.name+ "&productCode="+row.code
|
|
|
- })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -173,11 +141,33 @@
|
|
|
box-shadow: 1px 1px 3px #EEEEEE;
|
|
|
.st-detailList-tit{
|
|
|
padding-bottom: 20upx;
|
|
|
+ position: relative;
|
|
|
border-bottom: 1px solid #e4e7ed;
|
|
|
+ .p-tit-box{
|
|
|
+ width: 100%;
|
|
|
+ padding:20rpx 30rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: absolute;
|
|
|
+ top: 60rpx;
|
|
|
+ left:0;
|
|
|
+ color:#fff;
|
|
|
+ background:rgba(0,0,0,.8);
|
|
|
+ }
|
|
|
}
|
|
|
.st-detailList-item-con{
|
|
|
padding: 20upx;
|
|
|
font-size: 26upx;
|
|
|
+ position: relative;
|
|
|
+ .p-t-tit-box{
|
|
|
+ width: 100%;
|
|
|
+ padding:20rpx 30rpx;
|
|
|
+ box-sizing: border-box;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 66rpx;
|
|
|
+ left:0;
|
|
|
+ color:#fff;
|
|
|
+ background:rgba(0,0,0,.8);
|
|
|
+ }
|
|
|
.gray{
|
|
|
color: gray;
|
|
|
}
|