UNPKG

logwire-wms-ui-test

Version:

运匠科技wms-PDA基础组件库

181 lines (180 loc) 8.83 kB
import { n, C as l, D as u } from "./index.f1359381.mjs"; import "vue"; const r = { name: "collapseItem", props: { item: { type: Object, default: () => { } } }, data() { return { activeCollapse: [] }; }, methods: {} }; var i = function() { var t = this, a = t._self._c; return a("div", { staticClass: "lw-global-collapse-box" }, [a("van-collapse", { attrs: { border: !1 }, model: { value: t.activeCollapse, callback: function(e) { t.activeCollapse = e; }, expression: "activeCollapse" } }, [a("van-collapse-item", { attrs: { name: "1" }, scopedSlots: t._u([{ key: "title", fn: function() { return [a("div", { staticClass: "lw-global-flex-between" }, [a("div", { staticClass: "lw-global-title" }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.iwomuosq", "\u6346\u5305\u7BB1\u5546\u54C1\u5217\u8868")) + " ")]), a("div", { staticClass: "lw-global-title" }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.spsgqdjo", "\u884C\u6570 ")) + " "), a("span", { staticClass: "lw-global-value-bold" }, [t._v(t._s(t.item.skuList.length))])]), a("div", { staticClass: "lw-global-title" }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.nxxcraqt", "\u6570\u91CF ")) + " "), a("span", { staticClass: "lw-global-value-bold-red" }, [t._v(t._s(t.item.skuQty))])])])]; }, proxy: !0 }]) }, t._l(t.item.skuList, function(e, s) { return a("lw-sku-info-module", { key: e.skuId, attrs: { "sku-name": e.skuName, "sku-code": e.skuCode, qty: e.qty, "is-row": s !== 0 && s + 1 < t.item.skuList.length, "is-row-first": s === 0, "is-row-last": s + 1 === t.item.skuList.length } }); }), 1)], 1)], 1); }, c = [], p = /* @__PURE__ */ n( r, i, c, !1, null, "7f974a52", null, null ); const m = p.exports; const d = { name: "LwOutboundReprintBoxListPage", components: { collapseItem: m }, data() { return { param: { customerCode: { value: null, focus: !1 }, soNo: { value: null, focus: !1 }, boxNo: { value: null, focus: !1 }, sn: { value: null, focus: !1 } }, boxes: [], showEmpty: !1, query: { pageNum: 1, pageSize: 10, total: 0, customerCode: null, soNo: null, boxNo: null, sn: null }, printData: {} }; }, methods: { queryData() { this.showEmpty = !1, this.query.customerCode = this.param.customerCode.value, this.query.soNo = this.param.soNo.value, this.query.boxNo = this.param.boxNo.value, this.query.sn = this.param.sn.value, this.loadPage(1); }, loadPage(o) { const t = { ...this.query, pageNum: o || 1 }; l(t).then((a) => { this.query.pageNum = a.pageNum, this.query.pageSize = a.pageSize, this.query.total = a.total, a.datas.forEach((e) => e.fold = !1), this.boxes = a.datas, (!this.boxes || !this.boxes.length) && (this.showEmpty = !0); }); }, checkPrint() { if (this.printData.printId) return !0; const { success: o, printData: t } = this.$lwPrint.test( "OUTBOUND_BOX_LABEL", this.$lwLanguage.get("", "\u51FA\u5E93\u7BB1\u7968\u6807\u7B7E") ); return o ? (this.printData = t, !0) : !1; }, async executePrint(o) { if (!!this.checkPrint()) try { const t = await u({ boxId: o.boxId, printDeviceId: this.printData.printId }); await this.$lwPrint.bluetoothPrint({ taskId: t.id }); } catch (t) { console.log(t); } } } }; var g = function() { var t = this, a = t._self._c; return a("div", [a("lw-nav-bar", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.pvsffdcy", "\u51FA\u8D27\u7968\u8865\u6253") } }), a("div", { staticClass: "lw-global-page-box" }, [a("div", { staticClass: "lw-global-model-box", staticStyle: { "margin-bottom": "10px", "padding-top": "5px" } }, [a("lw-input", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.bzfgwgga", "\u5BA2\u6237\u7F16\u7801"), "get-focus": t.param.customerCode.focus }, on: { "update:getFocus": function(e) { return t.$set(t.param.customerCode, "focus", e); }, "update:get-focus": function(e) { return t.$set(t.param.customerCode, "focus", e); }, confirm: function(e) { t.param.soNo.focus = !0; } }, model: { value: t.param.customerCode.value, callback: function(e) { t.$set(t.param.customerCode, "value", e); }, expression: "param.customerCode.value" } }), a("lw-input", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.ysxswhiu", "\u51FA\u5E93\u5355\u53F7"), "get-focus": t.param.soNo.focus }, on: { "update:getFocus": function(e) { return t.$set(t.param.soNo, "focus", e); }, "update:get-focus": function(e) { return t.$set(t.param.soNo, "focus", e); }, confirm: function(e) { t.param.boxNo.focus = !0; } }, model: { value: t.param.soNo.value, callback: function(e) { t.$set(t.param.soNo, "value", e); }, expression: "param.soNo.value" } }), a("lw-input", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.kxymijkx", "\u7BB1\u53F7"), "get-focus": t.param.boxNo.focus }, on: { "update:getFocus": function(e) { return t.$set(t.param.boxNo, "focus", e); }, "update:get-focus": function(e) { return t.$set(t.param.boxNo, "focus", e); }, confirm: function(e) { t.param.sn.focus = !0; } }, model: { value: t.param.boxNo.value, callback: function(e) { t.$set(t.param.boxNo, "value", e); }, expression: "param.boxNo.value" } }), a("lw-input", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.bgifgkzp", "\u5546\u54C1\u5E8F\u5217\u53F7"), "get-focus": t.param.sn.focus, "rule-key": "sn", "rule-value-key": "sn" }, on: { "update:getFocus": function(e) { return t.$set(t.param.sn, "focus", e); }, "update:get-focus": function(e) { return t.$set(t.param.sn, "focus", e); }, confirm: t.queryData }, model: { value: t.param.sn.value, callback: function(e) { t.$set(t.param.sn, "value", e); }, expression: "param.sn.value" } }), a("lw-button", { staticStyle: { "margin-top": "10px" }, attrs: { block: "" }, on: { click: t.queryData } }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.coyucmhf", "\u67E5\u8BE2")) + " ")])], 1), t.showEmpty ? a("lw-not-data") : a("div", [t._l(t.boxes, function(e) { return a("div", { key: e.boxNo, staticClass: "lw-global-model-box", staticStyle: { "padding-bottom": "5px" } }, [a("div", [a("div", { staticClass: "lw-global-flex-start-start lw-global-row-start" }, [a("div", { staticClass: "lw-global-title" }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.pjtloamy", "\u5BA2\u6237")) + " ")]), a("div", { staticClass: "lw-global-value" }, [a("div", { staticClass: "lw-global-value-bold" }, [t._v(t._s(e.customerCode))]), a("div", { staticClass: "lw-global-title" }, [t._v(t._s(e.customerName))])])]), a("lw-title-value-cell", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.qdetdtmw", "\u6346\u5305\u7BB1\u53F7"), value: e.boxNo } }), a("div", { staticClass: "lw-global-flex-between lw-global-row" }, [a("lw-title-value-cell", { attrs: { title: t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.xavynmlc", "\u6346\u5305\u65F6\u95F4"), value: t.$lwDate.format(e.boxTime, "yyyy-MM-dd hh:mm"), "is-row": !1 } }), a("lw-button", { attrs: { mini: "", round: "" }, on: { click: function(s) { return t.executePrint(e); } } }, [t._v(" " + t._s(t.$lwLanguage.get("wms_project.pda.components.page.outbound.reprint_box.rmxmarpu", "\u8865\u6253\u51FA\u8D27\u7968")) + " ")])], 1)], 1), a("collapse-item", { attrs: { item: e } })], 1); }), a("lw-pages", { attrs: { "page-size": t.query.pageSize, "page-total": t.query.total }, on: { change: t.loadPage }, model: { value: t.query.pageNum, callback: function(e) { t.$set(t.query, "pageNum", e); }, expression: "query.pageNum" } })], 2)], 1)], 1); }, _ = [], f = /* @__PURE__ */ n( d, g, _, !1, null, "522ddb80", null, null ); const b = f.exports, v = { name: "LwOutboundReprintBoxView", components: { LwOutboundReprintBoxListPage: b } }; var w = function() { var t = this, a = t._self._c; return a("lw-outbound-reprint-box-list-page"); }, x = [], y = /* @__PURE__ */ n( v, w, x, !1, null, null, null, null ); const C = y.exports; export { C as default };