dev
This commit is contained in:
parent
0fa3bf802e
commit
30dd4a29f6
|
|
@ -52,7 +52,6 @@ const handleSelect = (item: any) => {
|
|||
:remote-method="querySearchAsync"
|
||||
:options="options"
|
||||
placeholder="输入关键字搜索药品"
|
||||
:fit-input-width="800"
|
||||
>
|
||||
<template #header>
|
||||
<div class="header">
|
||||
|
|
|
|||
|
|
@ -1,111 +1,122 @@
|
|||
<template>
|
||||
<el-descriptions border label-width="100">
|
||||
<el-descriptions-item label="领用人" width="200">
|
||||
<el-input v-model="formData.name" disabled></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-input v-model="formData.remark"></el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
|
||||
<table class="simple-table" style="margin-top: 15px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>名称</th>
|
||||
<th>批次</th>
|
||||
<th>生产批号</th>
|
||||
<th>有效期</th>
|
||||
<th>当前库存</th>
|
||||
<th>出库数量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="(item,index) in tableList">
|
||||
<tr>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>
|
||||
<el-select
|
||||
v-model="item.selectList"
|
||||
multiple
|
||||
@change="addLine(item)"
|
||||
:teleported="false"
|
||||
style="width: 100px;"
|
||||
collapse-tags
|
||||
popper-class="table-select">
|
||||
<div class="select-header">
|
||||
<span>批次ID</span>
|
||||
<span>生产批号</span>
|
||||
<span>入库数据</span>
|
||||
<span>有效期</span>
|
||||
<span>进价</span>
|
||||
</div>
|
||||
<el-option
|
||||
v-for="(subItem,subIndex) in item.batchList"
|
||||
:key="subItem.id"
|
||||
:label="subItem.id"
|
||||
:value="subItem.id">
|
||||
<div class="option-row">
|
||||
<span>{{ subItem.id }}</span>
|
||||
<span>{{ subItem.productionBatchCode }}</span>
|
||||
<span>{{ subItem.productionDate }}</span>
|
||||
<span>{{ subItem.expiryDate }}</span>
|
||||
<span>{{ subItem.purchaseUnitPrice }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.wholeNumber }}{{ item.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ item.fragmentNumber }}{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.totalOutWholeNumber }}{{ item.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ item.totalFragmentNumber }}{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
<template v-for="subItem in item.children">
|
||||
<div class="add-panel">
|
||||
<div class="top">
|
||||
<el-form :inline=true label-position="top" :model="formData" label-width="auto">
|
||||
<el-form-item label="领用人">
|
||||
<el-input v-model="formData.name" disabled></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" style="width: 50%">
|
||||
<el-input v-model="formData.remark"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<div class="table_content">
|
||||
<div class="add_apply">
|
||||
<span>领用药品</span>
|
||||
<div class="search">
|
||||
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
|
||||
</div>
|
||||
</div>
|
||||
<table class="simple-table" style="margin-top: 15px;width: 100% ;height:300px ;max-height:550px">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>{{ subItem.productionBatchCode }}</td>
|
||||
<td>{{ subItem.expiryDate }}</td>
|
||||
<td>
|
||||
{{ subItem.wholeNumber }}{{ subItem.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ subItem.fragmentNumber }}{{ subItem.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<el-input v-model.number="subItem.outWholeNumber" size="small" style="width: 50px" @change="changeOutNumber(item)">
|
||||
<template #suffix>
|
||||
{{ item.packagingUnit }}
|
||||
</template>
|
||||
</el-input>
|
||||
<el-input v-model.number="subItem.outFragmentNumber" size="small" style="width: 50px"
|
||||
@change="changeOutNumber(item)" v-if="item.trdnFlag == 1">
|
||||
<template #suffix>
|
||||
{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</el-input>
|
||||
</td>
|
||||
<th>名称</th>
|
||||
<th>批次</th>
|
||||
<th>生产批号</th>
|
||||
<th>有效期</th>
|
||||
<th>当前库存</th>
|
||||
<th>出库数量</th>
|
||||
</tr>
|
||||
</template>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-for="(item,index) in tableList">
|
||||
<tr>
|
||||
<td>{{ item.name }}</td>
|
||||
<td>
|
||||
<el-select
|
||||
v-model="item.selectList"
|
||||
multiple
|
||||
@change="addLine(item)"
|
||||
:teleported="false"
|
||||
style="width: 100px;"
|
||||
collapse-tags
|
||||
popper-class="table-select">
|
||||
<div class="select-header">
|
||||
<span>批次ID</span>
|
||||
<span>生产批号</span>
|
||||
<span>入库数据</span>
|
||||
<span>有效期</span>
|
||||
<span>进价</span>
|
||||
</div>
|
||||
<el-option
|
||||
v-for="(subItem,subIndex) in item.batchList"
|
||||
:key="subItem.id"
|
||||
:label="subItem.id"
|
||||
:value="subItem.id">
|
||||
<div class="option-row">
|
||||
<span>{{ subItem.id }}</span>
|
||||
<span>{{ subItem.productionBatchCode }}</span>
|
||||
<span>{{ subItem.productionDate }}</span>
|
||||
<span>{{ subItem.expiryDate }}</span>
|
||||
<span>{{ subItem.purchaseUnitPrice }}</span>
|
||||
</div>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</td>
|
||||
<td></td>
|
||||
<td>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.wholeNumber }}{{ item.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ item.fragmentNumber }}{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
<td>
|
||||
{{ item.totalOutWholeNumber }}{{ item.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ item.totalFragmentNumber }}{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
</tr>
|
||||
<template v-for="subItem in item.children">
|
||||
<tr>
|
||||
<td>-</td>
|
||||
<td>-</td>
|
||||
<td>{{ subItem.productionBatchCode }}</td>
|
||||
<td>{{ subItem.expiryDate }}</td>
|
||||
<td>
|
||||
{{ subItem.wholeNumber }}{{ subItem.packagingUnit }}
|
||||
<template v-if="item.trdnFlag == 1">
|
||||
{{ subItem.fragmentNumber }}{{ subItem.minPackagingUnit }}
|
||||
</template>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<el-input v-model.number="subItem.outWholeNumber" size="small" style="width: 50px"
|
||||
@change="changeOutNumber(item)">
|
||||
<template #suffix>
|
||||
{{ item.packagingUnit }}
|
||||
</template>
|
||||
</el-input>
|
||||
<el-input v-model.number="subItem.outFragmentNumber" size="small" style="width: 50px"
|
||||
@change="changeOutNumber(item)" v-if="item.trdnFlag == 1">
|
||||
<template #suffix>
|
||||
{{ item.minPackagingUnit }}
|
||||
</template>
|
||||
</el-input>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
</template>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import {onMounted, ref, unref} from "vue";
|
||||
|
|
@ -288,6 +299,7 @@ onMounted(() => {
|
|||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
}
|
||||
|
||||
tbody {
|
||||
tr:hover {
|
||||
background-color: #f5f7fa; /* 悬停效果 */
|
||||
|
|
@ -345,15 +357,50 @@ onMounted(() => {
|
|||
background-color: #fffdec;
|
||||
}
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.add-panel {
|
||||
position: relative;
|
||||
margin-top: 24px;
|
||||
height: 100%;
|
||||
|
||||
.table_content {
|
||||
margin-top: 24px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.add_apply {
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
|
||||
.search {
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.simple-table {
|
||||
flex: 1;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.bottom {
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
top: 175%;
|
||||
|
||||
}
|
||||
</style>
|
||||
|
|
@ -63,7 +63,6 @@
|
|||
<span>添加商品</span>
|
||||
<div class="search">
|
||||
<GoodsSearch @selectCallBack="goodsSelectCallBack"></GoodsSearch>
|
||||
<el-button :icon="Search" type="primary">搜索</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="table_list" style="width: 100%" height="300" max-height="550">
|
||||
|
|
@ -139,14 +138,15 @@
|
|||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="totalPrice">
|
||||
订单总金额:¥{{ inventory_order_data.totalPrice.toFixed(2) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
<div class="totalPrice">
|
||||
订单总金额:<span style="color: #FF282E;font-size: 12px">¥</span><span style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" @click="confirm">确认</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -339,21 +339,6 @@ onMounted(() => {
|
|||
})
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.order_table {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
//background-color: rgb(148.6, 212.3, 117.1);
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
|
||||
tr {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.link {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
|
|
@ -394,10 +379,17 @@ onMounted(() => {
|
|||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 86px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
background: #fff;
|
||||
box-shadow: 0px -2 4px 0px rgba(0,0,0,0.1);
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.error {
|
||||
|
|
@ -408,7 +400,6 @@ onMounted(() => {
|
|||
}
|
||||
.table_content{
|
||||
margin-top: 24px;
|
||||
background: #F9FAFC;
|
||||
.add_goods{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
|
@ -418,8 +409,7 @@ onMounted(() => {
|
|||
color: #333333;
|
||||
font-style: normal;
|
||||
.search{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,66 +1,89 @@
|
|||
<template>
|
||||
<div class="edit-panel" v-loading="isLoading" element-loading-text="正在保存......">
|
||||
<div class="top">
|
||||
<el-descriptions title="采购订单" border>
|
||||
<el-descriptions-item label="订单编号" width="200">
|
||||
<span class="order-info">{{ inventory_order_data.code }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采购人" width="150">
|
||||
<span class="order-info">{{ inventory_order_data.managerUserName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="采购日期">
|
||||
<el-date-picker
|
||||
v-model="inventory_order_data.purchaseDate"
|
||||
type="date"
|
||||
placeholder="选择一个创建日期"
|
||||
size="default"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-if="orderInfoIsEdit"
|
||||
/>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.purchaseDate }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="货单号">
|
||||
|
||||
<el-input v-model="inventory_order_data.shippingCode" v-if="orderInfoIsEdit"></el-input>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.shippingCode }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="发票号">
|
||||
|
||||
<el-input v-model="inventory_order_data.invoiceCode" v-if="orderInfoIsEdit"></el-input>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.invoiceCode }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="供应商">
|
||||
<el-select
|
||||
v-model="inventory_order_data.supplierId"
|
||||
placeholder="请选择供应商"
|
||||
v-if="orderInfoIsEdit">
|
||||
<el-option
|
||||
v-for="item in supplier_list"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.supplierName }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-input v-model="inventory_order_data.remark" v-if="orderInfoIsEdit"/>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.remark }}</span>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<el-button type="primary" @click="saveOrderEdit" v-if="orderInfoIsEdit" plain>保存</el-button>
|
||||
<el-button type="primary" @click="editOrder" v-else plain>编辑</el-button>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<span class="btn-add-good" style="font-size: 16px"
|
||||
@click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }}
|
||||
</span>
|
||||
<GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack">
|
||||
|
||||
</GoodsSearch>
|
||||
<el-form :model="inventory_order_data" label-position="top" ref="orderForm">
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="订单编号">
|
||||
<div style="width: 234px;">
|
||||
<span class="order-info">{{ inventory_order_data.code }}</span>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="采购人">
|
||||
<span style="width: 234px;" class="order-info">{{ inventory_order_data.managerUserName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="purchaseDate" label="采购日期">
|
||||
<el-date-picker
|
||||
v-model="inventory_order_data.purchaseDate"
|
||||
type="date"
|
||||
placeholder="选择一个创建日期"
|
||||
size="default"
|
||||
value-format="YYYY-MM-DD"
|
||||
v-if="orderInfoIsEdit"
|
||||
style="width: 234px;"
|
||||
/>
|
||||
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.purchaseDate }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="shippingCode" label="货单号">
|
||||
<el-input v-model="inventory_order_data.shippingCode" v-if="orderInfoIsEdit"></el-input>
|
||||
<span class="order-info" v-else>{{ inventory_order_data.shippingCode }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="invoiceCode" label="发票号">
|
||||
<el-input style="width: 234px;" v-model="inventory_order_data.invoiceCode"
|
||||
v-if="orderInfoIsEdit"></el-input>
|
||||
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.invoiceCode }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item prop="supplierId" label="供应商">
|
||||
<el-select
|
||||
v-model="inventory_order_data.supplierId"
|
||||
placeholder="请选择供应商"
|
||||
v-if="orderInfoIsEdit"
|
||||
style="width: 234px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in supplier_list"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
</el-select>
|
||||
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.supplierName }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="备注" style="width: 234px">
|
||||
<el-input style="width: 234px;" v-model="inventory_order_data.remark" v-if="orderInfoIsEdit"/>
|
||||
<span style="width: 234px;" class="order-info" v-else>{{ inventory_order_data.remark }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-form-item label="操作">
|
||||
<el-button type="primary" @click="saveOrderEdit" v-if="orderInfoIsEdit" plain>保存</el-button>
|
||||
<el-button type="primary" @click="editOrder" v-else plain>编辑</el-button>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="table_content">
|
||||
<div class="add_goods">
|
||||
<el-button type="primary" @click="changeShowGoodSearch">{{ showGoodSearch ? '取消' : '添加药品' }}</el-button>
|
||||
<div class="search">
|
||||
<GoodsSearch v-if="showGoodSearch" @selectCallBack="goodsSelectCallBack"></GoodsSearch>
|
||||
</div>
|
||||
</div>
|
||||
<el-table :data="table_list" style="width: 100%" height="250">
|
||||
<el-table-column prop="name" label="药品名称" width="180" show-overflow-tooltip/>
|
||||
<el-table-column label="售价" prop="unitPrice" width="80">
|
||||
|
|
@ -151,18 +174,23 @@
|
|||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<div class="totalPrice">
|
||||
订单总金额:¥{{ inventory_order_data.totalPrice.toFixed(2) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom">
|
||||
<el-button type="danger" @click="returnableAll()" plain>整单退货</el-button>
|
||||
<el-button type="primary" @click="exit" plain>关闭</el-button>
|
||||
<div class="totalPrice">
|
||||
订单总金额:<span style="color: #FF282E;font-size: 12px">¥</span><span
|
||||
style="color: #FF282E">{{ inventory_order_data.totalPrice.toFixed(2) }}</span>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="danger" @click="returnableAll()" plain>整单退货</el-button>
|
||||
<el-button type="primary" @click="exit">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :is-show="is_add" :top="100">
|
||||
<Edit ref="editRef" @close="is_add = false;"/>
|
||||
</Mask>
|
||||
|
||||
<Mask :is-show="is_add" :top="100">
|
||||
<Edit ref="editRef" @close="is_add = false;"/>
|
||||
</Mask>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
|
@ -298,7 +326,7 @@ const getSupplierList = () => {
|
|||
const query = {
|
||||
turn: 1
|
||||
}
|
||||
post("inventory/supplier/list", {query:query}).then((res: any) => {
|
||||
post("inventory/supplier/list", {query: query}).then((res: any) => {
|
||||
supplier_list.value = res.list
|
||||
})
|
||||
}
|
||||
|
|
@ -306,7 +334,6 @@ const getOrderDetail = () => {
|
|||
post("inventory/order/detail", {code: props.code}).then((res: any) => {
|
||||
inventory_order_data.value = res.inventoryOrder
|
||||
table_list.value = res.inventoryOrderGoodsList
|
||||
console.log(res)
|
||||
})
|
||||
}
|
||||
const addOneGoods = (row: any) => {
|
||||
|
|
@ -363,70 +390,12 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.order_table {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
//background-color: rgb(148.6, 212.3, 117.1);
|
||||
background-color: #fff;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
|
||||
tr {
|
||||
height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
.order-info {
|
||||
line-height: 32px;
|
||||
}
|
||||
|
||||
.search_box {
|
||||
//background-color: rgb(148.6, 212.3, 117.1);
|
||||
background-color: #fff;
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
box-sizing: border-box;
|
||||
margin-top: 10px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
}
|
||||
|
||||
.header {
|
||||
display: flex;
|
||||
|
||||
.text {
|
||||
font-size: 16px;
|
||||
width: 200px;
|
||||
color: #6a6a6a;
|
||||
}
|
||||
}
|
||||
|
||||
.link {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
color: #2e7eb3;
|
||||
}
|
||||
|
||||
.btn-add-good {
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
color: #2e7eb3;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
max-height: 500px;
|
||||
|
||||
.text {
|
||||
font-size: 12px;
|
||||
width: 150px;
|
||||
margin-left: 10px;
|
||||
overflow: hidden; /* 隐藏超出部分 */
|
||||
text-overflow: ellipsis; /* 显示省略号 */
|
||||
white-space: nowrap; /* 防止换行 */
|
||||
}
|
||||
}
|
||||
|
||||
.line {
|
||||
margin-right: 10px;
|
||||
|
|
@ -461,9 +430,39 @@ const goodsSelectCallBack = (inventory: any) => {
|
|||
}
|
||||
|
||||
.bottom {
|
||||
margin-top: 10px;
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
height: 86px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 400;
|
||||
font-size: 22px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
background: #fff;
|
||||
box-shadow: 0px -2 4px 0px rgba(0,0,0,0.1);
|
||||
border-radius: 0 0 8px 8px;
|
||||
}
|
||||
|
||||
.error {
|
||||
background-color: #F00;
|
||||
}
|
||||
.edit-panel{
|
||||
margin-top: 24px;
|
||||
}
|
||||
.table_content{
|
||||
margin-top: 24px;
|
||||
.add_goods{
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-weight: 800;
|
||||
font-size: 18px;
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
.search{
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,45 +1,54 @@
|
|||
<template>
|
||||
<el-descriptions
|
||||
direction="vertical"
|
||||
:column="1"
|
||||
>
|
||||
<el-descriptions-item label="供货商名称">
|
||||
<el-input v-model="formData.name" placeholder="请输入供货商名称"></el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-descriptions
|
||||
direction="vertical"
|
||||
:column="2"
|
||||
>
|
||||
<el-descriptions-item label="启用状态">
|
||||
<el-radio-group v-model="formData.turn" size="large">
|
||||
<el-radio-button label="禁用" :value="0"/>
|
||||
<el-radio-button label="启用" :value="1"/>
|
||||
</el-radio-group>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="许可证号">
|
||||
<el-input v-model="formData.licenseCode" placeholder="请输入许可证号"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系人">
|
||||
<el-input v-model="formData.contactName" placeholder="请输入联系人名称"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="联系方式">
|
||||
<el-input v-model="formData.contactTel" placeholder="请输入联系方式"></el-input>
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="备注">
|
||||
<el-input v-model="formData.reamark"
|
||||
type="textarea" rows="5"
|
||||
max="200"
|
||||
show-word-limit
|
||||
placeholder="请输入备注">
|
||||
</el-input>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<div class="add-supplier" style="width:100%;margin-top: 24px">
|
||||
<div class="form">
|
||||
<el-form style="width: 100%" ref="ruleFormRef" :model="formData" :inline=true label-position="top">
|
||||
<el-form-item label="供货商名称" style="width: 100%;margin-right: 0">
|
||||
<el-input style="width: 100%" v-model="formData.name" placeholder="请输入供货商名称"></el-input>
|
||||
</el-form-item>
|
||||
<el-row style="width: 100%">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="启用状态">
|
||||
<el-radio-group v-model="formData.turn" size="large">
|
||||
<el-radio-button label="禁用" :value="0"/>
|
||||
<el-radio-button label="启用" :value="1"/>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="许可证号" style="margin-right: 0">
|
||||
<el-input v-model="formData.licenseCode" placeholder="请输入许可证号"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row style="width: 100%">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系人">
|
||||
<el-input v-model="formData.contactName" placeholder="请输入联系人名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="联系方式" style="margin-right: 0">
|
||||
<el-input v-model="formData.contactTel" placeholder="请输入联系方式"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-form-item label="备注" style="margin-right: 0;width: 100%">
|
||||
<el-input v-model="formData.reamark"
|
||||
type="textarea" rows="5"
|
||||
max="200"
|
||||
show-word-limit
|
||||
placeholder="请输入备注"
|
||||
style="width: 100%"
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn">
|
||||
<el-button type="primary" @click="save">确定</el-button>
|
||||
<el-button @click="close">取消</el-button>
|
||||
</div>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
|
@ -89,7 +98,7 @@ const close = () => {
|
|||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.btn{
|
||||
.btn {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
bottom: 10px;
|
||||
|
|
|
|||
|
|
@ -2,11 +2,11 @@
|
|||
<div class="container-wrapper">
|
||||
<div class="top">
|
||||
<el-dropdown>
|
||||
<el-button type="primary" :icon="Plus" @click="open_add(null)">新增采购</el-button>
|
||||
<el-button type="primary" :icon="Plus" @click="is_add = true">新增采购</el-button>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
<div class="content_list">
|
||||
<el-table :data="tableData" style="width: 100%" @row-click="open_add">
|
||||
<el-table :data="tableData" style="width: 100%" @row-click="open_edit">
|
||||
<el-table-column fixed label="进货单号" width="250" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<div class="link">{{ scope.row.code }}</div>
|
||||
|
|
@ -46,10 +46,13 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :width="1200" :top="100" :is-show="is_add" @close="is_add=false"
|
||||
:title="open_code?'编辑':'新增'">
|
||||
<AddOrder v-if="!open_code" @close="closeAddOrder"/>
|
||||
<EditOrder v-else :code="open_code" @close="is_add=false" @updateOrderDetail="init"/>
|
||||
<Mask v-if="!open_code" :width="1200" :top="100" :is-show="is_add" @close="closeAddOrder"
|
||||
title="新增" :height="760">
|
||||
<AddOrder @close="closeAddOrder"/>
|
||||
</Mask>
|
||||
<Mask v-else :width="1200" :top="100" :is-show="is_edit" @close="closeEditOrder"
|
||||
title="编辑" :height="720">
|
||||
<EditOrder :code="open_code" @close="closeEditOrder" @updateOrderDetail="init"/>
|
||||
</Mask>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -65,18 +68,15 @@ import {Plus} from "@element-plus/icons-vue";
|
|||
|
||||
let tableData = ref([])
|
||||
let is_add = ref(false)
|
||||
let is_edit = ref(false)
|
||||
const route = useRoute()
|
||||
let open_code = ref(null)
|
||||
onMounted(() => {
|
||||
init()
|
||||
})
|
||||
let open_add = (row: any) => {
|
||||
is_add.value = true
|
||||
if (row!=null) {
|
||||
open_code.value = row.code
|
||||
}else{
|
||||
open_code.value = null
|
||||
}
|
||||
let open_edit = (row: any) => {
|
||||
is_edit.value = true
|
||||
open_code.value = row.code
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -94,6 +94,11 @@ const closeAddOrder = () => {
|
|||
is_add.value = false
|
||||
init()
|
||||
}
|
||||
const closeEditOrder = () => {
|
||||
open_code.value = null
|
||||
is_edit.value = false
|
||||
init()
|
||||
}
|
||||
//分页
|
||||
let pageSize = ref(20)
|
||||
let total = ref(0)
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
/>
|
||||
</div>
|
||||
</div>
|
||||
<Mask :width="400" :height="600" :is-show="showAdd" :top="100" @close="showAdd = false" :title="id?'编辑':'添加'">
|
||||
<Mask :width="540" :height="603" :is-show="showAdd" :top="100" @close="showAdd = false" :title="id?'编辑':'添加供应商'">
|
||||
<AddSupplier @close="showAdd = false" @saveSuccess="getSupplier()" ref="addSupplierRef"></AddSupplier>
|
||||
</Mask>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue