From 6a84849e68739b04204d818d70186453d9b4ca3d Mon Sep 17 00:00:00 2001 From: jameszow Date: Thu, 26 Oct 2023 00:37:48 +0800 Subject: [PATCH 1/3] add editModel and retail data --- .../retail/shipments/model/addEditModel.ts | 49 +++++ src/views/retail/shipments/shipments.data.ts | 176 ++++++++++++++++++ 2 files changed, 225 insertions(+) create mode 100644 src/views/retail/shipments/model/addEditModel.ts create mode 100644 src/views/retail/shipments/shipments.data.ts diff --git a/src/views/retail/shipments/model/addEditModel.ts b/src/views/retail/shipments/model/addEditModel.ts new file mode 100644 index 0000000..1f4b80b --- /dev/null +++ b/src/views/retail/shipments/model/addEditModel.ts @@ -0,0 +1,49 @@ +import {reactive} from "vue"; + +interface FormState { + memberId: string; + receiptNumber: string; + paymentType: string; + remark: string; + receiptAmount: number; + scanBarCode: string; + paymentAmount: number; + backAmount: number; + accountReceivable: string; +} + +const tableColumns = [ + { title: '仓库名称', key: 'depotId', width: '10%', placeholder: '请选择${title}', options: [], + allowSearch:true, validateRules: [{ required: true, message: '${title}不能为空' }] + }, + { title: '条码', key: 'barCode', width: '16%', kind: 'material', multi: true, + validateRules: [{ required: true, message: '${title}不能为空' }] + }, + { title: '名称', key: 'name', width: '12%' }, + { title: '规格', key: 'standard', width: '10%' }, + { title: '库存', key: 'stock', width: '8%' }, + { title: '单位', key: 'unit', width: '8%' }, + { title: '数量', key: 'operNumber', width: '6%', statistics: true, + validateRules: [{ required: true, message: '${title}不能为空' }] + }, + { title: '单价', key: 'unitPrice', width: '6%'}, + { title: '金额', key: 'allPrice', width: '6%', statistics: true }, + { title: '备注', key: 'remark', width: '7%'} +] + +const formState = reactive({ + memberId: '', + receiptNumber: '', + paymentType: '', + remark: '', + receiptAmount: 0, + scanBarCode: '', + paymentAmount: 0, + backAmount: 0, + accountReceivable: '', +}); + +export { + formState, + tableColumns +} \ No newline at end of file diff --git a/src/views/retail/shipments/shipments.data.ts b/src/views/retail/shipments/shipments.data.ts new file mode 100644 index 0000000..63f047e --- /dev/null +++ b/src/views/retail/shipments/shipments.data.ts @@ -0,0 +1,176 @@ +import {FormSchema} from "@/components/Form"; +import {BasicColumn} from "@/components/Table"; +import {useI18n} from "@/hooks/web/useI18n"; + +export const { t } = useI18n(); + +export const columns: BasicColumn[] = [ + { + title: '会员', + dataIndex: 'productBarcode', + width: 80, + }, + { + title: '单据编号', + dataIndex: 'productName', + width: 100, + }, + { + title: '商品信息', + dataIndex: 'productStandard', + width: 80, + }, + { + title: '数量', + dataIndex: 'productModel', + width: 100, + }, + { + title: '金额合计', + dataIndex: 'productColor', + width: 60, + }, + { + title: '收款金额', + dataIndex: 'productCategoryName', + width: 80, + }, + { + title: '找零金额', + dataIndex: 'productUnit', + width: 80, + }, + { + title: '单据日期', + dataIndex: 'productStock', + width: 60, + }, + { + title: '操作员', + dataIndex: 'purchasePrice', + width: 60, + }, + { + title: '状态', + dataIndex: 'status', + width: 80, + customRender: ({ record }) => { + } + }, +] + +export const searchFormSchema: FormSchema[] = [ + { + label: '单据编号', + field: 'productCategoryId', + component: 'ApiTreeSelect', + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + label: '商品信息', + field: 'keywords', + component: 'Input', + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + field: '[startDate, endDate]', + label: '单据日期', + component: 'RangePicker', + componentProps: { + format: 'YYYY/MM/DD', + placeholder: ['开始日期', '结束日期'], + }, + colProps: { span: 7 }, + }, + { + label: '会员卡号', + field: 'warehouseManager', + component: 'ApiSelect', + componentProps: { + // api: test, + resultField: 'data', + labelField: 'name', + valueField: 'id', + }, + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + label: '仓库', + field: 'warehouseManager', + component: 'ApiSelect', + componentProps: { + // api: test, + resultField: 'data', + labelField: 'name', + valueField: 'id', + }, + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + label: '操作员', + field: 'warehouseManager', + component: 'ApiSelect', + componentProps: { + // api: test, + resultField: 'data', + labelField: 'name', + valueField: 'id', + }, + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + label: '结算账户', + field: 'warehouseManager', + component: 'ApiSelect', + componentProps: { + // api: test, + resultField: 'data', + labelField: 'name', + valueField: 'id', + }, + colProps: { + xl: 8, + xxl: 8, + }, + }, + { + label: '单据状态', + field: 'status', + component: 'Select', + colProps: { + xl: 8, + xxl: 8, + }, + componentProps: { + options: [ + { label: '未审核', value: 0, key: 0 }, + { label: '已审核', value: 1, key: 1 }, + ], + }, + }, + { + label: '单据备注', + field: 'warehouseShelves', + component: 'Input', + colProps: { + xl: 8, + xxl: 8, + }, + + } +] \ No newline at end of file From f15128cd5258164888ac63d93e430368a88515e0 Mon Sep 17 00:00:00 2001 From: jameszow Date: Thu, 26 Oct 2023 00:37:58 +0800 Subject: [PATCH 2/3] remove not use link --- src/views/product/info/info.data.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/views/product/info/info.data.ts b/src/views/product/info/info.data.ts index 21c9e3b..4eb2501 100644 --- a/src/views/product/info/info.data.ts +++ b/src/views/product/info/info.data.ts @@ -6,9 +6,8 @@ import {useMessage} from "@/hooks/web/useMessage"; import {useI18n} from "@/hooks/web/useI18n"; import {updateProductStatus} from "@/api/product/product"; import {getCategoryList} from "@/api/product/productCategory"; -import {FormState, MeTable, ProductInfo, ProductStockModel, Stock} from "@/views/product/info/model/productInfoModel"; -import {UnwrapRef} from "vue/dist/vue"; -import {AddProductReq, AddProductStockReq} from "@/api/product/model/productModel"; +import {MeTable, ProductInfo, Stock} from "@/views/product/info/model/productInfoModel"; +import {AddProductReq} from "@/api/product/model/productModel"; const { t } = useI18n(); From 0f54477b3973ea68beda314d3e99443c8bf8bae7 Mon Sep 17 00:00:00 2001 From: jameszow Date: Thu, 26 Oct 2023 00:38:21 +0800 Subject: [PATCH 3/3] Add retail shipments model views --- .../shipments/components/AddEditModal.vue | 348 ++++++++++++++++++ .../shipments/components/DetailInfoModal.vue | 7 + src/views/retail/shipments/index.vue | 175 +++++++++ 3 files changed, 530 insertions(+) create mode 100644 src/views/retail/shipments/components/AddEditModal.vue create mode 100644 src/views/retail/shipments/components/DetailInfoModal.vue create mode 100644 src/views/retail/shipments/index.vue diff --git a/src/views/retail/shipments/components/AddEditModal.vue b/src/views/retail/shipments/components/AddEditModal.vue new file mode 100644 index 0000000..027b026 --- /dev/null +++ b/src/views/retail/shipments/components/AddEditModal.vue @@ -0,0 +1,348 @@ + + + + + \ No newline at end of file diff --git a/src/views/retail/shipments/components/DetailInfoModal.vue b/src/views/retail/shipments/components/DetailInfoModal.vue new file mode 100644 index 0000000..5ff38f5 --- /dev/null +++ b/src/views/retail/shipments/components/DetailInfoModal.vue @@ -0,0 +1,7 @@ + + + \ No newline at end of file diff --git a/src/views/retail/shipments/index.vue b/src/views/retail/shipments/index.vue new file mode 100644 index 0000000..daf241e --- /dev/null +++ b/src/views/retail/shipments/index.vue @@ -0,0 +1,175 @@ + +
+
+ + \ No newline at end of file