|
|
@@ -5,6 +5,8 @@
|
|
|
</template>
|
|
|
|
|
|
<view class="pd3-24-24-0">
|
|
|
+ <ut-tabs mode="subsection" v-model="form.codeStatus" :tabs="tabs" @change="onRefresh"></ut-tabs>
|
|
|
+ <view class="pd-10"></view>
|
|
|
<view class="d-flex a-c">
|
|
|
<view class="min-w-230 flex1">
|
|
|
<ut-action-sheet v-model="form.refType" :tabs="[{ label: '全部', value: '', elTagClass: '15' }, ...pt_pack_ref_type]" mode="custom" @change="onRefresh" title="选择入库类型">
|
|
|
@@ -15,15 +17,78 @@
|
|
|
</ut-action-sheet>
|
|
|
</view>
|
|
|
<view class="h-86 pl-20 w-100%">
|
|
|
- <ut-search ref="searchRef" v-model="form.keyword" @search="changeSeach" margin="0" :border="false" placeholder="搜品种名称、批号" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
|
|
|
+ <ut-search ref="searchRef" v-model="form.keyword" @search="onRefresh" margin="0" :border="false" placeholder="搜品种名称、批号" bgColor="#fff" height="86rpx" borderRadius="10rpx"></ut-search>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<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" @click.stop="$u.route({ url: '/plant/storage/fresh-goods/detail/index', params: { id: item.id } })">
|
|
|
-
|
|
|
+ <view class="b-radius bg-#fff pd-20 p-rtv">
|
|
|
+ <view class="d-flex j-sb a-c">
|
|
|
+ <view class="f-s-20 f-w-5">{{ selectDictLabel(pt_pack_ref_type, item.refType) }}</view>
|
|
|
+ <view class="f-s-22 c-#666">
|
|
|
+ {{ item?.packagingDateStart }}
|
|
|
+ <span>至</span>
|
|
|
+ {{ item?.packagingDateEnd }}
|
|
|
+ <span>包装</span>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view>
|
|
|
+ <view class="d-flex a-c">
|
|
|
+ <view>
|
|
|
+ <span></span>
|
|
|
+ <span></span>
|
|
|
+ </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 color="#18BECA">查看批次信息</up-button>
|
|
|
+ <template v-if="item.refType == '2'">
|
|
|
+ <up-button class="ml-10" color="#37A954">立即打印</up-button>
|
|
|
+ <up-button class="ml-10" color="#37A954">查看打印记录</up-button>
|
|
|
+ </template>
|
|
|
+ <template v-if="item.refType == '1'">
|
|
|
+ <up-button class="ml-10" color="#91C747">批量关联</up-button>
|
|
|
+ <up-button class="ml-10" color="#91C747">查看关联记录</up-button>
|
|
|
+ </template>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</up-swipe-action-item>
|
|
|
</up-swipe-action>
|
|
|
@@ -39,23 +104,16 @@
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
-import { selectDictListClass } from '@/utils/ruoyi';
|
|
|
-import { getStorageRoomNames } from '@/utils/common';
|
|
|
-import FreshGoodsBottom from './model/fresh-goods-bottom.vue';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { pt_pack_ref_type } = toRefs<any>(proxy?.useDict('pt_pack_ref_type'));
|
|
|
const list = ref<any[]>();
|
|
|
-const form = ref({ keyword: '', refType: '' });
|
|
|
+const form = ref({ keyword: '', refType: '', codeStatus: '0' });
|
|
|
const paging = ref();
|
|
|
-const showAddDialog = ref(false);
|
|
|
+
|
|
|
const tabs = ref([
|
|
|
- { label: '有库存', value: '1' },
|
|
|
- { label: '无库存', value: '0' },
|
|
|
+ { label: '待包装赋码', value: '0' },
|
|
|
+ { label: '已完成', value: '1' },
|
|
|
]);
|
|
|
-
|
|
|
-const changeSeach = () => {
|
|
|
- paging.value.reload();
|
|
|
-};
|
|
|
const query = async (pageNum: number, pageSize: number) => {
|
|
|
const params = {
|
|
|
pageNum,
|
|
|
@@ -106,7 +164,11 @@ const clickTempSwipe = async (event: object) => {
|
|
|
};
|
|
|
|
|
|
const onRefresh = () => {
|
|
|
- paging.value.reload();
|
|
|
+ try {
|
|
|
+ paging.value?.reload();
|
|
|
+ } catch (error) {
|
|
|
+ console.error('刷新列表失败:', error);
|
|
|
+ }
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
uni.$on('refreshPackTaskList', () => {
|