|
|
@@ -24,76 +24,30 @@
|
|
|
<view class="pd-24 bg-#f7f7f7">
|
|
|
<up-swipe-action>
|
|
|
<up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :options="optionsActionTemp" @click="clickTempSwipe" class="mb-20 b-radius">
|
|
|
- <view class="b-radius bg-#fff pd-20 p-rtv">
|
|
|
- <view class="d-flex j-sb a-c mb-20">
|
|
|
- <view class="f-s-20 f-w-5">{{ selectDictLabel(pt_pack_ref_type, item.refType) }}</view>
|
|
|
- <view class="f-s-22 c-#666">
|
|
|
- {{ getDateRangeFrt(item?.packagingDateStart, item?.packagingDateStart) }}
|
|
|
- <span>包装</span>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view>
|
|
|
- <view class="d-flex a-c">
|
|
|
- <view class="flex1 ov-hd">
|
|
|
- <span></span>
|
|
|
- <span></span>
|
|
|
+ <view @click="$u.route({ url: '/plant/packaging/detail/index', params: { id: item?.id } })" class="b-radius bg-#fff p-rtv">
|
|
|
+ <pack-card :item="item" :dict="{ pt_pack_ref_type }" isArrow>
|
|
|
+ <view class="h-1 bg-#F7F7F7 mg2-10-0"></view>
|
|
|
+ <view class="pt-10 d-flex">
|
|
|
+ <view class="flex1"></view>
|
|
|
+ <view class="d-flex a-c" @click.stop>
|
|
|
+ <up-button
|
|
|
+ @click="
|
|
|
+ rowId = item.id;
|
|
|
+ showBatchInfo = true;
|
|
|
+ "
|
|
|
+ color="#18BECA"
|
|
|
+ >查看批次信息</up-button>
|
|
|
+ <template v-if="item.refType == '2'">
|
|
|
+ <up-button v-if="+item?.actualCount - item?.printCount" @click.stop="$u.route({ url: '/plant/print/print-self/index', params: { packId: item?.id, autoRelationId: item?.autoRelationId, unit: item?.unit, printedCount: item?.actualCount - item?.printCount } })" class="ml-10" color="#37A954">立即打印</up-button>
|
|
|
+ <up-button v-if="+item?.printCount" class="ml-10" color="#37A954">查看打印记录</up-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.refType == '1'">
|
|
|
+ <up-button v-if="+item?.planCount - item?.actualCount" class="ml-10" color="#91C747">批量关联</up-button>
|
|
|
+ <up-button v-if="+item?.actualCount" class="ml-10" color="#91C747">查看关联记录</up-button>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
- <up-icon name="arrow-right"></up-icon>
|
|
|
- </view>
|
|
|
- <view class="pd-6"></view>
|
|
|
- <view class="f-s-28 pd2-4-0">
|
|
|
- <span class="c-#666">成品批号:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.batchSn }}</span>
|
|
|
- </view>
|
|
|
- <view class="f-s-28 pd2-4-0">
|
|
|
- <span class="c-#666">包装批号:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.packSn }}</span>
|
|
|
</view>
|
|
|
- <view class="d-flex flex-wrap">
|
|
|
- <view class="f-s-28 pd2-4-0 hcol-15">
|
|
|
- <span class="c-#666">包装规格:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.capacity }}{{ item?.storageUseUnit }}/{{ item?.unit }}</span>
|
|
|
- </view>
|
|
|
- <view class="f-s-28 pd2-4-0 hcol-15">
|
|
|
- <span class="c-#666">包装总总量:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.storageUseAmount }}{{ item?.storageUseUnit }}</span>
|
|
|
- </view>
|
|
|
- <view class="f-s-28 pd2-4-0 hcol-15">
|
|
|
- <span class="c-#666">分包数量:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.planCount }}{{ item?.unit }}</span>
|
|
|
- </view>
|
|
|
- <view v-if="item.refType == '1'" class="f-s-28 pd2-4-0 hcol-15">
|
|
|
- <span class="c-#666">待关联数量:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.planCount - item?.actualCount }}{{ item?.unit }}</span>
|
|
|
- </view>
|
|
|
- <view v-if="item.refType == '2'" class="f-s-28 pd2-4-0 hcol-15">
|
|
|
- <span class="c-#666">待打印数量:</span>
|
|
|
- <span class="c-#333 f-w-5">{{ item?.actualCount - item?.printCount }}{{ item?.unit }}</span>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="h-1 bg-#F7F7F7 mg2-10-0"></view>
|
|
|
- <view class="pt-10 d-flex">
|
|
|
- <view class="flex1"></view>
|
|
|
- <view class="d-flex a-c">
|
|
|
- <up-button
|
|
|
- @click="
|
|
|
- rowId = item.id;
|
|
|
- showBatchInfo = true;
|
|
|
- "
|
|
|
- color="#18BECA"
|
|
|
- >查看批次信息</up-button
|
|
|
- >
|
|
|
- <template v-if="item.refType == '2'">
|
|
|
- <up-button v-if="+item?.actualCount - item?.printCount" @click="$u.route({ url: '/plant/print/print-self/index', params: { packId: item?.id, autoRelationId: item?.autoRelationId, unit: item?.unit, printedCount: item?.actualCount - item?.printCount } })" class="ml-10" color="#37A954">立即打印</up-button>
|
|
|
- <up-button v-if="+item?.printCount" class="ml-10" color="#37A954">查看打印记录</up-button>
|
|
|
- </template>
|
|
|
- <template v-if="item.refType == '1'">
|
|
|
- <up-button v-if="+item?.planCount - item?.actualCount" class="ml-10" color="#91C747">批量关联</up-button>
|
|
|
- <up-button v-if="+item?.actualCount" class="ml-10" color="#91C747">查看关联记录</up-button>
|
|
|
- </template>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+ </pack-card>
|
|
|
</view>
|
|
|
</up-swipe-action-item>
|
|
|
</up-swipe-action>
|
|
|
@@ -111,6 +65,7 @@
|
|
|
<script setup lang="ts">
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import batchInfoPopup from '../../models/batch-info-popup.vue';
|
|
|
+import PackCard from '@/plant/models/pack-card.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { pt_pack_ref_type } = toRefs<any>(proxy?.useDict('pt_pack_ref_type'));
|
|
|
const list = ref<any[]>();
|