Skip to content

Commit

Permalink
Add mandatory verification and change document number to editable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jzow committed May 24, 2024
1 parent d422dd6 commit e972c2e
Show file tree
Hide file tree
Showing 23 changed files with 120 additions and 39 deletions.
1 change: 1 addition & 0 deletions web/src/locales/lang/en/retail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
receiptDate: 'Receipt date',
inputReceiptDate: 'Please select receipt date',
receiptNumber: 'Receipt number',
inputReceiptNumber: 'Please enter the receipt number',
collectionType: 'Collection type',
inputCollectionType: 'Please select collection type',
scanCodeData: 'Scan code to enter data',
Expand Down
1 change: 1 addition & 0 deletions web/src/locales/lang/en/sales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
receiptDate: 'Receipt date',
inputReceiptDate: 'Please select receipt date',
receiptNumber: 'Receipt number',
inputReceiptNumber: 'Please enter the receipt number',
salesPerson: 'Sales Person',
inputSalesPerson: 'Please select sales person',
scanCodeData: 'Scan code to enter data',
Expand Down
1 change: 1 addition & 0 deletions web/src/locales/lang/zh-CN/retail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export default {
receiptDate: '单据日期',
inputReceiptDate: '请选择单据日期',
receiptNumber: '单据编号',
inputReceiptNumber: '请输入单据编号',
collectionType: '收款方式',
inputCollectionType: '请选择收款方式',
scanCodeData: '扫码录入数据',
Expand Down
1 change: 1 addition & 0 deletions web/src/locales/lang/zh-CN/sales.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export default {
receiptDate: '单据日期',
inputReceiptDate: '请选择单据日期',
receiptNumber: '单据编号',
inputReceiptNumber: '请输入单据编号',
salesPerson: '销售人员',
inputSalesPerson: '请选择销售人员',
scanCodeData: '扫码录入数据',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</a-col>
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.advance.form.receiptNumber')" data-step="2"
data-title="单据编号">
<a-input :placeholder="t('financial.advance.form.inputReceiptNumber')" v-model:value="formState.receiptNumber" readOnly/>
data-title="单据编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.advance.form.inputReceiptNumber')" v-model:value="formState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -354,6 +354,10 @@ export default defineComponent({
createMessage.warn(t('financial.advance.form.inputReceiptDate'));
return;
}
if (!formState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (tableData.value.length === 0) {
createMessage.warn(t('financial.advance.form.noticeFour'));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<a-col :lg="7" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.collection.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input :placeholder="t('financial.collection.form.inputReceiptNumber')" v-model:value="collectionFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.collection.form.inputReceiptNumber')" v-model:value="collectionFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="5" :md="12" :sm="24">
Expand Down Expand Up @@ -399,6 +399,10 @@ export default defineComponent({
createMessage.warn(t('financial.collection.form.inputReceiptDate'));
return;
}
if (!collectionFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (!collectionFormState.collectionAccountId) {
createMessage.warn(t('financial.collection.form.noticeTwo'));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.expense.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input :placeholder="t('financial.expense.form.inputReceiptNumber')" v-model:value="expenseFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.expense.form.inputReceiptNumber')" v-model:value="expenseFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -384,6 +384,10 @@ export default defineComponent({
createMessage.warn(t('financial.expense.form.inputReceiptDate'));
return;
}
if (!expenseFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (!expenseFormState.expenseAccountId) {
createMessage.warn(t('financial.expense.form.inputExpenseAccount'));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.income.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input :placeholder="t('financial.income.form.inputReceiptNumber')" v-model:value="incomeFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.income.form.inputReceiptNumber')" v-model:value="incomeFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -391,6 +391,10 @@ export default defineComponent({
createMessage.warn(t('financial.income.form.inputReceiptDate'));
return;
}
if (!incomeFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (!incomeFormState.incomeAccountId) {
createMessage.warn(t('financial.income.form.inputIncomeAccount'));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@
<a-col :lg="7" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.payment.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input :placeholder="t('financial.payment.form.inputReceiptNumber')" v-model:value="paymentFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.payment.form.inputReceiptNumber')" v-model:value="paymentFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="5" :md="12" :sm="24">
Expand Down Expand Up @@ -399,6 +399,10 @@ export default defineComponent({
createMessage.warn(t('financial.payment.form.inputReceiptDate'));
return;
}
if (!paymentFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (!paymentFormState.paymentAccountId) {
createMessage.warn(t('financial.payment.form.inputPaymentAccount'));
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
<a-col :lg="8" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('financial.transfer.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input :placeholder="t('financial.transfer.form.inputReceiptNumber')" v-model:value="transferFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input :placeholder="t('financial.transfer.form.inputReceiptNumber')" v-model:value="transferFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="8" :md="12" :sm="24">
Expand Down Expand Up @@ -350,6 +350,10 @@ export default defineComponent({
createMessage.warn(t('financial.transfer.form.inputReceiptDate'));
return;
}
if (!transferFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (!transferFormState.paymentAccountId) {
createMessage.warn(t('financial.transfer.form.inputPaymentAccount'));
return;
Expand Down
8 changes: 6 additions & 2 deletions web/src/views/purchase/order/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('purchase.order.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="purchaseOrderFormState.receiptNumber" readOnly/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="purchaseOrderFormState.receiptNumber"/>
</a-form-item>
</a-col>
</a-row>
Expand Down Expand Up @@ -592,6 +592,10 @@ export default defineComponent({
createMessage.warn(t('purchase.order.form.inputSupplier'));
return;
}
if (!purchaseOrderFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if(table) {
const insertRecords = table.getInsertRecords()
if(insertRecords.length === 0) {
Expand Down
8 changes: 6 additions & 2 deletions web/src/views/purchase/refund/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('purchase.refund.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="purchaseRefundFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="purchaseRefundFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -653,6 +653,10 @@ export default defineComponent({
createMessage.warn(t('purchase.refund.form.inputSupplier'));
return;
}
if (!purchaseRefundFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (purchaseRefundFormState.accountId === 0) {
if(!multipleAccounts.value.accountOne && !multipleAccounts.value.accountTwo) {
createMessage.warn(t('purchase.refund.form.noticeSeven'));
Expand Down
9 changes: 6 additions & 3 deletions web/src/views/purchase/storage/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('purchase.storage.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="purchaseStorageFormState.receiptNumber"
:readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="purchaseStorageFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -668,6 +667,10 @@ export default defineComponent({
createMessage.warn(t('purchase.storage.form.inputSupplier'));
return;
}
if (!purchaseStorageFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (purchaseStorageFormState.accountId === 0) {
if (!multipleAccounts.value.accountOne && !multipleAccounts.value.accountTwo) {
createMessage.warn(t('purchase.storage.form.noticeSeven'));
Expand Down
8 changes: 6 additions & 2 deletions web/src/views/retail/refund/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('retail.refund.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="formState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="formState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -576,6 +576,10 @@ export default defineComponent({
createMessage.warn(t('retail.refund.form.inputReceiptDate'));
return;
}
if (!formState.receiptNumber) {
createMessage.warn(t('retail.shipments.form.inputReceiptNumber'));
return;
}
if (!formState.accountId) {
createMessage.warn(t('retail.refund.view.inputPaymentAccount'));
return;
Expand Down
8 changes: 6 additions & 2 deletions web/src/views/retail/shipments/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('retail.shipments.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="formState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="formState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -597,6 +597,10 @@ export default defineComponent({
createMessage.warn(t('retail.shipments.form.inputReceiptDate'));
return;
}
if (!formState.receiptNumber) {
createMessage.warn(t('retail.shipments.form.inputReceiptNumber'));
return;
}
if (!formState.accountId) {
createMessage.warn(t('retail.shipments.view.inputCollectionAccount'));
return;
Expand Down
7 changes: 6 additions & 1 deletion web/src/views/sales/order/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('sales.order.form.receiptNumber')" data-step="2"
data-title="单据编号"
:rules="[{ required: true}]"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="formState.receiptNumber" :readOnly="true"/>
<a-input v-model:value="formState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -617,6 +618,10 @@ export default defineComponent({
createMessage.warn(t('sales.order.form.inputCustomer'));
return;
}
if (!formState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if(table) {
const insertRecords = table.getInsertRecords()
if(insertRecords.length === 0) {
Expand Down
8 changes: 6 additions & 2 deletions web/src/views/sales/refund/components/AddEditModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
<a-col :lg="6" :md="12" :sm="24">
<a-form-item :label-col="labelCol" :wrapper-col="wrapperCol" :label="t('sales.refund.form.receiptNumber')" data-step="2"
data-title="单据编号"
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号">
<a-input v-model:value="saleRefundFormState.receiptNumber" :readOnly="true"/>
data-intro="单据编号自动生成、自动累加、开头是单据类型的首字母缩写,累加的规则是每次打开页面会自动占用一个新的编号" :rules="[{ required: true}]">
<a-input v-model:value="saleRefundFormState.receiptNumber"/>
</a-form-item>
</a-col>
<a-col :lg="6" :md="12" :sm="24">
Expand Down Expand Up @@ -673,6 +673,10 @@ export default defineComponent({
createMessage.warn(t('sales.refund.form.inputCustomer'));
return;
}
if (!saleRefundFormState.receiptNumber) {
createMessage.warn(t('sales.order.form.inputReceiptNumber'));
return;
}
if (saleRefundFormState.accountId === 0) {
if(!multipleAccounts.value.accountOne && !multipleAccounts.value.accountTwo) {
createMessage.warn(t('sales.refund.form.noticeFive'));
Expand Down
Loading

0 comments on commit e972c2e

Please sign in to comment.