diff --git a/src/components/common/Mask.vue b/src/components/common/Mask.vue index f77776e..ac6dc8d 100644 --- a/src/components/common/Mask.vue +++ b/src/components/common/Mask.vue @@ -6,9 +6,18 @@ let _width = ref(0); let _height = ref(0); let _isShow = ref(false); let _close = ref(true); -const {width, height, isShow, title, close} = defineProps(['width', 'height', 'isShow', 'title', 'close']); +let _showFooter = ref(false); +const { + width, + height, + isShow, + title, + close, + showFooter +} = defineProps(['width', 'height', 'isShow', 'title', 'close', 'showFooter']); _isShow.value = isShow == null ? false : isShow; +_showFooter.value = showFooter == null ? false : showFooter; _width.value = width == null ? 1200 : width; _height.value = height == null ? 800 : height; _close.value = close == null ? true : close; @@ -28,17 +37,22 @@ const closeBtn = () => {
- -
-
{{ title }}
-
- - - -
+
+
{{ title }}
+
+ + +
- - +
+
+ + + +
+
@@ -60,44 +74,59 @@ const closeBtn = () => { align-items: center; .mask-wrapper { - position: relative; background-color: #FFF; border-radius: 6px; - padding: 0 20px 20px 20px; overflow: hidden; max-height: 90vh; z-index: 1999; + display: flex; + flex-direction: column; .header { - position: relative; height: 72px; - padding: 0 4px; + display: flex; + justify-content: space-between; + padding: 0 24px; border-bottom: 1px solid #EAEAEC; + align-items: center; .title { - position: absolute; - top: 50%; - left: 0; font-weight: 800; font-size: 20px; color: #333333; font-style: normal; - transform: translateY(-50%); } .close { - position: absolute; - top: 50%; - right: 0; - color: #6e6e6e; - font-size: 32px; - transform: translateY(-50%); + width: 32px; + height: 32px; + background: #EBECED; + border-radius: 16px; + line-height: 32px; + text-align: center; + + .close-icon { + color: #6e6e6e; + font-size: 12px; + } &:hover { color: #409eff; } } } + + .content { + flex: 1; + min-height: 0; + } + + .footer { + height: 86px; + background: #FFFFFF; + border-top: 1px solid #EAEAEC; + border-radius: 0 0 8px 8px; + } } } diff --git a/src/components/inventory/purchase/AddOrder.vue b/src/components/inventory/purchase/AddOrder.vue index 82cb405..a979884 100644 --- a/src/components/inventory/purchase/AddOrder.vue +++ b/src/components/inventory/purchase/AddOrder.vue @@ -1,158 +1,162 @@ @@ -230,6 +234,21 @@ const getTotalPrice = () => { } const emit = defineEmits(['close']) let exit = () => { + isShow.value = false + inventory_order_data.value = { + code: null, + purchaseDate: getFormattedDate(), + userId: null, + supplierId: null, + remark: null, + managerUserId: null, + kindConut: 0, + totalPrice: 0, + shippingCode: null, + invoiceCode: null, + inventoryOrderGoodsList: [] + } + table_list.value = [] emit('close') } const table_list: any = ref([]) @@ -272,10 +291,10 @@ let confirm = async () => { inventoryOrder: JSON.parse(JSON.stringify(inventory_order_data.value)), inventoryOrderGoodsList: JSON.parse(JSON.stringify(table_list.value)) } - + isLoading.value = true post("inventory/order/create", data).then((res: any) => { + isLoading.value = false exit() - isLoading.value = true }) } catch (error) { @@ -304,7 +323,7 @@ const removeItem = (row: any) => { } } -const is_add = ref(false) +const isShow = ref(false) const editRef = ref>(); const supplier_list: any = ref([]) const getSupplierList = () => { @@ -313,14 +332,9 @@ const getSupplierList = () => { } post("inventory/supplier/list", {query: query}).then((res: any) => { supplier_list.value = res.list - supplier_list.value = res.list }) } -const userInfo = ref({ - id: null, - name: null, - username: null, -}) +const userInfo = ref({}) const getUserInfo = () => { post("manager/user/verify", null).then((res: any) => { userInfo.value = res @@ -333,10 +347,12 @@ const removeTableRow = (row: any) => { table_list.value.splice(index, 1); } } -onMounted(() => { +const init = () => { + isShow.value = true getSupplierList() getUserInfo() -}) +} +defineExpose({init}) \ No newline at end of file diff --git a/src/components/inventory/purchase/EditOrder.vue b/src/components/inventory/purchase/EditOrder.vue index e2d9bdd..2e2d7f9 100644 --- a/src/components/inventory/purchase/EditOrder.vue +++ b/src/components/inventory/purchase/EditOrder.vue @@ -1,191 +1,197 @@ @@ -65,7 +70,8 @@ onMounted(async () => {