dev
This commit is contained in:
parent
baafcfd1e3
commit
50375899e2
|
|
@ -1,7 +1,6 @@
|
|||
<template>
|
||||
<div style="position: fixed; z-index: 99999;">
|
||||
<Mask :height="700" :width="900" :is-show="show">
|
||||
<CloseBtn @click="show = false"></CloseBtn>
|
||||
<Mask :height="700" :width="900" :is-show="show" @close="show =false">
|
||||
<el-card>
|
||||
<template #header>
|
||||
<div class="header">追溯码采集</div>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,19 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购人">
|
||||
<el-input style="width: 234px;" disabled v-model="userInfo.name"></el-input>
|
||||
<el-select
|
||||
v-model="inventory_order_data.managerUserId"
|
||||
placeholder="选择采购人"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in managerUserList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
|
@ -42,7 +54,7 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="supplierId" label="供应商" :rules="formRules.supplierId">
|
||||
<el-select style="width: 234px;" v-model="inventory_order_data.supplierId" placeholder="请选择供应商">
|
||||
<el-select style="width: 150px;" v-model="inventory_order_data.supplierId" placeholder="请选择供应商">
|
||||
<el-option
|
||||
v-for="item in supplier_list"
|
||||
:key="item.id"
|
||||
|
|
@ -50,6 +62,7 @@
|
|||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<el-button type="primary" @click="addSupplier">添加供应商</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
|
@ -163,6 +176,7 @@
|
|||
</div>
|
||||
</template>
|
||||
</Mask>
|
||||
<AddSupplier ref="addSupplierRef" @close="getSupplierList"></AddSupplier>
|
||||
<!-- <Mask :is-show="is_add" :top="100">-->
|
||||
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
||||
<!-- </Mask>-->
|
||||
|
|
@ -175,6 +189,7 @@ import {post} from '@/utils/request.ts'
|
|||
import Edit from "@/components/inventory/goods/Edit.vue";
|
||||
import Mask from "@/components/common/Mask.vue";
|
||||
import {ElMessage} from "element-plus";
|
||||
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
||||
import {Search} from "@element-plus/icons-vue";
|
||||
|
|
@ -195,8 +210,8 @@ let inventory_order_data = ref({
|
|||
managerUserId: null,
|
||||
kindConut: 0,
|
||||
totalPrice: 0,
|
||||
shippingCode: null,
|
||||
invoiceCode: null,
|
||||
shippingCode: "-",
|
||||
invoiceCode: "-",
|
||||
inventoryOrderGoodsList: []
|
||||
})
|
||||
const checkProductionDate = (row: any) => {
|
||||
|
|
@ -245,6 +260,11 @@ const getTotalPrice = () => {
|
|||
const emit = defineEmits(['close'])
|
||||
let exit = () => {
|
||||
isShow.value = false
|
||||
initInventoryOrderData()
|
||||
table_list.value = []
|
||||
emit('close')
|
||||
}
|
||||
const initInventoryOrderData = () => {
|
||||
inventory_order_data.value = {
|
||||
code: null,
|
||||
purchaseDate: getFormattedDate(),
|
||||
|
|
@ -254,12 +274,10 @@ let exit = () => {
|
|||
managerUserId: null,
|
||||
kindConut: 0,
|
||||
totalPrice: 0,
|
||||
shippingCode: null,
|
||||
invoiceCode: null,
|
||||
shippingCode: "-",
|
||||
invoiceCode: "-",
|
||||
inventoryOrderGoodsList: []
|
||||
}
|
||||
table_list.value = []
|
||||
emit('close')
|
||||
}
|
||||
const table_list: any = ref([])
|
||||
|
||||
|
|
@ -281,7 +299,6 @@ let confirm = async () => {
|
|||
|
||||
// 验证通过后执行原有逻辑
|
||||
inventory_order_data.value.kindConut = table_list.value.length;
|
||||
inventory_order_data.value.managerUserId = userInfo.value.id;
|
||||
|
||||
// 添加药品列表验证
|
||||
if (table_list.value.length === 0) {
|
||||
|
|
@ -355,6 +372,7 @@ const userInfo = ref<any>({})
|
|||
const getUserInfo = () => {
|
||||
post("manager/user/verify", null).then((res: any) => {
|
||||
userInfo.value = res
|
||||
inventory_order_data.value.managerUserId = res.id
|
||||
})
|
||||
}
|
||||
const removeTableRow = (row: any) => {
|
||||
|
|
@ -367,7 +385,17 @@ const removeTableRow = (row: any) => {
|
|||
const init = () => {
|
||||
isShow.value = true
|
||||
getSupplierList()
|
||||
getManagerUserList()
|
||||
|
||||
getUserInfo()
|
||||
|
||||
}
|
||||
const managerUserList: any = ref([])
|
||||
const getManagerUserList = () => {
|
||||
post("manager/user/list", {
|
||||
}).then((res: any) => {
|
||||
managerUserList.value = res
|
||||
})
|
||||
}
|
||||
// 追溯码代码
|
||||
const openCheckoutDetail = (row: any) => {
|
||||
|
|
@ -389,6 +417,12 @@ const confirmTrace = (data: any) => {
|
|||
// }
|
||||
// })
|
||||
}
|
||||
const addSupplierRef = ref()
|
||||
const addSupplier = () => {
|
||||
nextTick(() => {
|
||||
addSupplierRef.value?.addInit();
|
||||
})
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,21 @@
|
|||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购人">
|
||||
<span style="width: 234px;" class="order-info">{{ inventory_order_data.managerUserName }}</span>
|
||||
<el-select
|
||||
v-if="orderInfoIsEdit"
|
||||
v-model="inventory_order_data.managerUserId"
|
||||
placeholder="选择采购人"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in managerUserList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.managerUserName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
|
|
@ -192,7 +206,7 @@
|
|||
</template>
|
||||
</Mask>
|
||||
|
||||
|
||||
<AddSupplier ref="addSupplierRef" @close="getSupplierList"></AddSupplier>
|
||||
<Mask :is-show="is_add">
|
||||
<Edit ref="editRef" @close="is_add = false;"/>
|
||||
</Mask>
|
||||
|
|
@ -207,6 +221,7 @@ import Mask from "@/components/common/Mask.vue";
|
|||
import {ElMessage, ElMessageBox} from "element-plus";
|
||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||
import CloseBtn from "@/components/CloseBtn.vue";
|
||||
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||
|
||||
const props = defineProps({
|
||||
code: {
|
||||
|
|
@ -303,7 +318,9 @@ const init = (e: any) => {
|
|||
code.value = e
|
||||
isShow.value = true
|
||||
getSupplierList()
|
||||
getManagerUserList()
|
||||
getOrderDetail()
|
||||
|
||||
}
|
||||
const getTotalPrice = () => {
|
||||
let totalPrice = 0;
|
||||
|
|
@ -362,6 +379,13 @@ const addOneGoods = (row: any) => {
|
|||
}
|
||||
)
|
||||
}
|
||||
const managerUserList: any = ref([])
|
||||
const getManagerUserList = () => {
|
||||
post("manager/user/list", {}).then((res: any) => {
|
||||
managerUserList.value = res
|
||||
})
|
||||
}
|
||||
|
||||
const checkValue = (data: any) => {
|
||||
let msg = null;
|
||||
if (data.wholeNumber == 0) {
|
||||
|
|
@ -397,7 +421,13 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
getTotalPrice()
|
||||
}, 200)
|
||||
}
|
||||
const addSupplierRef = ref();
|
||||
const addSupplier = () => {
|
||||
nextTick(() => {
|
||||
addSupplierRef.value?.addInit()
|
||||
})
|
||||
|
||||
}
|
||||
defineExpose({init})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -439,6 +469,7 @@ defineExpose({init})
|
|||
.active {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.edit-panel {
|
||||
height: 562px;
|
||||
padding: 24px 24px 0;
|
||||
|
|
@ -471,6 +502,7 @@ defineExpose({init})
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 86px;
|
||||
display: flex;
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ const reciceMessage = (response: Response) => {
|
|||
}
|
||||
const errorCallback = () => {
|
||||
emit('changeLoading', false)
|
||||
ElMessage({
|
||||
message: "读卡器连接失败",
|
||||
duration: 1000,
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
|
||||
const emit = defineEmits(['socialCardUpdate', 'close', 'changeLoading'])
|
||||
|
|
@ -82,14 +87,6 @@ const getInfoFor1101 = (params: any) => {
|
|||
duration: 1000,
|
||||
});
|
||||
emit('socialCardUpdate', socialCard.value)
|
||||
}).catch((err:any) => {
|
||||
isReading.value = false;
|
||||
emit('changeLoading', false)
|
||||
ElMessage({
|
||||
message: "读取失败",
|
||||
duration: 1000,
|
||||
type: 'error',
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,24 @@
|
|||
<template>
|
||||
<div class="container-wrapper">
|
||||
<div class="top">
|
||||
<div class="search">
|
||||
<el-date-picker
|
||||
v-model="selectedDate"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
@change="handleDateChange"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
/>
|
||||
|
||||
</div>
|
||||
<div class="other-btn">
|
||||
<el-dropdown>
|
||||
<el-button type="primary" :icon="Plus" @click="openAdd">新增采购</el-button>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="content_list">
|
||||
<el-scrollbar>
|
||||
<el-table :data="tableData" style="width: 100%" @row-click="open_edit">
|
||||
|
|
@ -16,7 +30,7 @@
|
|||
<el-table-column label="品种" prop="kindCount" width="100">
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="入库金额" width="100">
|
||||
<el-table-column label="入库金额" width="200">
|
||||
<template #default="scope">
|
||||
¥{{ scope.row.totalPrice.toFixed(2) }}
|
||||
</template>
|
||||
|
|
@ -61,6 +75,7 @@ import AddOrder from "@/components/inventory/purchase/AddOrder.vue";
|
|||
import Mask from "@/components/common/Mask.vue";
|
||||
import EditOrder from "@/components/inventory/purchase/EditOrder.vue";
|
||||
import {Plus} from "@element-plus/icons-vue";
|
||||
import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts";
|
||||
|
||||
let tableData = ref([])
|
||||
let is_edit = ref(false)
|
||||
|
|
@ -115,6 +130,15 @@ const formatDate = (isoStr: any) => {
|
|||
const date = new Date(isoStr);
|
||||
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
|
||||
}
|
||||
|
||||
const selectedDate = ref<any>([])
|
||||
const handleDateChange = (date: any[]) => {
|
||||
selectedDate.value = formatDateArray(date)
|
||||
if (selectedDate.value[0] == selectedDate.value[1]) {
|
||||
selectedDate.value[1] = getEndOfDay(selectedDate.value[1]); // 输出今天 23:59
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@use "@/assets/scss/base.scss";
|
||||
|
|
|
|||
Loading…
Reference in New Issue