|
@@ -130,6 +130,7 @@ import {
|
|
} from "@/api/business/outsourcedOrder";
|
|
} from "@/api/business/outsourcedOrder";
|
|
import orderForm from "./form";
|
|
import orderForm from "./form";
|
|
import printJS from "print-js";
|
|
import printJS from "print-js";
|
|
|
|
+import { nextTick } from "vue";
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
/** 字典数组区 */
|
|
/** 字典数组区 */
|
|
const { delivery_method } = proxy.useDict("delivery_method");
|
|
const { delivery_method } = proxy.useDict("delivery_method");
|
|
@@ -211,16 +212,16 @@ function handleView(row) {
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
function handleDelete(row) {
|
|
function handleDelete(row) {
|
|
const _ids = row.id || ids.value;
|
|
const _ids = row.id || ids.value;
|
|
- proxy.$modal
|
|
|
|
- .confirm("是否确认删除选中的数据项?")
|
|
|
|
- .then(function () {
|
|
|
|
- return delOrder(_ids);
|
|
|
|
- })
|
|
|
|
- .then(() => {
|
|
|
|
- getList();
|
|
|
|
- proxy.$modal.msgSuccess("删除成功!");
|
|
|
|
- })
|
|
|
|
- .catch(() => {});
|
|
|
|
|
|
+ proxy.$modal
|
|
|
|
+ .confirm("是否确认删除选中的数据项?")
|
|
|
|
+ .then(function () {
|
|
|
|
+ return delOrder(_ids);
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ getList();
|
|
|
|
+ proxy.$modal.msgSuccess("删除成功!");
|
|
|
|
+ })
|
|
|
|
+ .catch(() => { });
|
|
}
|
|
}
|
|
|
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
@@ -243,12 +244,14 @@ function handlePrintCarrierCode() {
|
|
getCarrierInfo(ids.value).then(res => {
|
|
getCarrierInfo(ids.value).then(res => {
|
|
if (res.code === 200) {
|
|
if (res.code === 200) {
|
|
printCarriers.value = res.data
|
|
printCarriers.value = res.data
|
|
- const imageGroup = document.getElementById("image-group");
|
|
|
|
- printJS({
|
|
|
|
- printable: "image-group", // 这里是你要打印内容的DOM元素的id
|
|
|
|
- type: "html",
|
|
|
|
- style: "@page { size: auto; margin: 0mm; }", // 可以添加打印样式
|
|
|
|
- });
|
|
|
|
|
|
+ nextTick(_ => {
|
|
|
|
+ const imageGroup = document.getElementById("image-group");
|
|
|
|
+ printJS({
|
|
|
|
+ printable: "image-group", // 这里是你要打印内容的DOM元素的id
|
|
|
|
+ type: "html",
|
|
|
|
+ style: "@page { size: auto; margin: 0mm; }", // 可以添加打印样式
|
|
|
|
+ });
|
|
|
|
+ })
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|