| | |
| | | <Button @click="toPrint" type="primary" ghost |
| | | v-if="allowOperation.ship && logisticsType != 'SHUNFENG'">打印电子面单</Button> |
| | | <Button @click="modifyRemark" type="primary">添加备注</Button> |
| | | <!-- 将编辑模板按钮移到这里 --> |
| | | <Button v-if="orderInfo.userCheckTemplates && orderInfo.userCheckTemplates.length > 0" |
| | | @click="editTemplateInfo(orderInfo.userCheckTemplates[0].templateId, sn)" |
| | | type="primary">编辑模板</Button> |
| | | </div> |
| | | </Card> |
| | | |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <!-- 3. 文本内容:判断 content 是「图片URL」还是「纯文本」 --> |
| | | <div class="div-item"> |
| | | <div class="div-item-left">{{isUrl(item.content)? '图片:':'文本内容'}}</div> |
| | |
| | | <span v-else>{{ item.content || '无文本内容' }}</span> <!-- 纯文本/空值处理 --> |
| | | </div> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <!-- 可选:循环项分隔线,优化视觉 --> |
| | | <hr v-if="index !== orderInfo.userCheckTemplates.length - 1" style="margin: 15px 0; border: none; border-top: 1px solid #eee;"> |
| | |
| | | </Modal> |
| | | |
| | | <multipleMap ref="map" @callback="getAddress"></multipleMap> |
| | | |
| | | <!-- 添加模板编辑弹窗 --> |
| | | <EditTemplateModal |
| | | v-model="editTemplateModalVisible" |
| | | :template-id="currentTemplateId" |
| | | :order-sn="sn" |
| | | @success="handleTemplateEditSuccess" |
| | | @cancel="editTemplateModalVisible = false" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | import * as RegExp from "@/libs/RegExp.js"; |
| | | |
| | | import multipleMap from "@/views/my-components/map/multiple-map"; |
| | | |
| | | import EditTemplateModal from "./editTemplateModal.vue"; |
| | | |
| | | export default { |
| | | name: "orderDetail", |
| | | components: { |
| | | multipleMap, |
| | | EditTemplateModal |
| | | }, |
| | | data () { |
| | | return { |
| | |
| | | }, |
| | | ], |
| | | orderPackage: [], |
| | | packageTraceList: [] |
| | | packageTraceList: [], |
| | | // 添加模板编辑弹窗相关数据 |
| | | editTemplateModalVisible: false, |
| | | currentTemplateId: "" |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | }) |
| | | }, |
| | | |
| | | // 编辑模板信息 |
| | | editTemplateInfo(templateId, orderSn) { |
| | | console.log("调用editTemplateInfo,参数:", { |
| | | templateId: templateId, |
| | | orderSn: orderSn |
| | | }); |
| | | this.currentTemplateId = templateId; |
| | | this.editTemplateModalVisible = true; |
| | | }, |
| | | |
| | | // 模板编辑成功回调 |
| | | handleTemplateEditSuccess() { |
| | | this.editTemplateModalVisible = false; |
| | | // 可以在这里刷新数据或提示用户 |
| | | this.$Message.success("模板信息已更新"); |
| | | // 刷新订单详情页面数据 |
| | | this.getDataDetail(); |
| | | } |
| | | }, |
| | | mounted () { |
| | | this.sn = this.$route.query.sn; |