1
This commit is contained in:
@@ -34,7 +34,19 @@ const _sfc_main = {
|
||||
selectedAccountName: "",
|
||||
// 收款/付款输入
|
||||
payments: { cash: 0, bank: 0, wechat: 0 },
|
||||
showMore: false
|
||||
showMore: false,
|
||||
SEG_ICONS: {
|
||||
sale: {
|
||||
out: "/static/icons/sale.png",
|
||||
return: "/static/icons/other-pay.png",
|
||||
collect: "/static/icons/report.png"
|
||||
},
|
||||
purchase: {
|
||||
in: "/static/icons/purchase.png",
|
||||
return: "/static/icons/other-pay.png",
|
||||
pay: "/static/icons/account.png"
|
||||
}
|
||||
}
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -279,81 +291,87 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
h: common_vendor.o(($event) => $options.switchBiz("expense")),
|
||||
i: $data.biz === "sale"
|
||||
}, $data.biz === "sale" ? {
|
||||
j: $data.saleType === "out" ? 1 : "",
|
||||
k: common_vendor.o(($event) => $data.saleType = "out"),
|
||||
l: $data.saleType === "return" ? 1 : "",
|
||||
m: common_vendor.o(($event) => $data.saleType = "return"),
|
||||
n: $data.saleType === "collect" ? 1 : "",
|
||||
o: common_vendor.o(($event) => $data.saleType = "collect")
|
||||
j: $data.SEG_ICONS.sale.out,
|
||||
k: common_vendor.n($data.saleType === "out" && "active"),
|
||||
l: common_vendor.o(($event) => $data.saleType = "out"),
|
||||
m: $data.SEG_ICONS.sale.return,
|
||||
n: common_vendor.n($data.saleType === "return" && "active"),
|
||||
o: common_vendor.o(($event) => $data.saleType = "return"),
|
||||
p: $data.SEG_ICONS.sale.collect,
|
||||
q: common_vendor.n($data.saleType === "collect" && "active"),
|
||||
r: common_vendor.o(($event) => $data.saleType = "collect")
|
||||
} : $data.biz === "purchase" ? {
|
||||
q: $data.purchaseType === "in" ? 1 : "",
|
||||
r: common_vendor.o(($event) => $data.purchaseType = "in"),
|
||||
s: $data.purchaseType === "return" ? 1 : "",
|
||||
t: common_vendor.o(($event) => $data.purchaseType = "return"),
|
||||
v: $data.purchaseType === "pay" ? 1 : "",
|
||||
w: common_vendor.o(($event) => $data.purchaseType = "pay")
|
||||
t: $data.SEG_ICONS.purchase.in,
|
||||
v: common_vendor.n($data.purchaseType === "in" && "active"),
|
||||
w: common_vendor.o(($event) => $data.purchaseType = "in"),
|
||||
x: $data.SEG_ICONS.purchase.return,
|
||||
y: common_vendor.n($data.purchaseType === "return" && "active"),
|
||||
z: common_vendor.o(($event) => $data.purchaseType = "return"),
|
||||
A: $data.SEG_ICONS.purchase.pay,
|
||||
B: common_vendor.n($data.purchaseType === "pay" && "active"),
|
||||
C: common_vendor.o(($event) => $data.purchaseType = "pay")
|
||||
} : {}, {
|
||||
p: $data.biz === "purchase",
|
||||
x: common_vendor.t($data.order.orderTime),
|
||||
y: $data.order.orderTime,
|
||||
z: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args)),
|
||||
A: $data.biz === "sale"
|
||||
s: $data.biz === "purchase",
|
||||
D: common_vendor.t($data.order.orderTime),
|
||||
E: $data.order.orderTime,
|
||||
F: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args)),
|
||||
G: $data.biz === "sale"
|
||||
}, $data.biz === "sale" ? {
|
||||
B: common_vendor.t($options.customerLabel),
|
||||
C: common_vendor.o((...args) => $options.chooseCustomer && $options.chooseCustomer(...args))
|
||||
H: common_vendor.t($options.customerLabel),
|
||||
I: common_vendor.o((...args) => $options.chooseCustomer && $options.chooseCustomer(...args))
|
||||
} : $data.biz === "purchase" ? {
|
||||
E: common_vendor.t($options.supplierLabel),
|
||||
F: common_vendor.o((...args) => $options.chooseSupplier && $options.chooseSupplier(...args))
|
||||
} : {}, {
|
||||
D: $data.biz === "purchase",
|
||||
G: $data.biz === "sale" && $data.saleType === "collect" || $data.biz === "purchase" && $data.purchaseType === "pay"
|
||||
}, $data.biz === "sale" && $data.saleType === "collect" || $data.biz === "purchase" && $data.purchaseType === "pay" ? common_vendor.e({
|
||||
H: $data.biz === "sale"
|
||||
}, $data.biz === "sale" ? {
|
||||
I: common_vendor.t($options.customerLabel),
|
||||
J: common_vendor.o((...args) => $options.chooseCustomer && $options.chooseCustomer(...args))
|
||||
} : {
|
||||
K: common_vendor.t($options.supplierLabel),
|
||||
L: common_vendor.o((...args) => $options.chooseSupplier && $options.chooseSupplier(...args))
|
||||
}, {
|
||||
M: common_vendor.o([common_vendor.m(($event) => $data.payments.cash = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
N: $data.payments.cash,
|
||||
O: common_vendor.o([common_vendor.m(($event) => $data.payments.bank = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
P: $data.payments.bank,
|
||||
Q: common_vendor.o([common_vendor.m(($event) => $data.payments.wechat = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
R: $data.payments.wechat,
|
||||
S: common_vendor.t($data.showMore ? "收起" : ""),
|
||||
T: common_vendor.o(($event) => $data.showMore = !$data.showMore),
|
||||
U: common_vendor.t($options.payTotal.toFixed(2)),
|
||||
V: $data.order.remark,
|
||||
W: common_vendor.o(($event) => $data.order.remark = $event.detail.value),
|
||||
X: common_vendor.t($data.order.orderTime),
|
||||
Y: $data.order.orderTime,
|
||||
Z: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args))
|
||||
}) : $data.biz === "sale" || $data.biz === "purchase" ? {
|
||||
ab: common_vendor.t($data.biz === "sale" ? "客户" : "供应商"),
|
||||
ac: common_vendor.t($data.biz === "sale" ? $options.customerLabel : $options.supplierLabel),
|
||||
ad: common_vendor.o(($event) => $data.biz === "sale" ? $options.chooseCustomer() : $options.chooseSupplier()),
|
||||
ae: common_vendor.t($data.order.orderTime),
|
||||
af: $data.order.orderTime,
|
||||
ag: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args)),
|
||||
ah: common_assets._imports_0,
|
||||
ai: common_vendor.o((...args) => $options.chooseProduct && $options.chooseProduct(...args)),
|
||||
aj: common_vendor.t($options.totalQuantity),
|
||||
ak: common_vendor.t($options.totalAmount.toFixed(2)),
|
||||
al: common_vendor.o((...args) => $options.chooseProduct && $options.chooseProduct(...args))
|
||||
} : {}, {
|
||||
J: $data.biz === "purchase",
|
||||
M: $data.biz === "sale" && $data.saleType === "collect" || $data.biz === "purchase" && $data.purchaseType === "pay"
|
||||
}, $data.biz === "sale" && $data.saleType === "collect" || $data.biz === "purchase" && $data.purchaseType === "pay" ? common_vendor.e({
|
||||
N: $data.biz === "sale"
|
||||
}, $data.biz === "sale" ? {
|
||||
O: common_vendor.t($options.customerLabel),
|
||||
P: common_vendor.o((...args) => $options.chooseCustomer && $options.chooseCustomer(...args))
|
||||
} : {
|
||||
am: $data.counterpartyType === "customer" ? 1 : "",
|
||||
an: common_vendor.o(($event) => $options.setCounterparty("customer")),
|
||||
ao: $data.counterpartyType === "supplier" ? 1 : "",
|
||||
ap: common_vendor.o(($event) => $options.setCounterparty("supplier")),
|
||||
aq: common_vendor.f($data.biz === "income" ? $options.incomeCategories : $options.expenseCategories, (c, k0, i0) => {
|
||||
Q: common_vendor.t($options.supplierLabel),
|
||||
R: common_vendor.o((...args) => $options.chooseSupplier && $options.chooseSupplier(...args))
|
||||
}, {
|
||||
S: common_vendor.o([common_vendor.m(($event) => $data.payments.cash = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
T: $data.payments.cash,
|
||||
U: common_vendor.o([common_vendor.m(($event) => $data.payments.bank = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
V: $data.payments.bank,
|
||||
W: common_vendor.o([common_vendor.m(($event) => $data.payments.wechat = $event.detail.value, {
|
||||
number: true
|
||||
}), ($event) => $options.recalcPay()]),
|
||||
X: $data.payments.wechat,
|
||||
Y: common_vendor.t($data.showMore ? "收起" : ""),
|
||||
Z: common_vendor.o(($event) => $data.showMore = !$data.showMore),
|
||||
aa: common_vendor.t($options.payTotal.toFixed(2)),
|
||||
ab: $data.order.remark,
|
||||
ac: common_vendor.o(($event) => $data.order.remark = $event.detail.value),
|
||||
ad: common_vendor.t($data.order.orderTime),
|
||||
ae: $data.order.orderTime,
|
||||
af: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args))
|
||||
}) : $data.biz === "sale" || $data.biz === "purchase" ? {
|
||||
ah: common_vendor.t($data.biz === "sale" ? "客户" : "供应商"),
|
||||
ai: common_vendor.t($data.biz === "sale" ? $options.customerLabel : $options.supplierLabel),
|
||||
aj: common_vendor.o(($event) => $data.biz === "sale" ? $options.chooseCustomer() : $options.chooseSupplier()),
|
||||
ak: common_vendor.t($data.order.orderTime),
|
||||
al: $data.order.orderTime,
|
||||
am: common_vendor.o((...args) => $options.onDateChange && $options.onDateChange(...args)),
|
||||
an: common_assets._imports_0,
|
||||
ao: common_vendor.o((...args) => $options.chooseProduct && $options.chooseProduct(...args)),
|
||||
ap: common_vendor.t($options.totalQuantity),
|
||||
aq: common_vendor.t($options.totalAmount.toFixed(2)),
|
||||
ar: common_vendor.o((...args) => $options.chooseProduct && $options.chooseProduct(...args))
|
||||
} : {
|
||||
as: $data.counterpartyType === "customer" ? 1 : "",
|
||||
at: common_vendor.o(($event) => $options.setCounterparty("customer")),
|
||||
av: $data.counterpartyType === "supplier" ? 1 : "",
|
||||
aw: common_vendor.o(($event) => $options.setCounterparty("supplier")),
|
||||
ax: common_vendor.f($data.biz === "income" ? $options.incomeCategories : $options.expenseCategories, (c, k0, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(c.label),
|
||||
b: c.key,
|
||||
@@ -361,23 +379,23 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
d: common_vendor.o(($event) => $data.activeCategory = c.key, c.key)
|
||||
};
|
||||
}),
|
||||
ar: common_vendor.t($options.counterpartyLabel),
|
||||
as: common_vendor.o((...args) => $options.chooseCounterparty && $options.chooseCounterparty(...args)),
|
||||
at: common_vendor.t($options.accountLabel),
|
||||
av: common_vendor.o((...args) => $options.chooseAccount && $options.chooseAccount(...args)),
|
||||
aw: $data.trxAmount,
|
||||
ax: common_vendor.o(common_vendor.m(($event) => $data.trxAmount = $event.detail.value, {
|
||||
ay: common_vendor.t($options.counterpartyLabel),
|
||||
az: common_vendor.o((...args) => $options.chooseCounterparty && $options.chooseCounterparty(...args)),
|
||||
aA: common_vendor.t($options.accountLabel),
|
||||
aB: common_vendor.o((...args) => $options.chooseAccount && $options.chooseAccount(...args)),
|
||||
aC: $data.trxAmount,
|
||||
aD: common_vendor.o(common_vendor.m(($event) => $data.trxAmount = $event.detail.value, {
|
||||
number: true
|
||||
})),
|
||||
ay: $data.order.remark,
|
||||
az: common_vendor.o(($event) => $data.order.remark = $event.detail.value)
|
||||
aE: $data.order.remark,
|
||||
aF: common_vendor.o(($event) => $data.order.remark = $event.detail.value)
|
||||
}, {
|
||||
aa: $data.biz === "sale" || $data.biz === "purchase",
|
||||
aA: !$data.items.length
|
||||
ag: $data.biz === "sale" || $data.biz === "purchase",
|
||||
aG: !$data.items.length
|
||||
}, !$data.items.length ? {
|
||||
aB: common_assets._imports_0
|
||||
aH: common_assets._imports_0
|
||||
} : {
|
||||
aC: common_vendor.f($data.items, (it, idx, i0) => {
|
||||
aI: common_vendor.f($data.items, (it, idx, i0) => {
|
||||
return {
|
||||
a: common_vendor.t(it.productName),
|
||||
b: common_vendor.o([common_vendor.m(($event) => it.quantity = $event.detail.value, {
|
||||
@@ -393,8 +411,8 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
||||
};
|
||||
})
|
||||
}, {
|
||||
aD: common_vendor.o((...args) => $options.saveAndReset && $options.saveAndReset(...args)),
|
||||
aE: common_vendor.o((...args) => $options.submit && $options.submit(...args))
|
||||
aJ: common_vendor.o((...args) => $options.saveAndReset && $options.saveAndReset(...args)),
|
||||
aK: common_vendor.o((...args) => $options.submit && $options.submit(...args))
|
||||
});
|
||||
}
|
||||
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -39,20 +39,39 @@
|
||||
color: #111;
|
||||
font-weight: 700;
|
||||
}
|
||||
.subtabs {
|
||||
|
||||
/* 三段式胶囊切换 */
|
||||
.seg3 {
|
||||
display: flex;
|
||||
gap: 16rpx;
|
||||
padding: 0 24rpx 16rpx;
|
||||
}
|
||||
.subbtn {
|
||||
padding: 10rpx 20rpx;
|
||||
gap: 0;
|
||||
margin: 12rpx 16rpx;
|
||||
padding: 6rpx;
|
||||
background: #fff;
|
||||
border: 2rpx solid #e6ebf2;
|
||||
border-radius: 999rpx;
|
||||
background: #f1f1f1;
|
||||
color: #444;
|
||||
box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.subbtn.active {
|
||||
background: #4C8DFF;
|
||||
color: #fff;
|
||||
.seg3-item {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8rpx;
|
||||
padding: 12rpx 0;
|
||||
color: #111;
|
||||
border-radius: 999rpx;
|
||||
}
|
||||
|
||||
/* 间隔通过内边距处理,避免空选择器 */
|
||||
.seg3-item.active {
|
||||
background: #fff;
|
||||
color: #4C8DFF;
|
||||
box-shadow: 0 4rpx 12rpx rgba(76, 141, 255, 0.2), 0 0 0 2rpx #4C8DFF inset;
|
||||
}
|
||||
.seg3-icon {
|
||||
width: 28rpx;
|
||||
height: 28rpx;
|
||||
opacity: 0.9;
|
||||
}
|
||||
.field {
|
||||
display: flex;
|
||||
@@ -198,29 +217,24 @@
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 顶部旧 tabs 简化隐藏(改为更简洁布局) */
|
||||
.tabs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 顶部业务 Tabs 显示 */
|
||||
/* 快捷操作宫格 */
|
||||
/* 信息卡片式表达(更稳重) */
|
||||
.info-card {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr auto;
|
||||
gap: 10rpx;
|
||||
margin: 12rpx 16rpx 0;
|
||||
background: #fff;
|
||||
border: 2rpx solid #e5e7eb;
|
||||
border-radius: 16rpx;
|
||||
padding: 10rpx;
|
||||
margin: 10rpx 12rpx 0;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
align-items: center;
|
||||
}
|
||||
.info-field {
|
||||
background: #ffffff;
|
||||
border: 2rpx solid #e5e7eb;
|
||||
background: #fff;
|
||||
border: 2rpx solid #e6ebf2;
|
||||
border-radius: 12rpx;
|
||||
padding: 10rpx 12rpx;
|
||||
box-shadow: 0 6rpx 16rpx rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
.info-label {
|
||||
color: #444;
|
||||
@@ -238,7 +252,8 @@
|
||||
background: #4C8DFF;
|
||||
color: #fff;
|
||||
border-radius: 12rpx;
|
||||
padding: 12rpx 14rpx;
|
||||
padding: 14rpx 16rpx;
|
||||
box-shadow: 0 8rpx 18rpx rgba(76, 141, 255, 0.26);
|
||||
}
|
||||
.info-icon {
|
||||
width: 32rpx;
|
||||
|
||||
Reference in New Issue
Block a user