|
@@ -2,57 +2,105 @@
|
|
|
<view class="pd-24 bg-fff">
|
|
<view class="pd-24 bg-fff">
|
|
|
<up-form class="p-rtv bg-#fff" labelPosition="top" :model="form" errorType="toast" :rules="rules" labelWidth="auto" ref="upFormUpRef">
|
|
<up-form class="p-rtv bg-#fff" labelPosition="top" :model="form" errorType="toast" :rules="rules" labelWidth="auto" ref="upFormUpRef">
|
|
|
<view class="f-s-24 c-#999">导出追溯码仅支持导出追溯码地址用于喷印或排版好追溯码PDF文件直接打印。如有疑问,请。如有疑问,请<span class="c-primary">点击此处联系客服</span>。</view>
|
|
<view class="f-s-24 c-#999">导出追溯码仅支持导出追溯码地址用于喷印或排版好追溯码PDF文件直接打印。如有疑问,请。如有疑问,请<span class="c-primary">点击此处联系客服</span>。</view>
|
|
|
- <view class="h-1" id="fileTypepppp"></view>
|
|
|
|
|
- <ut-action-sheet v-model="form.extraInfo.fileType" :tabs="pt_code_export_type" @change="changeExtraFileType" mode="custom" title="请选择导出类型">
|
|
|
|
|
|
|
+ <slot name="fileType"></slot>
|
|
|
|
|
+ <template v-if="opts.id">
|
|
|
<up-form-item borderBottom label="导出类型" required prop="extraInfo.fileType">
|
|
<up-form-item borderBottom label="导出类型" required prop="extraInfo.fileType">
|
|
|
<view v-if="form.extraInfo?.fileType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_code_export_type, form.extraInfo.fileType) }}</view>
|
|
<view v-if="form.extraInfo?.fileType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_code_export_type, form.extraInfo.fileType) }}</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择导出类型</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择导出类型</view>
|
|
|
- <template #right>
|
|
|
|
|
- <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
|
|
|
|
|
- </template>
|
|
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- </ut-action-sheet>
|
|
|
|
|
- <!-- 导出格式 -->
|
|
|
|
|
- <view class="h-1" id="fileFormatpppp"></view>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <ut-action-sheet v-model="form.extraInfo.fileType" :tabs="pt_code_export_type" @change="changeExtraFileType" mode="custom" title="请选择导出类型">
|
|
|
|
|
+ <up-form-item borderBottom label="导出类型" required prop="extraInfo.fileType">
|
|
|
|
|
+ <view v-if="form.extraInfo?.fileType" class="f-s-30 c-333 f-w-5 flex1">{{ selectDictLabel(pt_code_export_type, form.extraInfo.fileType) }}</view>
|
|
|
|
|
+ <view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择导出类型</view>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <up-icon size="22rpx" color="#37A954" name="arrow-down-fill"></up-icon>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </ut-action-sheet>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <template v-if="form.extraInfo.fileType == '2'">
|
|
|
|
|
+ <slot name="logos"></slot>
|
|
|
|
|
+ <up-form-item borderBottom prop="extraInfo.logos">
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <view class="p-rtv mb-20">
|
|
|
|
|
+ <span class="form-item-label_required">*</span>
|
|
|
|
|
+ <span class="f-s-30 c-#333">打印logo</span>
|
|
|
|
|
+ <span class="f-s-24 c-#999">(最多2种)</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <codeCheckedLogos v-model="form.extraInfo.logos"></codeCheckedLogos>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ <slot name="fields"></slot>
|
|
|
|
|
+ <up-form-item prop="extraInfo.fields" borderBottom>
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <view class="p-rtv mb-20">
|
|
|
|
|
+ <span class="form-item-label_required">*</span>
|
|
|
|
|
+ <span class="f-s-30 c-#333">导出信息</span>
|
|
|
|
|
+ <span class="f-s-24 c-#999">(已默认勾选必打字段,如需其他字段可自行选择)</span>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ <up-checkbox-group v-model="form.extraInfo.fields">
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="品名" name="proName"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="基原" name="genusName"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="批号" name="batchSn"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="规格等级" name="proLevel"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="产地" name="proAdcodeDesc"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="数量(重量)" name="specn"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="采收日期" name="harvestDate"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="包装日期" name="packagingDate"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="保质期" name="expireDate"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="企业名称" name="cpyName"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="溯源码码值" name="code"></up-checkbox>
|
|
|
|
|
+ <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="溯源码图" name="qrcode"></up-checkbox>
|
|
|
|
|
+ <up-checkbox v-if="+info?.gapFlag" :customStyle="{ marginBottom: '8px' }" label="是否符合GAP要求" name="gapFlag"></up-checkbox>
|
|
|
|
|
+ </up-checkbox-group>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+
|
|
|
|
|
+ <slot name="layoutType"></slot>
|
|
|
|
|
+ <up-form-item props="extraInfo.layoutType" label="排版类型" required borderBottom>
|
|
|
|
|
+ <view class="flex1">
|
|
|
|
|
+ <ut-radio v-model="form.extraInfo.layoutType" :options="pt_code_export_layout_type"></ut-radio>
|
|
|
|
|
+ <view class="d-flex j-c a-c pd-24">
|
|
|
|
|
+ <codeStyleTem :fields="form.extraInfo.fields" :logos="form.extraInfo.logos" :info="infoData" :layoutType="form.extraInfo.layoutType"></codeStyleTem>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </view>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ <!-- 导出数量 -->
|
|
|
|
|
+
|
|
|
|
|
+ <slot name="printCount"></slot>
|
|
|
|
|
+ <template v-if="opts.id">
|
|
|
|
|
+ <up-form-item :label="`导出数量`" prop="printCount" required borderBottom>
|
|
|
|
|
+ <up-input v-model="form.printCount" readonly placeholder="请输入导出数量" border="none" clearable></up-input>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span class="f-s-30 f-w-5 c-#333">{{ opts?.unit || form?.unit || 'kg' }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <up-form-item :label="`导出数量`" prop="printCount" required borderBottom>
|
|
|
|
|
+ <up-input v-model="form.printCount" placeholder="请输入导出数量" border="none" clearable></up-input>
|
|
|
|
|
+ <template #right>
|
|
|
|
|
+ <span class="f-s-30 f-w-5 c-#333">{{ opts?.unit || form?.unit || 'kg' }}</span>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <!-- 邮箱 -->
|
|
|
|
|
+ <slot name="email"></slot>
|
|
|
|
|
+ <up-form-item borderBottom required label="邮箱" prop="extraInfo.email">
|
|
|
|
|
+ <up-input v-model="form.extraInfo.email" placeholder="请输入邮箱" border="none" clearable></up-input>
|
|
|
|
|
+ </up-form-item>
|
|
|
|
|
+ </template>
|
|
|
|
|
+
|
|
|
|
|
+ <slot name="fileFormat"></slot>
|
|
|
<up-form-item borderBottom label="导出格式" required prop="extraInfo.fileFormat">
|
|
<up-form-item borderBottom label="导出格式" required prop="extraInfo.fileFormat">
|
|
|
<view v-if="form.extraInfo?.fileFormat" class="f-s-30 c-333 f-w-5 flex1">
|
|
<view v-if="form.extraInfo?.fileFormat" class="f-s-30 c-333 f-w-5 flex1">
|
|
|
{{ selectDictLabel(pt_code_export_format, form.extraInfo?.fileFormat) }}
|
|
{{ selectDictLabel(pt_code_export_format, form.extraInfo?.fileFormat) }}
|
|
|
</view>
|
|
</view>
|
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择导出格式</view>
|
|
<view v-else class="f-s-30 c-ccc f-w-4 flex1">请选择导出格式</view>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
|
- <view class="h-1" id="fieldspppp"></view>
|
|
|
|
|
- <up-form-item prop="extraInfo.fields" borderBottom>
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <view class="p-rtv mb-20">
|
|
|
|
|
- <span class="form-item-label_required">*</span>
|
|
|
|
|
- <span class="f-s-30 c-#333">导出信息</span>
|
|
|
|
|
- <span class="f-s-24 c-#999">(已默认勾选必打字段,如需其他字段可自行选择)</span>
|
|
|
|
|
- </view>
|
|
|
|
|
- <up-checkbox-group v-model="form.extraInfo.fields">
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="品名" name="proName"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="基原" name="genusName"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="批号" name="batchSn"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="规格等级" name="proSpecn"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="产地" name="proAdcodeDesc"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="数量(重量)" name="specn"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="采收日期" name="harvestDate"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="包装日期" name="packagingDate"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="保质期" name="expireDate"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="企业名称" name="cpyName"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" label="溯源码码值" name="code"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ width: '33%', marginBottom: '8px' }" disabled label="溯源码图" name="qrcode"></up-checkbox>
|
|
|
|
|
- <up-checkbox :customStyle="{ marginBottom: '8px' }" label="是否符合GAP要求" name="gapFlag"></up-checkbox>
|
|
|
|
|
- </up-checkbox-group>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
- <up-form-item props="extraInfo.layoutType" label="排版类型" required borderBottom>
|
|
|
|
|
- <view class="flex1">
|
|
|
|
|
- <ut-radio v-model="form.extraInfo.layoutType" :options="pt_code_export_layout_type"></ut-radio>
|
|
|
|
|
- <view class="d-flex j-c a-c pd-24">
|
|
|
|
|
- <codeStyleTem :fields="form.extraInfo.fields" :info="infoData" :layoutType="form.extraInfo.layoutType"></codeStyleTem>
|
|
|
|
|
- </view>
|
|
|
|
|
- </view>
|
|
|
|
|
- </up-form-item>
|
|
|
|
|
<up-form-item :label="`导出人`" required borderBottom>
|
|
<up-form-item :label="`导出人`" required borderBottom>
|
|
|
<up-input v-model="form.printPerson" placeholder="请输入导出人" readonly border="none" clearable></up-input>
|
|
<up-input v-model="form.printPerson" placeholder="请输入导出人" readonly border="none" clearable></up-input>
|
|
|
</up-form-item>
|
|
</up-form-item>
|
|
@@ -60,12 +108,14 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="pd3-40-24-30 d-flex">
|
|
<view class="pd3-40-24-30 d-flex">
|
|
|
<up-button class="mr-30" type="primary" plain @click="prevSteps">上一步</up-button>
|
|
<up-button class="mr-30" type="primary" plain @click="prevSteps">上一步</up-button>
|
|
|
- <up-button type="primary" @click="submitForm">下一步</up-button>
|
|
|
|
|
|
|
+ <up-button type="primary" @click="submitForm">确认导出</up-button>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
import { useInfoStore } from '@/store';
|
|
import { useInfoStore } from '@/store';
|
|
|
import codeStyleTem from './code-style-tem.vue';
|
|
import codeStyleTem from './code-style-tem.vue';
|
|
|
|
|
+import codeCheckedLogos from './code-checked-logos.vue';
|
|
|
|
|
+import { useClientRequest } from '@/utils/request';
|
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
const { proxy } = getCurrentInstance() as ComponentInternalInstance;
|
|
|
const { pt_code_export_type, pt_code_export_format, pt_code_export_layout_type } = toRefs<any>(proxy?.useDict('pt_code_export_type', 'pt_code_export_format', 'pt_code_export_layout_type'));
|
|
const { pt_code_export_type, pt_code_export_format, pt_code_export_layout_type } = toRefs<any>(proxy?.useDict('pt_code_export_type', 'pt_code_export_format', 'pt_code_export_layout_type'));
|
|
|
const infoStore = useInfoStore();
|
|
const infoStore = useInfoStore();
|
|
@@ -95,46 +145,153 @@ const props = defineProps({
|
|
|
type: Object,
|
|
type: Object,
|
|
|
default: () => null,
|
|
default: () => null,
|
|
|
},
|
|
},
|
|
|
|
|
+ paging: {
|
|
|
|
|
+ type: Object,
|
|
|
|
|
+ default: () => null,
|
|
|
|
|
+ },
|
|
|
});
|
|
});
|
|
|
const upFormUpRef = ref();
|
|
const upFormUpRef = ref();
|
|
|
const emit = defineEmits(['next', 'prev', 'formdata']);
|
|
const emit = defineEmits(['next', 'prev', 'formdata']);
|
|
|
-const form = ref({
|
|
|
|
|
|
|
+const form = ref<any>({
|
|
|
|
|
+ printCount: props.opts?.printedCount,
|
|
|
extraInfo: {
|
|
extraInfo: {
|
|
|
fileType: '1',
|
|
fileType: '1',
|
|
|
fileFormat: '1',
|
|
fileFormat: '1',
|
|
|
logos: [], // 导出logo
|
|
logos: [], // 导出logo
|
|
|
// 只有禁用的默认有值,
|
|
// 只有禁用的默认有值,
|
|
|
- fields: ['proName', 'batchSn', 'proSpecn', 'proAdcodeDesc', 'specn', 'cpyName', 'qrcode'], // 导出字段
|
|
|
|
|
|
|
+ fields: ['proName', 'batchSn', 'proLevel', 'proAdcodeDesc', 'specn', 'cpyName', 'code', 'qrcode'], // 导出字段
|
|
|
layoutType: '2', // 排版类型
|
|
layoutType: '2', // 排版类型
|
|
|
|
|
+ email: '',
|
|
|
},
|
|
},
|
|
|
printPerson: infoStore.userInfo?.name, // 导出人
|
|
printPerson: infoStore.userInfo?.name, // 导出人
|
|
|
});
|
|
});
|
|
|
-const rules = reactive({});
|
|
|
|
|
|
|
+const rules = reactive({
|
|
|
|
|
+ 'extraInfo.fileType': [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择导出类型',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'extraInfo.logos': [
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'array',
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择导出logo',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ type: 'array',
|
|
|
|
|
+ max: 2,
|
|
|
|
|
+ message: '最多选择2个logo',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'extraInfo.layoutType': [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择排版类型',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ printCount: [
|
|
|
|
|
+ { required: true, message: '请输入导出数量' },
|
|
|
|
|
+ // 只能输入大于0的正整数
|
|
|
|
|
+ { pattern: /^[1-9]\d*$/, message: '请输入大于0的正整数' },
|
|
|
|
|
+ // 打印数量不能大于剩余可打印数量
|
|
|
|
|
+ {
|
|
|
|
|
+ asyncValidator: (rule: any, value: any) => {
|
|
|
|
|
+ if (value === undefined || value === null || value === '') return Promise.resolve();
|
|
|
|
|
+ const num = Number(value);
|
|
|
|
|
+ if (Number.isNaN(num)) return Promise.reject('导出数量请输入数字');
|
|
|
|
|
+ if (num <= 0) return Promise.reject('导出数量需大于0');
|
|
|
|
|
+ // 打印数量不能大于剩余可打印数量
|
|
|
|
|
+ if (+props?.opts?.printedCount < +num) {
|
|
|
|
|
+ return Promise.reject(`导出数量不能超过待打印数量`);
|
|
|
|
|
+ }
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'extraInfo.email': [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请输入邮箱',
|
|
|
|
|
+ trigger: 'blur',
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ asyncValidator: (rule: any, value: any) => {
|
|
|
|
|
+ // 邮箱校验
|
|
|
|
|
+ const reg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/;
|
|
|
|
|
+ if (reg.test(value)) {
|
|
|
|
|
+ return Promise.resolve();
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return Promise.reject('请输入正确的邮箱');
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+ 'extraInfo.fileFormat': [
|
|
|
|
|
+ {
|
|
|
|
|
+ required: true,
|
|
|
|
|
+ message: '请选择导出格式',
|
|
|
|
|
+ trigger: 'change',
|
|
|
|
|
+ },
|
|
|
|
|
+ ],
|
|
|
|
|
+});
|
|
|
const changeExtraFileType = (val: any) => {
|
|
const changeExtraFileType = (val: any) => {
|
|
|
- console.log(val);
|
|
|
|
|
form.value.extraInfo.fileFormat = val;
|
|
form.value.extraInfo.fileFormat = val;
|
|
|
|
|
+ form.value.printCount = props.opts?.printedCount;
|
|
|
};
|
|
};
|
|
|
const submitForm = async () => {
|
|
const submitForm = async () => {
|
|
|
try {
|
|
try {
|
|
|
await upFormUpRef.value?.validate();
|
|
await upFormUpRef.value?.validate();
|
|
|
} catch (error: any) {
|
|
} catch (error: any) {
|
|
|
|
|
+ // 滚动到第一个错误字段
|
|
|
|
|
+ const firstErrorField = error && error[0].field + 'pppp';
|
|
|
|
|
+ props.paging?.scrollIntoViewById(firstErrorField, 30, true);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- emit('formdata', {
|
|
|
|
|
- ...form.value,
|
|
|
|
|
|
|
+ uni.showLoading({
|
|
|
|
|
+ title: '正在导出...',
|
|
|
});
|
|
});
|
|
|
- emit('next', {
|
|
|
|
|
- info: {
|
|
|
|
|
- ...props.info,
|
|
|
|
|
- status: 'completed',
|
|
|
|
|
- },
|
|
|
|
|
- nextStepValue: props.nextStepValue || 'print',
|
|
|
|
|
|
|
+ const payload = {
|
|
|
|
|
+ ...props.opts,
|
|
|
|
|
+ ...form.value,
|
|
|
|
|
+ };
|
|
|
|
|
+ const res = props.opts?.id ? await useClientRequest.get(`/plt-api/app/printLog/update/${props.opts.id}`, payload?.extraInfo) : await useClientRequest.post('/plt-api/app/printLog/printNext', payload);
|
|
|
|
|
+ if (!res || res.code !== 200) return;
|
|
|
|
|
+ uni.$emit('refreshPackTaskList');
|
|
|
|
|
+ uni.$emit('refreshPackTaskDetail');
|
|
|
|
|
+ await useClientRequest.get(`/plt-api/app/printLog/export/${res.data?.id || props.opts?.id}`);
|
|
|
|
|
+ uni.hideLoading();
|
|
|
|
|
+ uni.showToast({
|
|
|
|
|
+ title: '导出成功',
|
|
|
|
|
+ icon: 'success',
|
|
|
});
|
|
});
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.navigateBack({
|
|
|
|
|
+ delta: 1,
|
|
|
|
|
+ });
|
|
|
|
|
+ }, 800);
|
|
|
};
|
|
};
|
|
|
const prevSteps = () => {
|
|
const prevSteps = () => {
|
|
|
emit('prev', {
|
|
emit('prev', {
|
|
|
prevStepValue: props.prevStepValue || 'confirm',
|
|
prevStepValue: props.prevStepValue || 'confirm',
|
|
|
});
|
|
});
|
|
|
};
|
|
};
|
|
|
-onMounted(() => {});
|
|
|
|
|
|
|
+// getFormInfo
|
|
|
|
|
+const getFormInfo = async () => {
|
|
|
|
|
+ if (!props.opts.id) return;
|
|
|
|
|
+ const res = await useClientRequest.get(`/plt-api/app/printLog/${props.opts.id}`);
|
|
|
|
|
+ if (res && res.code === 200) {
|
|
|
|
|
+ form.value = {
|
|
|
|
|
+ ...form.value,
|
|
|
|
|
+ ...res.data,
|
|
|
|
|
+ };
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+onMounted(() => {
|
|
|
|
|
+ getFormInfo();
|
|
|
|
|
+});
|
|
|
</script>
|
|
</script>
|