2
This commit is contained in:
@@ -3,7 +3,7 @@ const common_vendor = require("../../common/vendor.js");
|
||||
const common_http = require("../../common/http.js");
|
||||
const _sfc_main = {
|
||||
data() {
|
||||
return { id: null, d: {}, editing: false, form: { name: "", contactName: "", mobile: "", phone: "", address: "", level: "", priceLevel: "零售价", arOpening: 0, remark: "" }, priceLevels: ["零售价", "批发价", "大单报价"], priceLabels: ["零售价", "批发价", "大单报价"], priceIdx: 0 };
|
||||
return { id: null, d: {}, editing: false, form: { name: "", contactName: "", mobile: "", phone: "", address: "", priceLevel: "零售价", arOpening: 0, remark: "" }, priceLevels: ["零售价", "批发价", "大单报价"], priceLabels: ["零售价", "批发价", "大单报价"], priceIdx: 0 };
|
||||
},
|
||||
onLoad(q) {
|
||||
if (q && q.id) {
|
||||
@@ -21,7 +21,6 @@ const _sfc_main = {
|
||||
mobile: this.d.mobile || "",
|
||||
phone: this.d.phone || "",
|
||||
address: this.d.address || "",
|
||||
level: this.d.level || "",
|
||||
priceLevel: this.d.priceLevel || "retail",
|
||||
arOpening: Number(this.d.arOpening || 0),
|
||||
remark: this.d.remark || ""
|
||||
@@ -111,44 +110,37 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
}, {
|
||||
v: !$data.editing
|
||||
}, !$data.editing ? {
|
||||
w: common_vendor.t($data.d.level || "—")
|
||||
w: common_vendor.t($data.d.priceLevel)
|
||||
} : {
|
||||
x: $data.form.level,
|
||||
y: common_vendor.o(($event) => $data.form.level = $event.detail.value)
|
||||
x: common_vendor.t($data.priceLabels[$data.priceIdx]),
|
||||
y: $data.priceLabels,
|
||||
z: $data.priceIdx,
|
||||
A: common_vendor.o((...args) => $options.onPriceChange && $options.onPriceChange(...args))
|
||||
}, {
|
||||
z: !$data.editing
|
||||
B: !$data.editing
|
||||
}, !$data.editing ? {
|
||||
A: common_vendor.t($data.d.priceLevel)
|
||||
C: common_vendor.t(Number($data.d.arOpening || 0).toFixed(2))
|
||||
} : {
|
||||
B: common_vendor.t($data.priceLabels[$data.priceIdx]),
|
||||
C: $data.priceLabels,
|
||||
D: $data.priceIdx,
|
||||
E: common_vendor.o((...args) => $options.onPriceChange && $options.onPriceChange(...args))
|
||||
}, {
|
||||
F: !$data.editing
|
||||
}, !$data.editing ? {
|
||||
G: common_vendor.t(Number($data.d.arOpening || 0).toFixed(2))
|
||||
} : {
|
||||
H: $data.form.arOpening,
|
||||
I: common_vendor.o(common_vendor.m(($event) => $data.form.arOpening = $event.detail.value, {
|
||||
D: $data.form.arOpening,
|
||||
E: common_vendor.o(common_vendor.m(($event) => $data.form.arOpening = $event.detail.value, {
|
||||
number: true
|
||||
}))
|
||||
}, {
|
||||
J: common_vendor.t(Number($data.d.receivable || 0).toFixed(2)),
|
||||
K: !$data.editing
|
||||
F: common_vendor.t(Number($data.d.receivable || 0).toFixed(2)),
|
||||
G: !$data.editing
|
||||
}, !$data.editing ? {
|
||||
L: common_vendor.t($data.d.remark || "—")
|
||||
H: common_vendor.t($data.d.remark || "—")
|
||||
} : {
|
||||
M: $data.form.remark,
|
||||
N: common_vendor.o(($event) => $data.form.remark = $event.detail.value)
|
||||
I: $data.form.remark,
|
||||
J: common_vendor.o(($event) => $data.form.remark = $event.detail.value)
|
||||
}, {
|
||||
O: common_vendor.t($data.editing ? "取消" : "编辑"),
|
||||
P: common_vendor.o((...args) => $options.toggleEdit && $options.toggleEdit(...args)),
|
||||
Q: $data.editing
|
||||
K: common_vendor.t($data.editing ? "取消" : "编辑"),
|
||||
L: common_vendor.o((...args) => $options.toggleEdit && $options.toggleEdit(...args)),
|
||||
M: $data.editing
|
||||
}, $data.editing ? {
|
||||
R: common_vendor.o((...args) => $options.save && $options.save(...args))
|
||||
N: common_vendor.o((...args) => $options.save && $options.save(...args))
|
||||
} : {
|
||||
S: common_vendor.o((...args) => $options.choose && $options.choose(...args))
|
||||
O: common_vendor.o((...args) => $options.choose && $options.choose(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
Reference in New Issue
Block a user