diff --git a/web/src/locales/lang/en/purchase.ts b/web/src/locales/lang/en/purchase.ts index 8e4a71bd..2beaacbf 100644 --- a/web/src/locales/lang/en/purchase.ts +++ b/web/src/locales/lang/en/purchase.ts @@ -3,12 +3,17 @@ export default { modifyDataPrompt: 'Sorry, only unapproved documents can be edited!', partialPurchase: 'Partial Purchase', completePurchase: 'Complete Purchase', + regularPrint: 'Print', order:{ title: 'Purchase Order List', + addOrder: 'Add - Purchase Order', + editOrder: 'Edit - Purchase Order', + detail: 'Purchase Order - Detail', + receipt: 'Receipt Detail', table:{ supplier: 'Supplier', receiptNumber: 'Receipt number', - productInformation: 'Product information', + productInformation: 'Product info', productQuantity: 'Product quantity', totalAmount: 'Total amount', totalIncludingTax: 'Total including tax', @@ -22,13 +27,84 @@ export default { endDate: 'End date', receiptRemark: 'receipt remark', }, + form: { + supplier: 'Supplier', + inputSupplier: 'Please select supplier', + addSupplier: 'Add supplier', + receiptDate: 'Receipt date', + inputReceiptDate: 'Please select receipt date', + receiptNumber: 'Receipt number', + scanCodeData: 'Scan code to enter data', + collapseScanCode: 'Collapse scan code', + scanCodeTip: 'Click here with the mouse', + addProduct: 'Select to return product', + insertRow: 'Insert A Row', + deleteRow: 'Delete Selected Rows', + addRowData: 'Please add a row of data', + discountRate: 'Discount Rate', + paymentDiscount: 'Payment Discount', + discountAmount: 'Discount Amount', + settlementAccount: 'Account', + paymentDeposit: 'Deposit', + noticeOne: 'Please enter barcode or select product', + noticeTwo: 'Are you sure you want to delete the selected data?', + noticeThree: 'The file exceeds the 2MB size limit', + noticeFour: 'The barcode cannot find product info', + noticeFive: 'The product barcode cannot be empty', + noticeSix: 'Enter the barcode product information automatically!', + noticeSeven: 'Support product name, product number, product specifications, and product model', + cancel: 'Cancel', + save: 'Save', + saveApprove: 'Save and Approve', + table: { + warehouse: 'Warehouse', + barCode: 'Barcode', + inputBarCode: 'Please enter product barcode', + name: 'Name', + standard: 'Standard', + model: 'Model', + color: 'Color', + stock: 'Stock', + unit: 'Unit', + unitPrice: 'Unit Price', + quantity: 'Quantity', + amount: 'Amount', + taxRate: 'Tax Rate(%)', + taxAmount: 'Tax Amount', + remark: 'Remark', + totalIncludingTax: 'Total Price And Tax', + total: 'Total', + inputRemark: 'Please enter remark', + annex: 'Attachment', + uploadAnnex: 'Upload attachment', + } + }, + view: { + title: 'Purchase Order Data', + supplier: 'Supplier', + receiptDate: 'Receipt date', + receiptAmount: 'Receipt amount', + settlementAccount: 'Account', + inputSettlementAccount: 'Please select account', + discountRate: 'Discount Rate', + paymentDiscount: 'Payment Discount', + discountAmount: 'Discount Amount', + paymentDeposit: 'Deposit', + remark: 'Remark', + status: 'Status', + }, export: { + name: 'Export', exportData: 'Purchase Order Data ', - noData: 'No data available', + noData: 'No available data export', } }, storage:{ title: 'Purchase Storage List', + addStorage: 'Add - Purchase Storage', + editStorage: 'Edit - Purchase Storage', + detail: 'Purchase Storage - Detail', + receipt: 'Receipt Detail', table:{ supplier: 'Supplier', receiptNumber: 'Receipt number', @@ -48,13 +124,95 @@ export default { endDate: 'End Date', receiptRemark: 'receipt remark', }, + form: { + supplier: 'Supplier', + inputSupplier: 'Please select supplier', + addSupplier: 'Add supplier', + receiptDate: 'Receipt date', + inputReceiptDate: 'Please select receipt date', + receiptNumber: 'Receipt number', + relatedOrder: 'Purchase Order', + scanCodeData: 'Scan code to enter data', + collapseScanCode: 'Collapse scan code', + scanCodeTip: 'Click here with the mouse', + addProduct: 'Select to return product', + insertRow: 'Insert A Row', + deleteRow: 'Delete Selected Rows', + addRowData: 'Please add a row of data', + discountRate: 'Discount Rate', + paymentDiscount: 'Payment Discount', + discountAmount: 'Discount Amount', + settlementAccount: 'Account', + paymentDeposit: 'Deposit', + otherFees: 'Other Fees', + thisTimePaymentAmount: 'This time payment', + thisTimeArrearsAmount: 'This time arrears', + noticeOne: 'Please enter barcode or select product', + noticeTwo: 'Are you sure you want to delete the selected data?', + noticeThree: 'The file exceeds the 2MB size limit', + noticeFour: 'The barcode cannot find product info', + noticeFive: 'The product barcode cannot be empty', + noticeSix: 'Enter the barcode product information automatically!', + noticeSeven: 'Please select at least two accounts', + noticeEight: 'Please enter the amount', + cancel: 'Cancel', + save: 'Save', + saveApprove: 'Save and Approve', + table: { + warehouse: 'Warehouse', + inputWarehouse: 'Please select warehouse', + barCode: 'Barcode', + inputBarCode: 'Please enter product barcode', + name: 'Name', + standard: 'Standard', + model: 'Model', + color: 'Color', + stock: 'Stock', + unit: 'Unit', + unitPrice: 'Unit Price', + quantity: 'Quantity', + amount: 'Amount', + taxRate: 'Tax Rate(%)', + taxAmount: 'Tax Amount', + remark: 'Remark', + totalIncludingTax: 'Total Price And Tax', + total: 'Total', + inputRemark: 'Please enter remark', + annex: 'Attachment', + uploadAnnex: 'Upload attachment', + } + }, + view: { + title: 'Purchase Storage Data', + supplier: 'Supplier', + receiptDate: 'Receipt date', + receiptAmount: 'Receipt amount', + settlementAccount: 'Account', + inputSettlementAccount: 'Please select account', + addSettlementAccount: 'Add account', + discountRate: 'Discount Rate', + paymentDiscount: 'Payment Discount', + discountAmount: 'Discount Amount', + paymentDeposit: 'Deposit', + remark: 'Remark', + status: 'Status', + purchaseOrder: 'Purchase order receipt', + thisTimePaymentAmount: 'This time payment', + thisTimeArrearsAmount: 'This time arrears', + otherFees: 'Other Fees', + }, export: { + name: 'Export', exportData: 'Purchase Storage Data ', - noData: 'No data available', + noData: 'No available data export', } }, refund:{ - title: 'Purchase Return List', + title: 'Purchase Refund List', + addRefund: 'Add - Purchase Refund', + editRefund: 'Edit - Purchase Refund', + detail: 'Purchase Refund - Detail', + receipt: 'Receipt Detail', table:{ supplier: 'Supplier', receiptNumber: 'Receipt number', @@ -74,9 +232,86 @@ export default { endDate: 'End Date', receiptRemark: 'receipt remark', }, + form: { + supplier: 'Supplier', + inputSupplier: 'Please select supplier', + addSupplier: 'Add supplier', + receiptDate: 'Receipt date', + inputReceiptDate: 'Please select receipt date', + receiptNumber: 'Receipt number', + relatedStorage: 'Storage receipt', + scanCodeData: 'Scan code to enter data', + collapseScanCode: 'Collapse scan code', + scanCodeTip: 'Click here with the mouse', + addProduct: 'Select to return product', + insertRow: 'Insert A Row', + deleteRow: 'Delete Selected Rows', + addRowData: 'Please add a row of data', + discountRate: 'Discount Rate', + refundDiscount: 'Refund Discount', + discountAmount: 'Discount Amount', + settlementAccount: 'Account', + otherFees: 'Other Fees', + thisRefundAmount: 'This time refund', + thisTimeArrearsAmount: 'This time arrears', + noticeOne: 'Please enter barcode or select product', + noticeTwo: 'Are you sure you want to delete the selected data?', + noticeThree: 'The file exceeds the 2MB size limit', + noticeFour: 'The barcode cannot find product info', + noticeFive: 'The product barcode cannot be empty', + noticeSix: 'Enter the barcode product information automatically!', + noticeSeven: 'Please select at least two accounts', + noticeEight: 'Please enter the amount', + noticeNine: 'Insufficient inventory of goods, please check the inventory quantity', + cancel: 'Cancel', + save: 'Save', + saveApprove: 'Save and Approve', + table: { + warehouse: 'Warehouse', + inputWarehouse: 'Please select warehouse', + barCode: 'Barcode', + inputBarCode: 'Please enter product barcode', + name: 'Name', + standard: 'Standard', + model: 'Model', + color: 'Color', + stock: 'Stock', + unit: 'Unit', + unitPrice: 'Unit Price', + quantity: 'Quantity', + amount: 'Amount', + taxRate: 'Tax Rate(%)', + taxAmount: 'Tax Amount', + remark: 'Remark', + totalIncludingTax: 'Total Price And Tax', + total: 'Total', + inputRemark: 'Please enter remark', + annex: 'Attachment', + uploadAnnex: 'Upload attachment', + } + }, + view: { + title: 'Purchase Refund Data', + supplier: 'Supplier', + receiptDate: 'Receipt date', + receiptAmount: 'Receipt amount', + purchaseOrder: 'Purchase storage receipt', + settlementAccount: 'Account', + thisRefundAmount: 'This time refund', + thisTimeArrearsAmount: 'This time arrears', + inputSettlementAccount: 'Please select account', + addSettlementAccount: 'Add account', + discountRate: 'Discount Rate', + refundDiscount: 'Refund Discount', + discountAmount: 'Discount Amount', + otherFees: 'Other Fees', + remark: 'Remark', + status: 'Status', + }, export: { - exportData: 'Purchase Return Data ', - noData: 'No data available', + name: 'Export', + exportData: 'Purchase Refund Data ', + noData: 'No available data export', } } }; \ No newline at end of file diff --git a/web/src/locales/lang/en/sys.ts b/web/src/locales/lang/en/sys.ts index 3f6b8d38..9d1b6d34 100644 --- a/web/src/locales/lang/en/sys.ts +++ b/web/src/locales/lang/en/sys.ts @@ -142,5 +142,7 @@ export default { confirmExportTextTwo: 'piece of data, please be patient.', confirmExportTextThree: 'If you need to export detailed data (which may take a long time), please check the box below.', confirmExportTextFour: 'Need to export detailed data', + type: 'Type', + subType: 'Sub Type', } }; diff --git a/web/src/locales/lang/zh-CN/purchase.ts b/web/src/locales/lang/zh-CN/purchase.ts index 347641f6..4bf4e4be 100644 --- a/web/src/locales/lang/zh-CN/purchase.ts +++ b/web/src/locales/lang/zh-CN/purchase.ts @@ -3,8 +3,13 @@ export default { modifyDataPrompt: '抱歉,只有未审核的单据才能编辑!', partialPurchase: '部分采购', completePurchase: '完成采购', + regularPrint: '普通打印', order:{ title: '采购订单列表', + addOrder: '新增-采购订单', + editOrder: '编辑-采购订单', + detail: '采购订单-详情', + receipt: '单据详情', table:{ supplier: '供应商', receiptNumber: '单据编号', @@ -22,13 +27,84 @@ export default { endDate: '结束日期', receiptRemark: '单据备注', }, + form: { + supplier: '供应商', + inputSupplier: '请选择供应商', + addSupplier: '新增供应商', + receiptDate: '单据日期', + inputReceiptDate: '请选择单据日期', + receiptNumber: '单据编号', + scanCodeData: '扫码录入数据', + collapseScanCode: '收起扫码', + scanCodeTip: '鼠标点击此次', + addProduct: '选择添加采购商品', + insertRow: '添加一行', + deleteRow: '删除选中行', + addRowData: '请添加一行数据', + discountRate: '优惠率', + paymentDiscount: '付款优惠', + discountAmount: '优惠后金额', + settlementAccount: '结算账户', + paymentDeposit: '支付定金', + noticeOne: '请录入条码或者选择产品', + noticeTwo: '确定要删除选中的数据?', + noticeThree: '该文件超过2MB大小限制', + noticeFour: '该条码查询不到商品信息', + noticeFive: '商品条码不能为空', + noticeSix: '输入条码商品信息自动带出!', + noticeSeven: '支持商品名称、商品编号、商品规格、商品型号', + cancel: '取消', + save: '保存', + saveApprove: '保存并审核', + table: { + warehouse: '仓库', + barCode: '条码', + inputBarCode: '输入商品条码', + name: '名称', + standard: '规格', + model: '型号', + color: '颜色', + stock: '库存', + unit: '单位', + unitPrice: '单价', + quantity: '数量', + amount: '金额', + taxRate: '税率', + taxAmount: '税额', + totalIncludingTax: '含税合计', + remark: '备注', + total: '合计', + inputRemark: '请输入备注', + annex: '附件', + uploadAnnex: '上传附件', + } + }, + view: { + title: '采购订单表数据', + supplier: '供应商', + receiptDate: '单据日期', + receiptAmount: '单据金额', + settlementAccount: '结算账户', + inputSettlementAccount: '请选择结算账户', + discountRate: '优惠率', + paymentDiscount: '付款优惠', + discountAmount: '优惠后金额', + paymentDeposit: '支付定金', + remark: '备注', + status: '状态', + }, export: { + name: '导出', exportData: '采购订单数据 ', noData: '无可用数据导出', } }, storage:{ title: '采购入库列表', + addStorage: '新增-采购入库', + editStorage: '编辑-采购入库', + detail: '采购入库-详情', + receipt: '单据详情', table:{ supplier: '供应商', receiptNumber: '单据编号', @@ -48,13 +124,95 @@ export default { endDate: '结束日期', receiptRemark: '单据备注', }, + form: { + supplier: '供应商', + inputSupplier: '请选择供应商', + addSupplier: '新增供应商', + receiptDate: '单据日期', + inputReceiptDate: '请选择单据日期', + receiptNumber: '单据编号', + relatedOrder: '关联订单', + scanCodeData: '扫码录入数据', + collapseScanCode: '收起扫码', + scanCodeTip: '鼠标点击此处', + addProduct: '选择添加采购入库商品', + insertRow: '添加一行', + deleteRow: '删除选中行', + addRowData: '请添加一行数据', + discountRate: '优惠率', + paymentDiscount: '付款优惠', + discountAmount: '优惠后金额', + otherFees: '其他费用', + settlementAccount: '结算账户', + thisTimePaymentAmount: '本次付款', + thisTimeArrearsAmount: '本次欠款', + paymentDeposit: '支付定金', + noticeOne: '请录入条码或者选择产品', + noticeTwo: '确定要删除选中的数据?', + noticeThree: '该文件超过2MB大小限制', + noticeFour: '该条码查询不到商品信息', + noticeFive: '商品条码不能为空', + noticeSix: '输入条码商品信息自动带出!', + noticeSeven: '请至少选择两个账户', + noticeEight: '请输入金额', + cancel: '取消', + save: '保存', + saveApprove: '保存并审核', + table: { + warehouse: '仓库', + inputWarehouse: '请选择仓库', + barCode: '条码', + inputBarCode: '输入商品条码', + name: '名称', + standard: '规格', + model: '型号', + color: '颜色', + stock: '库存', + unit: '单位', + unitPrice: '单价', + quantity: '数量', + amount: '金额', + taxRate: '税率', + taxAmount: '税额', + totalIncludingTax: '含税合计', + remark: '备注', + total: '合计', + inputRemark: '请输入备注', + annex: '附件', + uploadAnnex: '上传附件', + } + }, + view: { + title: '采购入库表数据', + supplier: '供应商', + receiptDate: '单据日期', + receiptAmount: '单据金额', + purchaseOrder: '采购订单单据', + settlementAccount: '结算账户', + thisTimePaymentAmount: '本次付款', + thisTimeArrearsAmount: '本次欠款', + inputSettlementAccount: '请选择结算账户', + addSettlementAccount: '新增结算账户', + discountRate: '优惠率', + paymentDiscount: '付款优惠', + discountAmount: '优惠后金额', + otherFees: '其他费用', + paymentDeposit: '支付定金', + remark: '备注', + status: '状态', + }, export: { + name: '导出', exportData: '采购入库数据 ', noData: '无可用数据导出', } }, refund:{ title: '采购退货列表', + addRefund: '新增-采购退货', + editRefund: '编辑-采购退货', + detail: '采购退货-详情', + receipt: '单据详情', table:{ supplier: '供应商', receiptNumber: '单据编号', @@ -74,7 +232,84 @@ export default { endDate: '结束日期', receiptRemark: '单据备注', }, + form: { + supplier: '供应商', + inputSupplier: '请选择供应商', + addSupplier: '新增供应商', + receiptDate: '单据日期', + inputReceiptDate: '请选择单据日期', + receiptNumber: '单据编号', + relatedStorage: '关联采购入库单', + scanCodeData: '扫码录入数据', + collapseScanCode: '收起扫码', + scanCodeTip: '鼠标点击此处', + addProduct: '选择添加采购入库商品', + insertRow: '添加一行', + deleteRow: '删除选中行', + addRowData: '请添加一行数据', + discountRate: '优惠率', + refundDiscount: '退款优惠', + discountAmount: '优惠后金额', + otherFees: '其他费用', + settlementAccount: '结算账户', + thisRefundAmount: '本次退款', + thisTimeArrearsAmount: '本次欠款', + noticeOne: '请录入条码或者选择产品', + noticeTwo: '确定要删除选中的数据?', + noticeThree: '该文件超过2MB大小限制', + noticeFour: '该条码查询不到商品信息', + noticeFive: '商品条码不能为空', + noticeSix: '输入条码商品信息自动带出!', + noticeSeven: '请至少选择两个账户', + noticeEight: '请输入金额', + noticeNine: '商品库存不足,请检查库存数量', + cancel: '取消', + save: '保存', + saveApprove: '保存并审核', + table: { + warehouse: '仓库', + inputWarehouse: '请选择仓库', + barCode: '条码', + inputBarCode: '输入商品条码', + name: '名称', + standard: '规格', + model: '型号', + color: '颜色', + stock: '库存', + unit: '单位', + unitPrice: '单价', + quantity: '数量', + amount: '金额', + taxRate: '税率', + taxAmount: '税额', + totalIncludingTax: '含税合计', + remark: '备注', + total: '合计', + inputRemark: '请输入备注', + annex: '附件', + uploadAnnex: '上传附件', + } + }, + view: { + title: '采购退货表数据', + supplier: '供应商', + receiptDate: '单据日期', + receiptAmount: '单据金额', + purchaseOrder: '采购入库单据', + settlementAccount: '结算账户', + thisRefundAmount: '本次退款', + thisTimeArrearsAmount: '本次欠款', + inputSettlementAccount: '请选择结算账户', + addSettlementAccount: '新增结算账户', + discountRate: '优惠率', + refundDiscount: '退款优惠', + discountAmount: '优惠后金额', + otherFees: '其他费用', + remark: '备注', + status: '状态', + }, export: { + name: '导出', exportData: '采购退货数据 ', noData: '无可用数据导出', } diff --git a/web/src/locales/lang/zh-CN/sys.ts b/web/src/locales/lang/zh-CN/sys.ts index 5cae94ce..73fd8a20 100644 --- a/web/src/locales/lang/zh-CN/sys.ts +++ b/web/src/locales/lang/zh-CN/sys.ts @@ -130,5 +130,7 @@ export default { unaudited: '未审核', viewReceiptDetails: '查看单据详情', confirmDelete: '是否确认删除数据?', + type: '类型', + subType: '子类型', } }; diff --git a/web/src/views/purchase/model/addEditModel.ts b/web/src/views/purchase/model/addEditModel.ts index 0bf30bd7..c580b465 100644 --- a/web/src/views/purchase/model/addEditModel.ts +++ b/web/src/views/purchase/model/addEditModel.ts @@ -2,6 +2,9 @@ import {reactive, ref} from "vue"; import XEUtils from "xe-utils"; import {VxeGridInstance, VxeGridProps} from "vxe-table"; import {Dayjs} from "dayjs"; +import {useI18n} from "@/hooks/web/useI18n"; + +export const { t } = useI18n(); export interface RowVO { [key: string]: any, @@ -135,26 +138,26 @@ const orderGridOptions = reactive>({ { type: 'checkbox', field:'productId', title: 'ID', width: 80}, { field: 'barCode', width:160, - title: '条码', + title: t('purchase.order.form.table.barCode'), slots: { edit: 'barCode_edit' }, - titlePrefix: { content: '输入条码商品信息自动带出!' }, + titlePrefix: { content: t('purchase.order.form.noticeSix') }, editRender: { name: 'input', attrs: { placeholder: '请输入条码并回车' } } }, { field: 'productName', - title: '名称', + title: t('purchase.order.form.table.name'), width:160, }, - { field: 'productStandard', title: '规格', width: 120, }, - { field: 'stock', title: '库存', width: 70}, - { field: 'productUnit', title: '单位', width: 70}, - { field: 'productNumber', title: '数量', sortable: true, width:100, + { field: 'productStandard', title: t('purchase.order.form.table.standard'), width: 120, }, + { field: 'stock', title: t('purchase.order.form.table.stock'), width: 70}, + { field: 'productUnit', title: t('purchase.order.form.table.unit'), width: 70}, + { field: 'productNumber', title: t('purchase.order.form.table.quantity'), sortable: true, width:100, slots: { edit: 'product_number_edit' }, editRender: { name: '$input', props: { type: 'number', min: 1, max: 9999 } }, }, { field: 'unitPrice', - title: '单价', width:105, + title: t('purchase.order.form.table.unitPrice'), width:105, formatter ({ cellValue }) { return cellValue ? `¥${XEUtils.commafy(XEUtils.toNumber(cellValue), { digits: 2 })}` : '' }, @@ -163,33 +166,33 @@ const orderGridOptions = reactive>({ }, { field: 'amount', - title: '金额', width:105, + title: t('purchase.order.form.table.amount'), width:105, formatter ({ cellValue }) { return cellValue ? `¥${XEUtils.commafy(XEUtils.toNumber(cellValue), { digits: 2 })}` : '' }, slots: { edit: 'amount_edit' }, editRender: { name: '$input', props: { type: 'float', digits: 2, placeholder: '输入金额' } } }, - { field: 'taxRate', title: '税率', width: 105, + { field: 'taxRate', title: t('purchase.order.form.table.taxRate'), width: 105, slots: { edit: 'tax_rate_edit' }, editRender: { name: '$input', attrs: { type: 'float', digits: 2, placeholder: '请输入税率' } } }, - { field: 'taxAmount', title: '税额', width: 105, + { field: 'taxAmount', title: t('purchase.order.form.table.taxAmount'), width: 105, editRender:{attrs: {type: 'float', digits: 2}}, slots: { edit: 'tax_amount_edit' }, }, - { field: 'taxTotalPrice', title: '价税合计', width: 105, + { field: 'taxTotalPrice', title: t('purchase.order.form.table.totalIncludingTax'), width: 105, slots: { edit: 'tax_total_price_edit' }, editRender: { name: '$input', attrs: {type: 'float', digits: 2, placeholder: '请输入价税合计' } } }, - { field: 'remark', title: '备注', editRender: { name: 'input', attrs: { placeholder: '请输入备注' } } }, + { field: 'remark', title: t('purchase.order.form.table.remark'), editRender: { name: 'input', attrs: { placeholder: '请输入备注' } } }, ], footerMethod ({ columns, data }) { return [ columns.map((column, columnIndex) => { if (columnIndex === 0) { - return '总计' + return t('purchase.order.form.table.total') } if (['amount', 'rate'].includes(column.field)) { return `¥${XEUtils.commafy(XEUtils.toNumber(sumNum(data, column.field)), { digits: 2 })}` @@ -217,7 +220,7 @@ const orderGridOptions = reactive>({ }, editRules: { barCode: [ - { required: true, message: '商品条码不能为空' } + { required: true, message: t('purchase.order.form.noticeFive') } ] }, editConfig: { @@ -286,33 +289,33 @@ const gridOptions = reactive>({ { type: 'checkbox', field:'productId', title: 'ID', width: 80}, { field: 'warehouseId', - title: '仓库', + title: t('purchase.storage.form.table.barCode'), width: 130, slots: { edit: 'warehouse_edit', default: 'warehouse_default'}, - editRender: { name: 'input', attrs: { placeholder: '请选择仓库' } } + editRender: { name: 'input', attrs: { placeholder: t('purchase.storage.form.table.inputWarehouse') } } }, { field: 'barCode', width:160, - title: '条码', + title: t('purchase.storage.form.table.barCode'), slots: { edit: 'barCode_edit' }, - titlePrefix: { content: '输入条码商品信息自动带出!' }, + titlePrefix: { content: t('purchase.storage.form.noticeSix') }, editRender: { name: 'input', attrs: { placeholder: '请输入条码并回车' } } }, { field: 'productName', - title: '名称', + title: t('purchase.storage.form.table.name'), width:160, }, - { field: 'productStandard', title: '规格', width: 120, }, - { field: 'stock', title: '库存', width: 70}, - { field: 'productUnit', title: '单位', width: 70}, - { field: 'productNumber', title: '数量', sortable: true, width:100, + { field: 'productStandard', title: t('purchase.storage.form.table.standard'), width: 120, }, + { field: 'stock', title: t('purchase.storage.form.table.stock'), width: 70}, + { field: 'productUnit', title: t('purchase.storage.form.table.unit'), width: 70}, + { field: 'productNumber', title: t('purchase.storage.form.table.quantity'), sortable: true, width:100, slots: { edit: 'product_number_edit' }, editRender: { name: '$input', props: { type: 'number', min: 1, max: 9999 } }, }, { field: 'unitPrice', - title: '单价', width:105, + title: t('purchase.storage.form.table.unitPrice'), width:105, formatter ({ cellValue }) { return cellValue ? `¥${XEUtils.commafy(XEUtils.toNumber(cellValue), { digits: 2 })}` : '' }, @@ -321,33 +324,33 @@ const gridOptions = reactive>({ }, { field: 'amount', - title: '金额', width:105, + title: t('purchase.storage.form.table.amount'), width:105, formatter ({ cellValue }) { return cellValue ? `¥${XEUtils.commafy(XEUtils.toNumber(cellValue), { digits: 2 })}` : '' }, slots: { edit: 'amount_edit' }, editRender: { name: '$input', props: { type: 'float', digits: 2, placeholder: '输入金额' } } }, - { field: 'taxRate', title: '税率', width: 105, + { field: 'taxRate', title: t('purchase.storage.form.table.taxRate'), width: 105, slots: { edit: 'tax_rate_edit' }, editRender: { name: '$input', attrs: { type: 'float', digits: 2, placeholder: '请输入税率' } } }, - { field: 'taxAmount', title: '税额', width: 105, + { field: 'taxAmount', title: t('purchase.storage.form.table.taxAmount'), width: 105, editRender:{attrs: {type: 'float', digits: 2}}, slots: { edit: 'tax_amount_edit' }, }, - { field: 'taxTotalPrice', title: '价税合计', width: 105, + { field: 'taxTotalPrice', title: t('purchase.storage.form.table.totalIncludingTax'), width: 105, slots: { edit: 'tax_total_price_edit' }, editRender: { name: '$input', attrs: {type: 'float', digits: 2, placeholder: '请输入价税合计' } } }, - { field: 'remark', title: '备注', editRender: { name: 'input', attrs: { placeholder: '请输入备注' } } }, + { field: 'remark', title: t('purchase.storage.form.table.remark'), editRender: { name: 'input', attrs: { placeholder: '请输入备注' } } }, ], footerMethod ({ columns, data }) { return [ columns.map((column, columnIndex) => { if (columnIndex === 0) { - return '总计' + return t('purchase.storage.form.table.total') } if (['amount', 'rate'].includes(column.field)) { return `¥${XEUtils.commafy(XEUtils.toNumber(sumNum(data, column.field)), { digits: 2 })}` @@ -375,10 +378,10 @@ const gridOptions = reactive>({ }, editRules: { warehouseId: [ - { required: true, message: '仓库不能为空' } + { required: true, message: t('purchase.storage.form.table.inputWarehouse') } ], barCode: [ - { required: true, message: '商品条码不能为空' } + { required: true, message: t('purchase.storage.form.table.inputBarCode') } ] }, editConfig: { diff --git a/web/src/views/purchase/order/components/AddEditModal.vue b/web/src/views/purchase/order/components/AddEditModal.vue index 54490dac..6b0d974d 100644 --- a/web/src/views/purchase/order/components/AddEditModal.vue +++ b/web/src/views/purchase/order/components/AddEditModal.vue @@ -11,9 +11,9 @@ v-model:open="open" style="left: 5%; height: 95%;"> @@ -22,11 +22,11 @@ - - - + + - - + @@ -58,17 +58,16 @@