|
@@ -13,15 +13,15 @@
|
|
|
<view class="pd-20"></view>
|
|
<view class="pd-20"></view>
|
|
|
</pack-card>
|
|
</pack-card>
|
|
|
<view class="btn-card-wrapper d-flex a-c j-sb">
|
|
<view class="btn-card-wrapper d-flex a-c j-sb">
|
|
|
- <view class="btn-bottom-bt ls-style" @click.stop="$u.route({ url: '/plant/print/print-self/index', params: { packId: form?.id, autoRelationId: form?.autoRelationId, unit: form?.unit, printedCount: form?.actualCount - form?.printCount } })">
|
|
|
|
|
|
|
+ <view class="btn-bottom-bt ls-style" @click.stop="goPrint({ packId: form?.id, autoRelationId: form?.autoRelationId, unit: form?.unit, printedCount: form?.actualCount - form?.printCount }, '/plant/print/print-self/index')">
|
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/btn_zxdy_icon.png" mode="widthFix" />
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/btn_zxdy_icon.png" mode="widthFix" />
|
|
|
<span>自行打印</span>
|
|
<span>自行打印</span>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="btn-bottom-bt ss-style" @click="$u.route({ url: '/plant/export-print/export/index', params: { packId: form?.id, autoRelationId: form?.autoRelationId, unit: form?.unit, printedCount: form?.actualCount - form?.printCount} })">
|
|
|
|
|
|
|
+ <view class="btn-bottom-bt ss-style" @click="goPrint({ packId: form?.id, autoRelationId: form?.autoRelationId, unit: form?.unit, printedCount: form?.actualCount - form?.printCount }, '/plant/export-print/export/index')">
|
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/dczsm_icon.png" mode="widthFix" />
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/dczsm_icon.png" mode="widthFix" />
|
|
|
<span>导出追溯码</span>
|
|
<span>导出追溯码</span>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="btn-bottom-bt fs-style">
|
|
|
|
|
|
|
+ <view class="btn-bottom-bt fs-style" @click="showFeatureUnavailable()">
|
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/btn_zrdd_icon.png" mode="widthFix" />
|
|
<image class="w-32 h-32 mr-8" src="https://ta.zycpzs.cn/oss-file/smart-trace/szyy/images-plt/print-codes/btn_zrdd_icon.png" mode="widthFix" />
|
|
|
<span>找人代打</span>
|
|
<span>找人代打</span>
|
|
|
</view>
|
|
</view>
|
|
@@ -62,7 +62,32 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
- <template></template>
|
|
|
|
|
|
|
+ <template v-if="item?.printType == '2'">
|
|
|
|
|
+ <view class="mb-20 pd-20 bg-#F7F7F7 b-radius">
|
|
|
|
|
+ <view class="f-s-24 c-#333 f-w-5">{{ selectDictLabel(pt_code_export_type, item?.extraInfo?.fileType) }}</view>
|
|
|
|
|
+ <view class="f-s-28 pd2-4-0">
|
|
|
|
|
+ <span class="c-#666">导出数量:</span>
|
|
|
|
|
+ <span class="c-#333 f-w-5">{{ item?.printCount }}</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="f-s-28 pd2-4-0 d-flex">
|
|
|
|
|
+ <span class="c-#666">导出码值:</span>
|
|
|
|
|
+ <view class="flex1 ov-hd c-#333 f-w-5">
|
|
|
|
|
+ <view>{{ item?.traceCodeStart }} 至</view>
|
|
|
|
|
+ <view>{{ item?.traceCodeEnd }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="d-flex f-s-24 c-#666">
|
|
|
|
|
+ <view class="flex1 ov-hd">导出人:{{ item?.createByName || '-' }}</view>
|
|
|
|
|
+ <view class="pr-100">导出时间:{{ item?.createTime || '-' }}</view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="pt-20 d-flex">
|
|
|
|
|
+ <view class="flex1"></view>
|
|
|
|
|
+ <view class="d-flex a-c">
|
|
|
|
|
+ <up-button @click="$u.route({ url: '/plant/export-print/export/index', params: item })" :customStyle="formItemBtnListStyle" color="#18BECA">重新导出</up-button>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </template>
|
|
|
<template></template>
|
|
<template></template>
|
|
|
</template>
|
|
</template>
|
|
|
</view>
|
|
</view>
|
|
@@ -73,6 +98,7 @@
|
|
|
import { useClientRequest } from '@/utils/request';
|
|
import { useClientRequest } from '@/utils/request';
|
|
|
import PackCard from '@/plant/models/pack-card.vue';
|
|
import PackCard from '@/plant/models/pack-card.vue';
|
|
|
import { formItemBtnListStyle } from '@/assets/styles/uview-plus';
|
|
import { formItemBtnListStyle } from '@/assets/styles/uview-plus';
|
|
|
|
|
+import { showFeatureUnavailable } from '@/utils/common';
|
|
|
|
|
|
|
|
const paging = ref<any>(null);
|
|
const paging = ref<any>(null);
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -90,7 +116,7 @@ const props = defineProps({
|
|
|
},
|
|
},
|
|
|
});
|
|
});
|
|
|
const printType = ref('1');
|
|
const printType = ref('1');
|
|
|
-const { pt_pack_ref_type } = toRefs(props?.dict);
|
|
|
|
|
|
|
+const { pt_pack_ref_type, pt_code_export_type } = toRefs(props?.dict);
|
|
|
const emit = defineEmits(['changeTebs']);
|
|
const emit = defineEmits(['changeTebs']);
|
|
|
const tabs = reactive([
|
|
const tabs = reactive([
|
|
|
{ label: '打印记录', value: '1' },
|
|
{ label: '打印记录', value: '1' },
|
|
@@ -132,7 +158,23 @@ const clickAllPrint = async (item: any) => {
|
|
|
uni.$u.route({ type: 'navigateTo', url: '/plant/print/print-all/index', params: item });
|
|
uni.$u.route({ type: 'navigateTo', url: '/plant/print/print-all/index', params: item });
|
|
|
}
|
|
}
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- console.error('', error);
|
|
|
|
|
|
|
+ console.error('全部打印失败:', error);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+const goPrint = async (params: any, url: string) => {
|
|
|
|
|
+ if (!params?.printedCount) {
|
|
|
|
|
+ uni.showModal({
|
|
|
|
|
+ title: '提示',
|
|
|
|
|
+ content: '没有可打印的追溯码了哦~',
|
|
|
|
|
+ showCancel: false,
|
|
|
|
|
+ confirmColor: '#37A954',
|
|
|
|
|
+ });
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ try {
|
|
|
|
|
+ uni.$u.route({ type: 'navigateTo', url: url || '/plant/print/print-self/index', params });
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('跳转打印页面失败:', error);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|