|
|
|
@ -11,35 +11,39 @@ |
|
|
|
|
<!-- 页面 列表 --> |
|
|
|
|
<view class="v-pages-list v-container m-t-regular"> |
|
|
|
|
<u-list @scrolltolower="scrolltolower"> |
|
|
|
|
<view class="v-pages-list-item" v-for="item in listData" :key="item.id"> |
|
|
|
|
<view class="v-pages-list-item" v-for="(item,index) in listData" :key="item.id"> |
|
|
|
|
<!-- 页面 卡片 --> |
|
|
|
|
<view class="v-card"> |
|
|
|
|
<!-- 卡片 内容 --> |
|
|
|
|
<view class="v-card-content"> |
|
|
|
|
<!-- 卡片 上部 --> |
|
|
|
|
<view class="v-card-top row"> |
|
|
|
|
<!-- 卡片 图片 --> |
|
|
|
|
<image src="../../static/test/pic.jpg" class="v-card-image"></image> |
|
|
|
|
<!-- 卡片 信息 --> |
|
|
|
|
<view class="v-card-info col"> |
|
|
|
|
<view class="v-card-title row"><text |
|
|
|
|
class="name col">{{item.processingName}}</text><text class="tip" |
|
|
|
|
v-if="item.speciesName">{{item.speciesName}}</text> |
|
|
|
|
<view class="v-card-info"> |
|
|
|
|
<view class="v-card-title row"> |
|
|
|
|
<text class="name col">{{item.processingName}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-card-state m-t-mini"><text class="state">{{item.sourceType}}</text> |
|
|
|
|
<view class="v-card-state m-t-mini"> |
|
|
|
|
<text class="state secondary" |
|
|
|
|
v-if="item.speciesName">{{item.speciesName}}</text> |
|
|
|
|
<dict-tag class="state primary" type="source_type" :value="item.sourceType" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-card-code"><text |
|
|
|
|
class="iconfont icon-code m-r-small"></text>{{item.traceabilityCode}}</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
<!-- 卡片 下部 --> |
|
|
|
|
<view class="v-card-bot"> |
|
|
|
|
<view class="v-card-small-item" v-for="(cell,i) in item.salesRecordsList" :key="i"> |
|
|
|
|
<view class="v-page-form small row m-t-small"> |
|
|
|
|
<view class="v-form-item col-12"><text class="label">销售类型:</text><text |
|
|
|
|
class="content">{{cell.salesType}}</text></view> |
|
|
|
|
<view class="v-form-item col-12"><text class="label">销售数量:</text><text |
|
|
|
|
class="content">{{formatData(cell.salesType)}}</text></view> |
|
|
|
|
<view class="v-form-item col-12"><text class="label">销售日期:</text><text |
|
|
|
|
class="content">{{getFormat(cell.createTime)}}</text></view> |
|
|
|
|
<view class="v-card-small-item" @click="openPopup(index)"> |
|
|
|
|
<view class="v-card-small-box row v-page-form small"> |
|
|
|
|
<view class="v-form-item col"> |
|
|
|
|
<uni-icons type="calendar" size="14"></uni-icons> |
|
|
|
|
<text |
|
|
|
|
class="content m-r-small">{{getFormat(item.salesRecordsList[0].createTime)}} |
|
|
|
|
</text> |
|
|
|
|
销售 |
|
|
|
|
</view> |
|
|
|
|
<view class="record"><text class="btn">销售记录</text></view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
@ -50,18 +54,57 @@ |
|
|
|
|
</u-list> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<!-- 记录 弹框 --> |
|
|
|
|
<uni-popup ref="popup"> |
|
|
|
|
<view class="popup-content v-container"> |
|
|
|
|
<view class="close" @click="closePopup"> |
|
|
|
|
<uni-icons type="close" size="30"></uni-icons> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-card"> |
|
|
|
|
<view class="v-popup-title"><text>{{RecordName}}</text> 销售记录</view> |
|
|
|
|
<view class="v-card-small-item" v-for="(item,index) in RecordData" :key="index"> |
|
|
|
|
<view> |
|
|
|
|
<uni-icons type="calendar" class="text-primary m-r-small" size="14"></uni-icons> |
|
|
|
|
<text class="content">{{getFormat(item.createTime)}}</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-card-small-box v-page-form small row m-t-small"> |
|
|
|
|
<view class="v-form-item col-12"> |
|
|
|
|
<text class="label">销售类型:</text> |
|
|
|
|
<dict-tag class="state primary" type="sales_type" :value="String(item.salesType)" /> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-item col-12"> |
|
|
|
|
<text class="label">销售数量:</text> |
|
|
|
|
<text class="content">{{formatNumber(item.salesNumber)}}公斤</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-item col-24 m-t-mini"> |
|
|
|
|
<text class="label">销售金额:</text> |
|
|
|
|
<text class="content">{{formatData(item.salesVolume)}}元</text> |
|
|
|
|
</view> |
|
|
|
|
<view class="v-form-item col-24 m-t-mini"> |
|
|
|
|
<text class="label">客户名称:</text> |
|
|
|
|
<text class="content">{{formatData(item.logisticsName)}}</text> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</view> |
|
|
|
|
</uni-popup> |
|
|
|
|
</view> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import * as ProductApi from "@/api/traceability/salerecord" |
|
|
|
|
import mix from '@/utils/mix.js' |
|
|
|
|
|
|
|
|
|
import DictTag from "@/components/DictTag/index" |
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
DictTag |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
keyword: null, |
|
|
|
|
listData: [], |
|
|
|
|
RecordName: null, |
|
|
|
|
RecordData: [], |
|
|
|
|
loadMoreStatus: 'loadmore', |
|
|
|
|
queryParams: { |
|
|
|
|
pageNo: 1, |
|
|
|
@ -98,6 +141,19 @@ |
|
|
|
|
} finally {} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 打开 弹窗 |
|
|
|
|
openPopup(index) { |
|
|
|
|
console.log(this.listData[index]) |
|
|
|
|
this.RecordName = this.listData[index].processingName |
|
|
|
|
this.RecordData = this.listData[index].salesRecordsList |
|
|
|
|
this.$refs.popup.open() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
// 关闭 弹窗 |
|
|
|
|
closePopup() { |
|
|
|
|
this.$refs.popup.close() |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
//触底加载 |
|
|
|
|
scrolltolower() { |
|
|
|
|
if (this.loadMoreStatus == 'loading' || this.loadMoreStatus == 'nomore') { |
|
|
|
|