123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252 |
- <template>
- <view class="particulars">
- <view class="top">
- <text class="text" @click="$goBack(2,'/pages/bazaar/VaseYard/reported?bottleId='+id)">窜货上报</text>
- </view>
- <view class="main">
- <view class="commodity">
- <view class="img">
- <img :src="data.url" mode=""></image>
- </view>
- <view class="right">
- <view class="list">
- <view class="left">
- 名称
- </view>
- <view class="right">
- {{data.fullName || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 保质期
- </view>
- <view class="right">
- {{data.keepDate || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 是否转基因
- </view>
- <view class="right">
- {{data.gene == 0 ? '转基因' : data.gene == 1 ? '非转基因' : '未说明'}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 产品标准号
- </view>
- <view class="right">
- {{data.productStandard || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 许可证编码
- </view>
- <view class="right">
- {{data.foodLicense || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 配料
- </view>
- <view class="right">
- {{data.ingredients || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 原料
- </view>
- <view class="right">
- {{data.sources || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 制作工艺
- </view>
- <view class="right">
- {{data.technology || ''}}
- </view>
- </view>
- <view class="list">
- <view class="left">
- 厂名
- </view>
- <view class="right">
- {{data.factory || ''}}
- </view>
- </view>
- </view>
- </view>
- <view class="record" v-if="details">
- <view class="details" v-for="(v,i) in details" :key="i">
- <view class="th">
- <view class="td">
- <uni-icons type="contact" size="20"></uni-icons>
- <text>{{v.opPerson}}</text>
- /
- <text class="text">{{v.location}}</text>
- </view>
- <view class="time">
- {{getTime(v.opTime)}}
- </view>
- </view>
- <view class="r2" v-if="v.rcvCorp">
- 经销商: {{v.rcvCorp}},{{v.opSendNum}}
- </view>
- <view class="r2" v-if="v.rcvPlace">
- 收货地址: {{v.rcvPlace}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- check,
- origin
- } from '../../../api/bazaar.js'
- import store from '../../../store/index.js'
- export default {
- data() {
- return {
- id: '',
- data: '',
- details: []
- };
- },
- onLoad(options) {
- this.id = options.id
- this.getData()
- this.getDetails()
- },
- created() {
-
- },
- mounted() {},
- methods: {
- async getData() {
- uni.showLoading({
- title: '加载中'
- });
- const res = await check({
- bottleId: this.id,
- accessToken: uni.getStorageSync('tokenInfo'),
- account: uni.getStorageSync('account')
- })
- console.log(res);
- uni.hideLoading();
- this.data = res.data.data
- store.dispatch('addAppear',res.data.data)
- },
- async getDetails() {
- const res = await origin({
- bottleId: this.id,
- accessToken: uni.getStorageSync('tokenInfo'),
- account: uni.getStorageSync('account')
- })
- this.details = res.data.op
- },
- // 获取时间
- getTime(time = new Date()) {
- let date = new Date(time);
- let year = date.getFullYear();
- let month = date.getMonth() + 1;
- let day = date.getDate();
- month >= 1 && month <= 9 ? (month = "0" + month) : "";
- day >= 0 && day <= 9 ? (day = "0" + day) : "";
- let timer = year + '-' + month + '-' + day;
- return timer;
- }
- }
- }
- </script>
- <style lang="scss">
- .particulars {
- .top {
- height: 100rpx;
- line-height: 100rpx;
- background-color: #e40315;
- text-align: right;
- .text {
- padding: 30rpx;
- color: #fff;
- }
- }
- .main {
- padding: 20rpx;
- .commodity {
- display: flex;
- align-items: center;
- border-bottom: 2px solid #cacaca;
- .img {
- width: 220rpx;
- height: 360rpx;
- img {
- width: 100%;
- height: 100%;
- }
- }
- .right {
- flex: 1;
- .list {
- display: flex;
- justify-content: space-between;
- border-bottom: 1rpx solid #dfdfdf;
- padding: 15rpx 0;
- &:last-child {
- border-bottom: 0;
- }
- .left {
- width: 160rpx;
- }
- .right {
- flex: 1;
- text-align: right;
- color: #8f8f8f;
- }
- }
- }
- }
- .record {
- .details {
- padding: 20rpx 0;
- border-bottom: 1rpx solid #cacaca;
- .th{
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .td {
- .text {
- color: #49bf5e;
- }
- }
- }
- .r2 {
- margin: 20rpx 0;
- }
- }
- }
- }
- </style>
|