|
@@ -23,9 +23,9 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="pd-24 bg-#f7f7f7">
|
|
<view class="pd-24 bg-#f7f7f7">
|
|
|
<up-swipe-action>
|
|
<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 @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>
|
|
|
|
|
|
|
+ <up-swipe-action-item v-for="(item, index) in list" :key="index" :name="item?.id" :disabled="+item?.bgStatus" :options="optionsActionTemp" @click="clickTempSwipe($event, item)" class="mb-20 b-radius">
|
|
|
|
|
+ <view class="b-radius bg-#fff p-rtv">
|
|
|
|
|
+ <pack-card :item="item" :dict="{ pt_pack_ref_type }" isArrow @click="$u.route({ url: '/plant/packaging/detail/index', params: { id: item?.id } })">
|
|
|
<view class="h-1 bg-#F7F7F7 mg2-10-0"></view>
|
|
<view class="h-1 bg-#F7F7F7 mg2-10-0"></view>
|
|
|
<view class="pt-10 d-flex">
|
|
<view class="pt-10 d-flex">
|
|
|
<view class="flex1"></view>
|
|
<view class="flex1"></view>
|
|
@@ -39,12 +39,12 @@
|
|
|
:customStyle="formItemBtnListStyle"
|
|
:customStyle="formItemBtnListStyle"
|
|
|
>查看批次信息</up-button>
|
|
>查看批次信息</up-button>
|
|
|
<template v-if="item.refType == '2'">
|
|
<template v-if="item.refType == '2'">
|
|
|
- <up-button :customStyle="formItemBtnListStyle" 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 :customStyle="formItemBtnListStyle" v-if="+item?.printCount" @click="$u.route({ url: '/plant/packaging/detail/index', params: { id: item?.id, viewMode: 'print' } })" class="ml-10" color="#37A954">查看打印记录</up-button>
|
|
|
|
|
|
|
+ <up-button :customStyle="formItemBtnListStyle" :disabled="+item?.bgStatus" 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 :customStyle="formItemBtnListStyle" :disabled="+item?.bgStatus" v-if="+item?.printCount" @click="$u.route({ url: '/plant/packaging/detail/index', params: { id: item?.id, viewMode: 'print' } })" class="ml-10" color="#37A954">查看打印记录</up-button>
|
|
|
</template>
|
|
</template>
|
|
|
<template v-if="item.refType == '1'">
|
|
<template v-if="item.refType == '1'">
|
|
|
- <up-button :customStyle="formItemBtnListStyle" @click="$u.route({ url: '/plant/packaging/batch-link/index', params: { packId: item?.id } })" v-if="(+item?.planCount > +item?.actualCount)" class="ml-10" color="#91C747">批量关联</up-button>
|
|
|
|
|
- <up-button :customStyle="formItemBtnListStyle" v-if="+item?.actualCount" class="ml-10" color="#91C747">查看关联记录</up-button>
|
|
|
|
|
|
|
+ <up-button :customStyle="formItemBtnListStyle" :disabled="+item?.bgStatus" @click="$u.route({ url: '/plant/packaging/batch-link/index', params: { packId: item?.id } })" v-if="(+item?.planCount > +item?.actualCount)" class="ml-10" color="#91C747">批量关联</up-button>
|
|
|
|
|
+ <up-button :customStyle="formItemBtnListStyle" :disabled="+item?.bgStatus" v-if="+item?.actualCount" class="ml-10" color="#91C747">查看关联记录</up-button>
|
|
|
</template>
|
|
</template>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -102,13 +102,13 @@ const optionsActionTemp = reactive([
|
|
|
},
|
|
},
|
|
|
]);
|
|
]);
|
|
|
// 暂存项删除点击(本地移除)
|
|
// 暂存项删除点击(本地移除)
|
|
|
-const clickTempSwipe = async (event: object) => {
|
|
|
|
|
|
|
+const clickTempSwipe = async (event: object, item: any) => {
|
|
|
const { name, index } = event as any;
|
|
const { name, index } = event as any;
|
|
|
if (index === 0) {
|
|
if (index === 0) {
|
|
|
try {
|
|
try {
|
|
|
const res = await uni.showModal({
|
|
const res = await uni.showModal({
|
|
|
title: '删除提示',
|
|
title: '删除提示',
|
|
|
- content: '确定删除鲜货信息吗?',
|
|
|
|
|
|
|
+ content: '删除后,分包重量将退回相应的库存,是否确认删除?',
|
|
|
confirmColor: '#F74C30',
|
|
confirmColor: '#F74C30',
|
|
|
});
|
|
});
|
|
|
if (!res.confirm) return;
|
|
if (!res.confirm) return;
|
|
@@ -116,7 +116,7 @@ const clickTempSwipe = async (event: object) => {
|
|
|
title: '删除中...',
|
|
title: '删除中...',
|
|
|
mask: true,
|
|
mask: true,
|
|
|
});
|
|
});
|
|
|
- await useClientRequest.get(`/plt-api/app/storage/removeById/${name}`);
|
|
|
|
|
|
|
+ await useClientRequest.get(`/plt-api/app/packTask/delete/${name}`);
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '删除成功',
|
|
title: '删除成功',
|
|
@@ -124,7 +124,7 @@ const clickTempSwipe = async (event: object) => {
|
|
|
});
|
|
});
|
|
|
paging.value?.reload();
|
|
paging.value?.reload();
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- console.error('删除暂存鲜货信息失败:', error);
|
|
|
|
|
|
|
+ console.error('删除暂存包装任务失败:', error);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|