Merge branch 'main' of ssh://git.jizhiweb.cn:2222/clinic-v2/web
# Conflicts: # src/views/inventory/inventory.vue
This commit is contained in:
commit
a09446e907
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div style="position: fixed; z-index: 99999;">
|
<div style="position: fixed; z-index: 99999;">
|
||||||
<Mask :height="700" :width="900" :is-show="show">
|
<Mask :height="700" :width="900" :is-show="show" @close="show =false">
|
||||||
<CloseBtn @click="show = false"></CloseBtn>
|
|
||||||
<el-card>
|
<el-card>
|
||||||
<template #header>
|
<template #header>
|
||||||
<div class="header">追溯码采集</div>
|
<div class="header">追溯码采集</div>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,19 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="采购人">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
|
@ -42,7 +54,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item prop="supplierId" label="供应商" :rules="formRules.supplierId">
|
<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
|
<el-option
|
||||||
v-for="item in supplier_list"
|
v-for="item in supplier_list"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
|
@ -50,6 +62,7 @@
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-button type="primary" @click="addSupplier">添加供应商</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|
@ -163,6 +176,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
<AddSupplier ref="addSupplierRef" @close="getSupplierList"></AddSupplier>
|
||||||
<!-- <Mask :is-show="is_add" :top="100">-->
|
<!-- <Mask :is-show="is_add" :top="100">-->
|
||||||
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
<!-- <Edit ref="editRef" @close="is_add = false;"/>-->
|
||||||
<!-- </Mask>-->
|
<!-- </Mask>-->
|
||||||
|
|
@ -175,6 +189,7 @@ import {post} from '@/utils/request.ts'
|
||||||
import Edit from "@/components/inventory/goods/Edit.vue";
|
import Edit from "@/components/inventory/goods/Edit.vue";
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
|
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||||
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
import CheckoutDetail from "@/components/inventory/CheckoutDetail.vue";
|
||||||
import {Search} from "@element-plus/icons-vue";
|
import {Search} from "@element-plus/icons-vue";
|
||||||
|
|
@ -195,8 +210,8 @@ let inventory_order_data = ref({
|
||||||
managerUserId: null,
|
managerUserId: null,
|
||||||
kindConut: 0,
|
kindConut: 0,
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
shippingCode: null,
|
shippingCode: "-",
|
||||||
invoiceCode: null,
|
invoiceCode: "-",
|
||||||
inventoryOrderGoodsList: []
|
inventoryOrderGoodsList: []
|
||||||
})
|
})
|
||||||
const checkProductionDate = (row: any) => {
|
const checkProductionDate = (row: any) => {
|
||||||
|
|
@ -245,6 +260,11 @@ const getTotalPrice = () => {
|
||||||
const emit = defineEmits(['close'])
|
const emit = defineEmits(['close'])
|
||||||
let exit = () => {
|
let exit = () => {
|
||||||
isShow.value = false
|
isShow.value = false
|
||||||
|
initInventoryOrderData()
|
||||||
|
table_list.value = []
|
||||||
|
emit('close')
|
||||||
|
}
|
||||||
|
const initInventoryOrderData = () => {
|
||||||
inventory_order_data.value = {
|
inventory_order_data.value = {
|
||||||
code: null,
|
code: null,
|
||||||
purchaseDate: getFormattedDate(),
|
purchaseDate: getFormattedDate(),
|
||||||
|
|
@ -254,12 +274,10 @@ let exit = () => {
|
||||||
managerUserId: null,
|
managerUserId: null,
|
||||||
kindConut: 0,
|
kindConut: 0,
|
||||||
totalPrice: 0,
|
totalPrice: 0,
|
||||||
shippingCode: null,
|
shippingCode: "-",
|
||||||
invoiceCode: null,
|
invoiceCode: "-",
|
||||||
inventoryOrderGoodsList: []
|
inventoryOrderGoodsList: []
|
||||||
}
|
}
|
||||||
table_list.value = []
|
|
||||||
emit('close')
|
|
||||||
}
|
}
|
||||||
const table_list: any = ref([])
|
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.kindConut = table_list.value.length;
|
||||||
inventory_order_data.value.managerUserId = userInfo.value.id;
|
|
||||||
|
|
||||||
// 添加药品列表验证
|
// 添加药品列表验证
|
||||||
if (table_list.value.length === 0) {
|
if (table_list.value.length === 0) {
|
||||||
|
|
@ -355,6 +372,7 @@ const userInfo = ref<any>({})
|
||||||
const getUserInfo = () => {
|
const getUserInfo = () => {
|
||||||
post("manager/user/verify", null).then((res: any) => {
|
post("manager/user/verify", null).then((res: any) => {
|
||||||
userInfo.value = res
|
userInfo.value = res
|
||||||
|
inventory_order_data.value.managerUserId = res.id
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const removeTableRow = (row: any) => {
|
const removeTableRow = (row: any) => {
|
||||||
|
|
@ -367,7 +385,17 @@ const removeTableRow = (row: any) => {
|
||||||
const init = () => {
|
const init = () => {
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
getSupplierList()
|
getSupplierList()
|
||||||
|
getManagerUserList()
|
||||||
|
|
||||||
getUserInfo()
|
getUserInfo()
|
||||||
|
|
||||||
|
}
|
||||||
|
const managerUserList: any = ref([])
|
||||||
|
const getManagerUserList = () => {
|
||||||
|
post("manager/user/list", {
|
||||||
|
}).then((res: any) => {
|
||||||
|
managerUserList.value = res
|
||||||
|
})
|
||||||
}
|
}
|
||||||
// 追溯码代码
|
// 追溯码代码
|
||||||
const openCheckoutDetail = (row: any) => {
|
const openCheckoutDetail = (row: any) => {
|
||||||
|
|
@ -389,6 +417,12 @@ const confirmTrace = (data: any) => {
|
||||||
// }
|
// }
|
||||||
// })
|
// })
|
||||||
}
|
}
|
||||||
|
const addSupplierRef = ref()
|
||||||
|
const addSupplier = () => {
|
||||||
|
nextTick(() => {
|
||||||
|
addSupplierRef.value?.addInit();
|
||||||
|
})
|
||||||
|
}
|
||||||
defineExpose({init})
|
defineExpose({init})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,21 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-form-item label="采购人">
|
<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-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
|
@ -192,7 +206,7 @@
|
||||||
</template>
|
</template>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
||||||
|
<AddSupplier ref="addSupplierRef" @close="getSupplierList"></AddSupplier>
|
||||||
<Mask :is-show="is_add">
|
<Mask :is-show="is_add">
|
||||||
<Edit ref="editRef" @close="is_add = false;"/>
|
<Edit ref="editRef" @close="is_add = false;"/>
|
||||||
</Mask>
|
</Mask>
|
||||||
|
|
@ -207,6 +221,7 @@ import Mask from "@/components/common/Mask.vue";
|
||||||
import {ElMessage, ElMessageBox} from "element-plus";
|
import {ElMessage, ElMessageBox} from "element-plus";
|
||||||
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
import GoodsSearch from "@/components/inventory/GoodsSearch.vue";
|
||||||
import CloseBtn from "@/components/CloseBtn.vue";
|
import CloseBtn from "@/components/CloseBtn.vue";
|
||||||
|
import AddSupplier from "@/components/inventory/supplier/AddSupplier.vue";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
code: {
|
code: {
|
||||||
|
|
@ -303,7 +318,9 @@ const init = (e: any) => {
|
||||||
code.value = e
|
code.value = e
|
||||||
isShow.value = true
|
isShow.value = true
|
||||||
getSupplierList()
|
getSupplierList()
|
||||||
|
getManagerUserList()
|
||||||
getOrderDetail()
|
getOrderDetail()
|
||||||
|
|
||||||
}
|
}
|
||||||
const getTotalPrice = () => {
|
const getTotalPrice = () => {
|
||||||
let totalPrice = 0;
|
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) => {
|
const checkValue = (data: any) => {
|
||||||
let msg = null;
|
let msg = null;
|
||||||
if (data.wholeNumber == 0) {
|
if (data.wholeNumber == 0) {
|
||||||
|
|
@ -397,7 +421,13 @@ const goodsSelectCallBack = (inventory: any) => {
|
||||||
getTotalPrice()
|
getTotalPrice()
|
||||||
}, 200)
|
}, 200)
|
||||||
}
|
}
|
||||||
|
const addSupplierRef = ref();
|
||||||
|
const addSupplier = () => {
|
||||||
|
nextTick(() => {
|
||||||
|
addSupplierRef.value?.addInit()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
defineExpose({init})
|
defineExpose({init})
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
@ -439,6 +469,7 @@ defineExpose({init})
|
||||||
.active {
|
.active {
|
||||||
background-color: red;
|
background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-panel {
|
.edit-panel {
|
||||||
height: 562px;
|
height: 562px;
|
||||||
padding: 24px 24px 0;
|
padding: 24px 24px 0;
|
||||||
|
|
@ -471,6 +502,7 @@ defineExpose({init})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
height: 86px;
|
height: 86px;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,11 @@ const reciceMessage = (response: Response) => {
|
||||||
}
|
}
|
||||||
const errorCallback = () => {
|
const errorCallback = () => {
|
||||||
emit('changeLoading', false)
|
emit('changeLoading', false)
|
||||||
|
ElMessage({
|
||||||
|
message: "读卡器连接失败",
|
||||||
|
duration: 1000,
|
||||||
|
type: 'error',
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const emit = defineEmits(['socialCardUpdate', 'close', 'changeLoading'])
|
const emit = defineEmits(['socialCardUpdate', 'close', 'changeLoading'])
|
||||||
|
|
@ -82,14 +87,6 @@ const getInfoFor1101 = (params: any) => {
|
||||||
duration: 1000,
|
duration: 1000,
|
||||||
});
|
});
|
||||||
emit('socialCardUpdate', socialCard.value)
|
emit('socialCardUpdate', socialCard.value)
|
||||||
}).catch((err:any) => {
|
|
||||||
isReading.value = false;
|
|
||||||
emit('changeLoading', false)
|
|
||||||
ElMessage({
|
|
||||||
message: "读取失败",
|
|
||||||
duration: 1000,
|
|
||||||
type: 'error',
|
|
||||||
});
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,13 @@
|
||||||
<el-form :inline="true" :model="searchModel">
|
<el-form :inline="true" :model="searchModel">
|
||||||
<el-form-item >
|
<el-form-item >
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="searchModel.purchaseDate"
|
v-model="selectedDate"
|
||||||
type="date"
|
type="daterange"
|
||||||
placeholder="采购日期"
|
range-separator="-"
|
||||||
style="width: 200px;height: 42px"
|
@change="handleDateChange"
|
||||||
>
|
start-placeholder="开始时间"
|
||||||
</el-date-picker>
|
end-placeholder="结束时间"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-input
|
<el-input
|
||||||
|
|
@ -134,6 +135,7 @@ import AddOrder from "@/components/inventory/purchase/AddOrder.vue";
|
||||||
import Mask from "@/components/common/Mask.vue";
|
import Mask from "@/components/common/Mask.vue";
|
||||||
import EditOrder from "@/components/inventory/purchase/EditOrder.vue";
|
import EditOrder from "@/components/inventory/purchase/EditOrder.vue";
|
||||||
import {Plus, Refresh, Search, SemiSelect} from "@element-plus/icons-vue";
|
import {Plus, Refresh, Search, SemiSelect} from "@element-plus/icons-vue";
|
||||||
|
import {formatDateArray, getEndOfDay} from "@/utils/dateUtils.ts";
|
||||||
|
|
||||||
let tableData = ref([])
|
let tableData = ref([])
|
||||||
let is_edit = ref(false)
|
let is_edit = ref(false)
|
||||||
|
|
@ -188,6 +190,15 @@ const formatDate = (isoStr: any) => {
|
||||||
const date = new Date(isoStr);
|
const date = new Date(isoStr);
|
||||||
return `${date.getFullYear()}-${(date.getMonth() + 1).toString().padStart(2, '0')}-${date.getDate().toString().padStart(2, '0')}`;
|
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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const searchModel = ref({
|
const searchModel = ref({
|
||||||
purchaseDate:"",
|
purchaseDate:"",
|
||||||
code: "",
|
code: "",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue