|
@@ -1,34 +1,33 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <z-paging
|
|
|
|
|
- ref="paging"
|
|
|
|
|
- bgcolor="#F7F7F7"
|
|
|
|
|
- v-model="list"
|
|
|
|
|
- @query="query"
|
|
|
|
|
- safe-area-inset-bottom
|
|
|
|
|
- scroll-with-animation
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <z-paging ref="paging" bgcolor="#F7F7F7" v-model="list" @query="query" safe-area-inset-bottom scroll-with-animation>
|
|
|
<template #top>
|
|
<template #top>
|
|
|
<ut-navbar title="包装任务详情" :fixed="false" border></ut-navbar>
|
|
<ut-navbar title="包装任务详情" :fixed="false" border></ut-navbar>
|
|
|
</template>
|
|
</template>
|
|
|
<view class="d-flex a-c pd3-30-24-0 f-s-30 f-w-5">
|
|
<view class="d-flex a-c pd3-30-24-0 f-s-30 f-w-5">
|
|
|
- <view
|
|
|
|
|
- class="pd2-20-36 card-item-box mr-10 active"
|
|
|
|
|
- >{{ form?.refType == '2' ? '打印详情' : '关联详情' }}</view>
|
|
|
|
|
|
|
+ <view class="pd2-20-36 card-item-box mr-10 active">{{ form?.refType == '2' ? '打印详情' : '关联详情' }}</view>
|
|
|
<view @click="changeTebs" class="pd2-20-36 card-item-box">包装任务信息</view>
|
|
<view @click="changeTebs" class="pd2-20-36 card-item-box">包装任务信息</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="bg-fff pd-24">
|
|
<view class="bg-fff pd-24">
|
|
|
- <view class="detail-info-card ov-hd p-rtv mb-40">
|
|
|
|
|
- <pack-card :item="form" :dict="dict"></pack-card>
|
|
|
|
|
- <view>
|
|
|
|
|
- <view class></view>
|
|
|
|
|
- <view></view>
|
|
|
|
|
- <view></view>
|
|
|
|
|
|
|
+ <view class="detail-info-card p-rtv mb-40">
|
|
|
|
|
+ <pack-card :item="form" :dict="dict">
|
|
|
|
|
+ <view class="pd-20"></view>
|
|
|
|
|
+ </pack-card>
|
|
|
|
|
+ <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 } })">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="btn-bottom-bt ss-style" @click="$u.route({ url: '/plant/export-print/export/index', params: { packId: form?.id, autoRelationId: form?.autoRelationId, printedCount: form?.actualCount - form?.printCount} })">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <view class="btn-bottom-bt fs-style">
|
|
|
|
|
+ <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>
|
|
|
|
|
+ </view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view
|
|
|
|
|
- class="d-flex a-c pd2-10-0 j-ed"
|
|
|
|
|
- @click="$u.route({ url: '/tools/view-html/index', params: { url: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/template/pack_code_type.html', title: '赋码方式区别' } })"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <view class="d-flex a-c pd2-10-0 j-ed" @click="$u.route({ url: '/tools/view-html/index', params: { url: 'https://ta.zycpzs.cn/oss-file/smart-trace/szyy/template/pack_print_type.html', title: '打印方式的区别' } })">
|
|
|
<up-icon size="28rpx" name="question-circle" color="#999"></up-icon>
|
|
<up-icon size="28rpx" name="question-circle" color="#999"></up-icon>
|
|
|
<span class="c-#999 f-s-24">三种打印方式的区别?怎么选择?</span>
|
|
<span class="c-#999 f-s-24">三种打印方式的区别?怎么选择?</span>
|
|
|
</view>
|
|
</view>
|
|
@@ -54,10 +53,10 @@
|
|
|
<view class="flex1 ov-hd">打印人:{{ item?.createByName || '-' }}</view>
|
|
<view class="flex1 ov-hd">打印人:{{ item?.createByName || '-' }}</view>
|
|
|
<view class="pr-100">打印时间:{{ item?.createTime || '-' }}</view>
|
|
<view class="pr-100">打印时间:{{ item?.createTime || '-' }}</view>
|
|
|
</view>
|
|
</view>
|
|
|
- <view class="pt-20 d-flex">
|
|
|
|
|
|
|
+ <view class="pt-20 d-flex">
|
|
|
<view class="flex1"></view>
|
|
<view class="flex1"></view>
|
|
|
<view class="d-flex a-c">
|
|
<view class="d-flex a-c">
|
|
|
- <up-button @click="$u.route({ url: '/plant/print/print-all/index', params: item })" :customStyle="formItemBtnListStyle" class="ml-20" color="#18BECA">全部打印</up-button>
|
|
|
|
|
|
|
+ <up-button @click="clickAllPrint(item)" :customStyle="formItemBtnListStyle" class="ml-20" color="#18BECA">全部打印</up-button>
|
|
|
<up-button @click="$u.route({ url: '/plant/print/print-range/index', params: item })" :customStyle="formItemBtnListStyle" class="ml-20" color="#37A954">区间打印</up-button>
|
|
<up-button @click="$u.route({ url: '/plant/print/print-range/index', params: item })" :customStyle="formItemBtnListStyle" class="ml-20" color="#37A954">区间打印</up-button>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -71,35 +70,35 @@
|
|
|
</z-paging>
|
|
</z-paging>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { useClientRequest } from "@/utils/request";
|
|
|
|
|
-import PackCard from "@/plant/models/pack-card.vue";
|
|
|
|
|
-import { formItemBtnListStyle } from "@/assets/styles/uview-plus";
|
|
|
|
|
|
|
+import { useClientRequest } from '@/utils/request';
|
|
|
|
|
+import PackCard from '@/plant/models/pack-card.vue';
|
|
|
|
|
+import { formItemBtnListStyle } from '@/assets/styles/uview-plus';
|
|
|
|
|
|
|
|
const paging = ref(null);
|
|
const paging = ref(null);
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
|
packId: {
|
|
packId: {
|
|
|
type: String,
|
|
type: String,
|
|
|
- default: ""
|
|
|
|
|
|
|
+ default: '',
|
|
|
},
|
|
},
|
|
|
form: {
|
|
form: {
|
|
|
type: Object,
|
|
type: Object,
|
|
|
- default: () => null
|
|
|
|
|
|
|
+ default: () => null,
|
|
|
},
|
|
},
|
|
|
dict: {
|
|
dict: {
|
|
|
type: Object,
|
|
type: Object,
|
|
|
- default: () => null
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ default: () => null,
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
-const printType = ref("1");
|
|
|
|
|
|
|
+const printType = ref('1');
|
|
|
const { pt_pack_ref_type } = toRefs(props?.dict);
|
|
const { pt_pack_ref_type } = toRefs(props?.dict);
|
|
|
-const emit = defineEmits(["changeTebs"]);
|
|
|
|
|
|
|
+const emit = defineEmits(['changeTebs']);
|
|
|
const tabs = reactive([
|
|
const tabs = reactive([
|
|
|
- { label: "打印记录", value: "1" },
|
|
|
|
|
- { label: "导出记录", value: "2" },
|
|
|
|
|
- { label: "找人代打记录", value: "3" }
|
|
|
|
|
|
|
+ { label: '打印记录', value: '1' },
|
|
|
|
|
+ { label: '导出记录', value: '2' },
|
|
|
|
|
+ { label: '找人代打记录', value: '3' },
|
|
|
]);
|
|
]);
|
|
|
const changeTebs = () => {
|
|
const changeTebs = () => {
|
|
|
- emit("changeTebs", "pack");
|
|
|
|
|
|
|
+ emit('changeTebs', 'pack');
|
|
|
};
|
|
};
|
|
|
const list = ref([]);
|
|
const list = ref([]);
|
|
|
const query = async (pageNum: number, pageSize: number) => {
|
|
const query = async (pageNum: number, pageSize: number) => {
|
|
@@ -107,12 +106,9 @@ const query = async (pageNum: number, pageSize: number) => {
|
|
|
pageNum,
|
|
pageNum,
|
|
|
pageSize,
|
|
pageSize,
|
|
|
packId: props.packId,
|
|
packId: props.packId,
|
|
|
- printType: printType.value
|
|
|
|
|
|
|
+ printType: printType.value,
|
|
|
};
|
|
};
|
|
|
- const res = await useClientRequest.get(
|
|
|
|
|
- "/plt-api/app/printLog/list",
|
|
|
|
|
- params
|
|
|
|
|
- );
|
|
|
|
|
|
|
+ const res = await useClientRequest.get('/plt-api/app/printLog/list', params);
|
|
|
if (res && res?.rows) {
|
|
if (res && res?.rows) {
|
|
|
const { rows } = res;
|
|
const { rows } = res;
|
|
|
paging.value.complete(rows);
|
|
paging.value.complete(rows);
|
|
@@ -122,9 +118,28 @@ const onRefresh = () => {
|
|
|
try {
|
|
try {
|
|
|
paging.value?.reload();
|
|
paging.value?.reload();
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
- console.error("刷新列表失败:", error);
|
|
|
|
|
|
|
+ console.error('刷新列表失败:', error);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+const clickAllPrint = async (item) => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const res = await uni.showModal({
|
|
|
|
|
+ title: '全部打印提示',
|
|
|
|
|
+ content: '您确认需要再次打印该条记录的全部追溯码吗?',
|
|
|
|
|
+ confirmColor: '#37A954',
|
|
|
|
|
+ });
|
|
|
|
|
+ if (res.confirm) {
|
|
|
|
|
+ uni.$u.route({ url: '/plant/print/print-all/index', params: item });
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('', error);
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ uni.$on('refreshPackTaskDetail', () => {
|
|
|
|
|
+ onRefresh();
|
|
|
|
|
+ });
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
.card-item-box {
|
|
.card-item-box {
|
|
@@ -140,4 +155,39 @@ const onRefresh = () => {
|
|
|
border-radius: 16rpx;
|
|
border-radius: 16rpx;
|
|
|
border: 1rpx solid #9dd5ab;
|
|
border: 1rpx solid #9dd5ab;
|
|
|
}
|
|
}
|
|
|
|
|
+.btn-bottom-bt {
|
|
|
|
|
+ width: 208rpx;
|
|
|
|
|
+ height: 74rpx;
|
|
|
|
|
+ border-radius: 8rpx;
|
|
|
|
|
+ border: 1px solid #000;
|
|
|
|
|
+ font-size: 26rpx;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+}
|
|
|
|
|
+.btn-card-wrapper {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 20rpx;
|
|
|
|
|
+ bottom: -37rpx;
|
|
|
|
|
+ right: 20rpx;
|
|
|
|
|
+ z-index: 10;
|
|
|
|
|
+}
|
|
|
|
|
+.ls-style {
|
|
|
|
|
+ background-color: #e3fbea;
|
|
|
|
|
+ box-shadow: inset 0 0 10px #d2f3da;
|
|
|
|
|
+ border-color: #9bd4a9;
|
|
|
|
|
+ color: #37a954;
|
|
|
|
|
+}
|
|
|
|
|
+.ss-style {
|
|
|
|
|
+ background-color: #e5fdff;
|
|
|
|
|
+ box-shadow: inset 0 0 10px #c7f5f8;
|
|
|
|
|
+ border-color: #93e8ee;
|
|
|
|
|
+ color: #18beca;
|
|
|
|
|
+}
|
|
|
|
|
+.fs-style {
|
|
|
|
|
+ background-color: #fffaf3;
|
|
|
|
|
+ box-shadow: inset 0 0 10px #ffeed7;
|
|
|
|
|
+ border-color: #ffd499;
|
|
|
|
|
+ color: #fc8834;
|
|
|
|
|
+}
|
|
|
</style>
|
|
</style>
|