This commit is contained in:
parent
eefa41f74a
commit
46c67af1fc
|
@ -75,4 +75,9 @@ export function opurchaseclassStreamUpdateApi(params: any) {
|
||||||
return request.post({ url: '/operation/opurchaseclass/stream_update', params })
|
return request.post({ url: '/operation/opurchaseclass/stream_update', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 全部出入库记录
|
||||||
|
export function opurchaseclassAllListsApi(params: any) {
|
||||||
|
return request.get({ url: '/operation/OpurchaseGoodsOffer/all_lists', params })
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
<el-descriptions-item label="实收金额">
|
<el-descriptions-item label="实收金额">
|
||||||
{{ formData.money }}
|
{{ formData.money }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="收货地址" :span="2">
|
||||||
|
{{ formData.merchant_info?.mer_address }}
|
||||||
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
|
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
|
|
|
@ -214,9 +214,9 @@ export const print = (data: any) => {
|
||||||
// 合计高度 23 + length * 2
|
// 合计高度 23 + length * 2
|
||||||
|
|
||||||
//打印
|
//打印
|
||||||
hiprintTemplate.print({});
|
// hiprintTemplate.print({});
|
||||||
//直接打印,需要安装客户端
|
//直接打印,需要安装客户端
|
||||||
// hiprintTemplate.print2({});
|
hiprintTemplate.print2({});
|
||||||
// 直接打印回调
|
// 直接打印回调
|
||||||
// 发送任务到打印机成功
|
// 发送任务到打印机成功
|
||||||
hiprintTemplate.on("printSuccess", (e: any) => {
|
hiprintTemplate.on("printSuccess", (e: any) => {
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
:infinite-scroll-delay="500"
|
:infinite-scroll-delay="500"
|
||||||
:infinite-scroll-immediate="false"
|
:infinite-scroll-immediate="false"
|
||||||
style="overflow: auto"
|
style="overflow: auto"
|
||||||
|
v-loading="where.loading"
|
||||||
>
|
>
|
||||||
<el-row :gutter="20" style="width: 100%">
|
<el-row :gutter="20" style="width: 100%">
|
||||||
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
||||||
<el-card>
|
<el-card class="mb-4">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>名称: {{ item.goods_name }}</div>
|
<div>名称: {{ item.goods_name }}</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -28,6 +29,8 @@
|
||||||
v-model="item.nums"
|
v-model="item.nums"
|
||||||
placeholder="请输入可提供数量"
|
placeholder="请输入可提供数量"
|
||||||
style="flex: 1"
|
style="flex: 1"
|
||||||
|
type="number"
|
||||||
|
@blur="blur1(item)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex" style="align-items: center">
|
<div class="flex" style="align-items: center">
|
||||||
|
@ -36,6 +39,8 @@
|
||||||
v-model="item.price"
|
v-model="item.price"
|
||||||
placeholder="请输入产品报价"
|
placeholder="请输入产品报价"
|
||||||
style="flex: 1"
|
style="flex: 1"
|
||||||
|
type="number"
|
||||||
|
@blur="blur2(item)"
|
||||||
></el-input>
|
></el-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -57,6 +62,7 @@
|
||||||
|
|
||||||
<script lang="ts" setup name="adopt0">
|
<script lang="ts" setup name="adopt0">
|
||||||
import { opurchaseGoodsOfferListsApi, opurchaseGoodsOfferOfferApi } from '@/api/quote';
|
import { opurchaseGoodsOfferListsApi, opurchaseGoodsOfferOfferApi } from '@/api/quote';
|
||||||
|
import { timeFormat } from "@/utils/util";
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
date: { type: String, default: '' },
|
date: { type: String, default: '' },
|
||||||
|
@ -64,15 +70,39 @@ const props = defineProps({
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
|
|
||||||
|
const where = reactive({
|
||||||
|
page_no: 1,
|
||||||
|
page_size: 30,
|
||||||
|
loading: false,
|
||||||
|
loadend: false,
|
||||||
|
})
|
||||||
const getLists = (reload = false) => {
|
const getLists = (reload = false) => {
|
||||||
if (reload) {
|
if (reload) {
|
||||||
list.value = [];
|
list.value = [];
|
||||||
|
where.page_no = 1;
|
||||||
|
where.loadend = false;
|
||||||
|
where.loading = false;
|
||||||
}
|
}
|
||||||
|
if(where.loading || where.loadend) return;
|
||||||
|
where.loading = true;
|
||||||
opurchaseGoodsOfferListsApi({
|
opurchaseGoodsOfferListsApi({
|
||||||
date: props.date,
|
start_time: timeFormat(new Date(props.date), "yyyy-mm-dd"),
|
||||||
|
end_time: timeFormat(new Date(props.date), "yyyy-mm-dd") + " 23:59:59",
|
||||||
type: 1,
|
type: 1,
|
||||||
}).then((res) => {
|
page_no: where.page_no,
|
||||||
|
page_size: where.page_size
|
||||||
|
}).then((res:any) => {
|
||||||
|
res.lists = res.lists.map((item: any) => {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
nums: "",
|
||||||
|
price: ""
|
||||||
|
};
|
||||||
|
});
|
||||||
list.value = [...list.value, ...res.lists];
|
list.value = [...list.value, ...res.lists];
|
||||||
|
if(res.lists.length < where.page_size) where.loadend = true;
|
||||||
|
where.page_no++;
|
||||||
|
where.loading = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,11 +110,19 @@ defineExpose({
|
||||||
getLists
|
getLists
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const blur1 = (item)=>{
|
||||||
|
if(item.nums<0) item.nums=0;
|
||||||
|
if(item.nums>item.need_num) item.nums=item.need_num;
|
||||||
|
}
|
||||||
|
const blur2 = (item)=>{
|
||||||
|
if(item.price<0) item.price=0;
|
||||||
|
item.price = (+item.price).toFixed(2)
|
||||||
|
}
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
let data = list.value
|
let data = list.value
|
||||||
.filter((item) => {
|
.filter((item) => {
|
||||||
return +item.price && +item.nums;
|
return +item.price > 0 && +item.nums > 0;
|
||||||
})
|
})
|
||||||
.map((item: any) => {
|
.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
|
@ -102,7 +140,7 @@ const submit = () => {
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss">
|
||||||
.quote-list {
|
.quote-list {
|
||||||
height: calc(100vh - 300px);
|
height: calc(100vh - 300px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -131,4 +169,5 @@ const submit = () => {
|
||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
||||||
}
|
}
|
||||||
|
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
</div>
|
</div>
|
||||||
<el-row :gutter="20" style="width: 100%">
|
<el-row :gutter="20" style="width: 100%">
|
||||||
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
||||||
<div class="card p-4" :class="{ 'c-card': deliverMap.has(item.id) }" @click="changeItem(item)">
|
<div class="card p-4 mb-4" :class="{ 'c-card': deliverMap.has(item.id) }" @click="changeItem(item)">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>名称: {{ item.goods_name }}</div>
|
<div>名称: {{ item.goods_name }}</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -86,16 +86,32 @@ const props = defineProps({
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
|
|
||||||
|
const where = reactive({
|
||||||
|
page_no: 1,
|
||||||
|
page_size: 30,
|
||||||
|
loading: false,
|
||||||
|
loadend: false,
|
||||||
|
})
|
||||||
const getLists = (reload = false) => {
|
const getLists = (reload = false) => {
|
||||||
if (reload) {
|
if (reload) {
|
||||||
list.value = [];
|
list.value = [];
|
||||||
|
where.page_no = 1;
|
||||||
|
where.loadend = false;
|
||||||
|
where.loading = false;
|
||||||
}
|
}
|
||||||
|
if(where.loading || where.loadend) return;
|
||||||
|
where.loading = true;
|
||||||
opurchaseGoodsOfferListsApi({
|
opurchaseGoodsOfferListsApi({
|
||||||
is_adopt: 2,
|
|
||||||
start_time: timeFormat(new Date(props.date), "yyyy-mm-dd"),
|
start_time: timeFormat(new Date(props.date), "yyyy-mm-dd"),
|
||||||
end_time: timeFormat(new Date(props.date), "yyyy-mm-dd") + " 23:59:59",
|
end_time: timeFormat(new Date(props.date), "yyyy-mm-dd") + " 23:59:59",
|
||||||
|
is_adopt: 2,
|
||||||
|
page_no: where.page_no,
|
||||||
|
page_size: where.page_size
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
list.value = [...list.value, ...res.lists];
|
list.value = [...list.value, ...res.lists];
|
||||||
|
if(res.lists.length < where.page_size) where.loadend = true;
|
||||||
|
where.page_no++;
|
||||||
|
where.loading = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -162,4 +178,5 @@ const deliverGoodsRef = ref(null);
|
||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
||||||
}
|
}
|
||||||
|
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
>
|
>
|
||||||
<el-row :gutter="20" style="width: 100%">
|
<el-row :gutter="20" style="width: 100%">
|
||||||
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
<el-col :span="8" v-for="(item, index) in list" :key="index">
|
||||||
<el-card>
|
<el-card class="mb-4">
|
||||||
<div class="flex justify-between">
|
<div class="flex justify-between">
|
||||||
<div>名称: {{ item.goods_name }}</div>
|
<div>名称: {{ item.goods_name }}</div>
|
||||||
<div>
|
<div>
|
||||||
|
@ -89,16 +89,32 @@ const props = defineProps({
|
||||||
|
|
||||||
const list = ref([]);
|
const list = ref([]);
|
||||||
|
|
||||||
|
const where = reactive({
|
||||||
|
page_no: 1,
|
||||||
|
page_size: 30,
|
||||||
|
loading: false,
|
||||||
|
loadend: false,
|
||||||
|
})
|
||||||
const getLists = (reload = false) => {
|
const getLists = (reload = false) => {
|
||||||
if (reload) {
|
if (reload) {
|
||||||
list.value = [];
|
list.value = [];
|
||||||
|
where.page_no = 1;
|
||||||
|
where.loadend = false;
|
||||||
|
where.loading = false;
|
||||||
}
|
}
|
||||||
|
if(where.loading || where.loadend) return;
|
||||||
|
where.loading = true;
|
||||||
opurchaseGoodsOfferListsApi({
|
opurchaseGoodsOfferListsApi({
|
||||||
type: 2,
|
|
||||||
start_time: timeFormat(new Date(props.date), "yyyy-mm-dd"),
|
start_time: timeFormat(new Date(props.date), "yyyy-mm-dd"),
|
||||||
end_time: timeFormat(new Date(props.date), "yyyy-mm-dd") + " 23:59:59",
|
end_time: timeFormat(new Date(props.date), "yyyy-mm-dd") + " 23:59:59",
|
||||||
|
type: 2,
|
||||||
|
page_no: where.page_no,
|
||||||
|
page_size: where.page_size
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
list.value = [...list.value, ...res.lists];
|
list.value = [...list.value, ...res.lists];
|
||||||
|
if(res.lists.length < where.page_size) where.loadend = true;
|
||||||
|
where.page_no++;
|
||||||
|
where.loading = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -136,4 +152,5 @@ defineExpose({
|
||||||
::-webkit-scrollbar-thumb:hover {
|
::-webkit-scrollbar-thumb:hover {
|
||||||
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
background-color: #999; /* 设置鼠标悬停时滑块的背景色 */
|
||||||
}
|
}
|
||||||
|
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<el-dialog v-model="dialogFormVisible" title="已采纳商品发货" width="500">
|
<el-dialog v-model="dialogFormVisible" title="已采纳商品发货" width="500">
|
||||||
<el-form :model="form">
|
<el-form :model="form">
|
||||||
<el-form-item label="发货方式" :label-width="formLabelWidth">
|
<el-form-item label="发货方式" :label-width="formLabelWidth">
|
||||||
<el-select v-model="type" placeholder="选择发货方式">
|
<el-select v-model="type" placeholder="选择发货方式" @change="form.delivery_name='';form.delivery_id='';">
|
||||||
<el-option label="快递配送" :value="1" />
|
<el-option label="快递配送" :value="1" />
|
||||||
<el-option label="自行配送" :value="2" />
|
<el-option label="自行配送" :value="2" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
|
|
@ -0,0 +1,167 @@
|
||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
<el-table :data="pager.lists" v-loading="pager.loading" border style="width: 100%; margin-top: 10px">
|
||||||
|
<el-table-column prop="id" label="ID" width="120" />
|
||||||
|
<!-- <el-table-column prop="order_id" label="采购订单id" width="120" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="商品名称"
|
||||||
|
prop="goods_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="220"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="单位"
|
||||||
|
prop="unit_name"
|
||||||
|
width="80"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商"
|
||||||
|
prop="supplier_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="出库数量"
|
||||||
|
prop="nums"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column label="报价" prop="price" show-overflow-tooltip />
|
||||||
|
<el-table-column label="物流/送货人" prop="delivery_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="单号/手机" prop="delivery_id" show-overflow-tooltip />
|
||||||
|
<el-table-column label="状态" prop="is_storage" show-overflow-tooltip >
|
||||||
|
<template #default="{ row }" >
|
||||||
|
<el-tag v-if="row.is_stream" type="success">已出库</el-tag>
|
||||||
|
<el-tag v-else type="info">未出库</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人员" prop="stream_admin_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" prop="notes" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="出库时间"
|
||||||
|
prop="update_time"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column v-if="false" label="操作" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="row.is_adopt === 1 && row.price > 0"
|
||||||
|
size="small"
|
||||||
|
@click="offerGood(row, 0)"
|
||||||
|
>采纳</el-button
|
||||||
|
>
|
||||||
|
<span v-if="row.is_storage">已出库</span>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
v-else-if="row.is_adopt === 2 && row.price > 0"
|
||||||
|
size="small"
|
||||||
|
@click="offerGood(row, 1)"
|
||||||
|
>出库</el-button
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
v-if="row.is_adopt === 0 && row.price == 0"
|
||||||
|
style="color: #e6a23c"
|
||||||
|
>等待供应商报价</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-if="pager.lists" v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
<el-dialog v-model="dialogVisible" title="出库" width="600">
|
||||||
|
<el-descriptions class="margin-top" :column="1" border>
|
||||||
|
<el-descriptions-item label="供应商名称">
|
||||||
|
{{ updateInfo.supplier_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="商品名称">
|
||||||
|
{{ updateInfo.goods_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="商品报价">
|
||||||
|
¥ {{ updateInfo.price }} / {{ updateInfo.unit_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应出库数量">
|
||||||
|
{{ updateInfo.q_nums }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实际出库数量">
|
||||||
|
<el-input-number v-model="updateInfo.nums" :step="1" :min="1" />
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
<el-input
|
||||||
|
v-model="updateInfo.notes"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输出备注"
|
||||||
|
></el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="goodsOfferUpdate"> 确认 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="subOrder">
|
||||||
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
|
import {
|
||||||
|
opurchaseclassAllListsApi,
|
||||||
|
apiOpurchaseclassGoodsOfferUpdate,
|
||||||
|
} from "@/api/opurchaseclass";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const isAdopt = ref("");
|
||||||
|
const queryParams = reactive({
|
||||||
|
is_stream: 1 //出库
|
||||||
|
});
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: opurchaseclassAllListsApi,
|
||||||
|
params: queryParams,
|
||||||
|
});
|
||||||
|
|
||||||
|
getLists();
|
||||||
|
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const updateInfo = ref({
|
||||||
|
id: "",
|
||||||
|
type: 0,
|
||||||
|
notes: "", //备注
|
||||||
|
nums: 0, //实际数量
|
||||||
|
q_nums: 0, //应到数量
|
||||||
|
});
|
||||||
|
const offerGood = (row: any, type: number) => {
|
||||||
|
//type:0 采纳,1 出库
|
||||||
|
updateInfo.value = Object.assign(
|
||||||
|
{
|
||||||
|
id: "",
|
||||||
|
type: type,
|
||||||
|
notes: "", //备注
|
||||||
|
nums: 0,
|
||||||
|
},
|
||||||
|
row
|
||||||
|
);
|
||||||
|
if (type == 0) return goodsOfferUpdate(); // 采纳时直接成功, 出库弹窗显示数量
|
||||||
|
updateInfo.value.q_nums = row.nums;
|
||||||
|
dialogVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const goodsOfferUpdate = () => {
|
||||||
|
apiOpurchaseclassGoodsOfferUpdate({
|
||||||
|
id: updateInfo.value.id,
|
||||||
|
type: updateInfo.value.type,
|
||||||
|
notes: updateInfo.value.notes, //备注
|
||||||
|
nums: updateInfo.value.nums,
|
||||||
|
}).then((res) => {
|
||||||
|
getLists();
|
||||||
|
dialogVisible.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -0,0 +1,167 @@
|
||||||
|
<template>
|
||||||
|
<el-card>
|
||||||
|
<el-table :data="pager.lists" v-loading="pager.loading" border style="width: 100%; margin-top: 10px">
|
||||||
|
<el-table-column prop="id" label="ID" width="120" />
|
||||||
|
<!-- <el-table-column prop="order_id" label="采购订单id" width="120" /> -->
|
||||||
|
<el-table-column
|
||||||
|
label="商品名称"
|
||||||
|
prop="goods_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="220"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="单位"
|
||||||
|
prop="unit_name"
|
||||||
|
width="80"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="供应商"
|
||||||
|
prop="supplier_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="入库数量"
|
||||||
|
prop="nums"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="100"
|
||||||
|
/>
|
||||||
|
<el-table-column label="报价" prop="price" show-overflow-tooltip />
|
||||||
|
<el-table-column label="物流/送货人" prop="delivery_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="单号/手机" prop="delivery_id" show-overflow-tooltip />
|
||||||
|
<el-table-column label="状态" prop="is_storage" show-overflow-tooltip >
|
||||||
|
<template #default="{ row }" >
|
||||||
|
<el-tag v-if="row.is_storage" type="success">已入库</el-tag>
|
||||||
|
<el-tag v-else type="info">未入库</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作人员" prop="storage_admin_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="备注" prop="notes" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="入库时间"
|
||||||
|
prop="update_time"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column v-if="false" label="操作" fixed="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="row.is_adopt === 1 && row.price > 0"
|
||||||
|
size="small"
|
||||||
|
@click="offerGood(row, 0)"
|
||||||
|
>采纳</el-button
|
||||||
|
>
|
||||||
|
<span v-if="row.is_storage">已入库</span>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
v-else-if="row.is_adopt === 2 && row.price > 0"
|
||||||
|
size="small"
|
||||||
|
@click="offerGood(row, 1)"
|
||||||
|
>入库</el-button
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
v-if="row.is_adopt === 0 && row.price == 0"
|
||||||
|
style="color: #e6a23c"
|
||||||
|
>等待供应商报价</span
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div class="flex mt-4 justify-end">
|
||||||
|
<pagination v-if="pager.lists" v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
<el-dialog v-model="dialogVisible" title="入库" width="600">
|
||||||
|
<el-descriptions class="margin-top" :column="1" border>
|
||||||
|
<el-descriptions-item label="供应商名称">
|
||||||
|
{{ updateInfo.supplier_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="商品名称">
|
||||||
|
{{ updateInfo.goods_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="商品报价">
|
||||||
|
¥ {{ updateInfo.price }} / {{ updateInfo.unit_name }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="应入库数量">
|
||||||
|
{{ updateInfo.q_nums }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="实际入库数量">
|
||||||
|
<el-input-number v-model="updateInfo.nums" :step="1" :min="1" />
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="备注">
|
||||||
|
<el-input
|
||||||
|
v-model="updateInfo.notes"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
></el-input>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="goodsOfferUpdate"> 确认 </el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</el-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="subOrder">
|
||||||
|
import { usePaging } from "@/hooks/usePaging";
|
||||||
|
import {
|
||||||
|
opurchaseclassAllListsApi,
|
||||||
|
apiOpurchaseclassGoodsOfferUpdate,
|
||||||
|
} from "@/api/opurchaseclass";
|
||||||
|
import { useRoute } from "vue-router";
|
||||||
|
|
||||||
|
const route = useRoute();
|
||||||
|
|
||||||
|
const isAdopt = ref("");
|
||||||
|
const queryParams = reactive({
|
||||||
|
is_storage: 1 //入库
|
||||||
|
});
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: opurchaseclassAllListsApi,
|
||||||
|
params: queryParams,
|
||||||
|
});
|
||||||
|
|
||||||
|
getLists();
|
||||||
|
|
||||||
|
const dialogVisible = ref(false);
|
||||||
|
const updateInfo = ref({
|
||||||
|
id: "",
|
||||||
|
type: 0,
|
||||||
|
notes: "", //备注
|
||||||
|
nums: 0, //实际数量
|
||||||
|
q_nums: 0, //应到数量
|
||||||
|
});
|
||||||
|
const offerGood = (row: any, type: number) => {
|
||||||
|
//type:0 采纳,1 入库
|
||||||
|
updateInfo.value = Object.assign(
|
||||||
|
{
|
||||||
|
id: "",
|
||||||
|
type: type,
|
||||||
|
notes: "", //备注
|
||||||
|
nums: 0,
|
||||||
|
},
|
||||||
|
row
|
||||||
|
);
|
||||||
|
if (type == 0) return goodsOfferUpdate(); // 采纳时直接成功, 入库弹窗显示数量
|
||||||
|
updateInfo.value.q_nums = row.nums;
|
||||||
|
dialogVisible.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
const goodsOfferUpdate = () => {
|
||||||
|
apiOpurchaseclassGoodsOfferUpdate({
|
||||||
|
id: updateInfo.value.id,
|
||||||
|
type: updateInfo.value.type,
|
||||||
|
notes: updateInfo.value.notes, //备注
|
||||||
|
nums: updateInfo.value.nums,
|
||||||
|
}).then((res) => {
|
||||||
|
getLists();
|
||||||
|
dialogVisible.value = false;
|
||||||
|
});
|
||||||
|
};
|
||||||
|
</script>
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :async="true" width="60vw" @close="handleClose" :bottom-btn="false">
|
<popup ref="popupRef" :async="true" width="60vw" :title="popupTitle" @close="handleClose" :bottom-btn="false">
|
||||||
<el-descriptions class="margin-top" :title="popupTitle" :column="3" border>
|
<el-button type="warning" @click="onPrint">打印单据</el-button>
|
||||||
|
<el-descriptions class="margin-top mt-4" :column="3" border>
|
||||||
<el-descriptions-item label="所属商户">
|
<el-descriptions-item label="所属商户">
|
||||||
<!-- <material-picker v-model="formData.merchant_info" disabled /> -->
|
<!-- <material-picker v-model="formData.merchant_info" disabled /> -->
|
||||||
{{ formData.merchant_info?.mer_name }}
|
{{ formData.merchant_info?.mer_name }}
|
||||||
|
@ -72,7 +73,7 @@ import Popup from '@/components/popup/index.vue'
|
||||||
import type { PropType } from 'vue'
|
import type { PropType } from 'vue'
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { apiCashierinfoLists } from '@/api/cashierinfo'
|
import { apiCashierinfoLists } from '@/api/cashierinfo'
|
||||||
import { apiCashierclassDetail } from '@/api/cashierclass'
|
import { apiCashierclassDetail, apiCashierclassprints } from '@/api/cashierclass'
|
||||||
defineProps({
|
defineProps({
|
||||||
dictData: {
|
dictData: {
|
||||||
type: Object as PropType<Record<string, any[]>>,
|
type: Object as PropType<Record<string, any[]>>,
|
||||||
|
@ -139,7 +140,11 @@ const handleClose = () => {
|
||||||
emit('close')
|
emit('close')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onPrint = ()=>{
|
||||||
|
apiCashierclassprints({
|
||||||
|
id: formData.value.id
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
|
|
|
@ -1,11 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div>
|
<div>
|
||||||
<el-radio-group
|
<el-radio-group v-model="isAdopt" size="small" @change="changeType">
|
||||||
v-model="isAdopt"
|
|
||||||
size="small"
|
|
||||||
@change="changeType"
|
|
||||||
>
|
|
||||||
<el-radio-button label="全部" value="" />
|
<el-radio-button label="全部" value="" />
|
||||||
<el-radio-button label="未报价" value="0" />
|
<el-radio-button label="未报价" value="0" />
|
||||||
<el-radio-button label="已报价" value="1" />
|
<el-radio-button label="已报价" value="1" />
|
||||||
|
@ -55,6 +51,18 @@
|
||||||
<el-tag v-if="row.is_adopt === 3" type="info">未采纳</el-tag>
|
<el-tag v-if="row.is_adopt === 3" type="info">未采纳</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="物流/送货人"
|
||||||
|
prop="delivery_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="单号/手机"
|
||||||
|
prop="delivery_id"
|
||||||
|
show-overflow-tooltip
|
||||||
|
width="160"
|
||||||
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="更新时间"
|
label="更新时间"
|
||||||
prop="update_time"
|
prop="update_time"
|
||||||
|
@ -73,11 +81,18 @@
|
||||||
<span v-if="row.is_storage">已入库</span>
|
<span v-if="row.is_storage">已入库</span>
|
||||||
<el-button
|
<el-button
|
||||||
type="success"
|
type="success"
|
||||||
v-else-if="row.is_adopt === 2 && row.price > 0"
|
v-else-if="row.is_adopt === 2 && row.price > 0 && row.delivery_name"
|
||||||
size="small"
|
size="small"
|
||||||
@click="offerGood(row, 1)"
|
@click="offerGood(row, 1)"
|
||||||
>入库</el-button
|
>入库</el-button
|
||||||
>
|
>
|
||||||
|
<span
|
||||||
|
v-else-if="
|
||||||
|
row.is_adopt === 2 && row.price > 0 && !row.delivery_name
|
||||||
|
"
|
||||||
|
style="color: #e6a23c"
|
||||||
|
>等待供应商发货</span
|
||||||
|
>
|
||||||
<span
|
<span
|
||||||
v-if="row.is_adopt === 0 && row.price == 0"
|
v-if="row.is_adopt === 0 && row.price == 0"
|
||||||
style="color: #e6a23c"
|
style="color: #e6a23c"
|
||||||
|
@ -104,18 +119,25 @@
|
||||||
{{ updateInfo.q_nums }}
|
{{ updateInfo.q_nums }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="实际入库数量">
|
<el-descriptions-item label="实际入库数量">
|
||||||
<el-input-number v-model="updateInfo.nums" :step="1" :min="1" :max="updateInfo.q_nums"/>
|
<el-input-number
|
||||||
|
v-model="updateInfo.nums"
|
||||||
|
:step="1"
|
||||||
|
:min="1"
|
||||||
|
:max="updateInfo.q_nums"
|
||||||
|
/>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="备注">
|
<el-descriptions-item label="备注">
|
||||||
<el-input v-model="updateInfo.notes" type="textarea" placeholder="请输入备注"></el-input>
|
<el-input
|
||||||
|
v-model="updateInfo.notes"
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入备注"
|
||||||
|
></el-input>
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="goodsOfferUpdate">
|
<el-button type="primary" @click="goodsOfferUpdate"> 确认 </el-button>
|
||||||
确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -137,7 +159,7 @@ const queryParams = reactive({
|
||||||
id: route.query.id,
|
id: route.query.id,
|
||||||
is_adopt: "",
|
is_adopt: "",
|
||||||
is_mer: 2,
|
is_mer: 2,
|
||||||
is_push: 1
|
is_push: 1,
|
||||||
});
|
});
|
||||||
// 分页相关
|
// 分页相关
|
||||||
const { pager, getLists, resetParams, resetPage } = usePaging({
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
@ -150,11 +172,11 @@ defineExpose({
|
||||||
|
|
||||||
const changeType = (e: any) => {
|
const changeType = (e: any) => {
|
||||||
queryParams.is_adopt = isAdopt.value;
|
queryParams.is_adopt = isAdopt.value;
|
||||||
if(isAdopt.value == '全部') queryParams.is_adopt = '';
|
if (isAdopt.value == "全部") queryParams.is_adopt = "";
|
||||||
if(isAdopt.value == '待报价') queryParams.is_adopt = '0';
|
if (isAdopt.value == "待报价") queryParams.is_adopt = "0";
|
||||||
if(isAdopt.value == '已报价') queryParams.is_adopt = '1';
|
if (isAdopt.value == "已报价") queryParams.is_adopt = "1";
|
||||||
if(isAdopt.value == '已采纳') queryParams.is_adopt = '2';
|
if (isAdopt.value == "已采纳") queryParams.is_adopt = "2";
|
||||||
if(isAdopt.value == '未采纳') queryParams.is_adopt = '3';
|
if (isAdopt.value == "未采纳") queryParams.is_adopt = "3";
|
||||||
getLists();
|
getLists();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -163,7 +185,7 @@ const updateInfo = ref({
|
||||||
id: "",
|
id: "",
|
||||||
type: 0,
|
type: 0,
|
||||||
notes: "", //备注
|
notes: "", //备注
|
||||||
nums: 0,//实际数量
|
nums: 0, //实际数量
|
||||||
q_nums: 0, //应到数量
|
q_nums: 0, //应到数量
|
||||||
});
|
});
|
||||||
const offerGood = (row: any, type: number) => {
|
const offerGood = (row: any, type: number) => {
|
||||||
|
@ -177,12 +199,11 @@ const offerGood = (row: any, type: number) => {
|
||||||
},
|
},
|
||||||
row
|
row
|
||||||
);
|
);
|
||||||
if(type==0) return goodsOfferUpdate(); // 采纳时直接成功, 入库弹窗显示数量
|
if (type == 0) return goodsOfferUpdate(); // 采纳时直接成功, 入库弹窗显示数量
|
||||||
updateInfo.value.q_nums = row.need_num;
|
updateInfo.value.q_nums = row.need_num;
|
||||||
dialogVisible.value = true;
|
dialogVisible.value = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
const goodsOfferUpdate = () => {
|
const goodsOfferUpdate = () => {
|
||||||
apiOpurchaseclassGoodsOfferUpdate({
|
apiOpurchaseclassGoodsOfferUpdate({
|
||||||
id: updateInfo.value.id,
|
id: updateInfo.value.id,
|
||||||
|
@ -194,7 +215,4 @@ const goodsOfferUpdate = () => {
|
||||||
dialogVisible.value = false;
|
dialogVisible.value = false;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="收货地址"
|
label="摊贩地址"
|
||||||
prop="user_address"
|
prop="user_address"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue