This commit is contained in:
parent
812df84c2e
commit
77b6386241
|
@ -28,3 +28,7 @@ export function apiWarehouseProductDetail(params: any) {
|
||||||
export function apiWarehouseProductEnter(params: any) {
|
export function apiWarehouseProductEnter(params: any) {
|
||||||
return request.post({ url: '/warehouse_product/warehouseproduct/enter', params })
|
return request.post({ url: '/warehouse_product/warehouseproduct/enter', params })
|
||||||
}
|
}
|
||||||
|
//商品结算
|
||||||
|
export function apiWarehouseProductSettlement(params: any) {
|
||||||
|
return request.post({ url: '/warehouse_product/warehouseproduct/settlement', params })
|
||||||
|
}
|
||||||
|
|
|
@ -172,12 +172,19 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="总库存"
|
label="库存"
|
||||||
prop="total_stock"
|
prop="total_stock"
|
||||||
min-width="100"
|
min-width="100"
|
||||||
show-overflow-tooltip
|
show-overflow-tooltip
|
||||||
>
|
>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="价值"
|
||||||
|
prop="total_price"
|
||||||
|
min-width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="采购总价"
|
label="采购总价"
|
||||||
prop="total_purchase"
|
prop="total_purchase"
|
||||||
|
|
|
@ -142,7 +142,7 @@
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column
|
<!-- <el-table-column
|
||||||
label="会员价"
|
label="会员价"
|
||||||
prop="vip_price"
|
prop="vip_price"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
|
@ -155,7 +155,7 @@
|
||||||
>{{ row.vip_price }}</span
|
>{{ row.vip_price }}</span
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column> -->
|
||||||
<el-table-column
|
<el-table-column
|
||||||
label="终端零售价"
|
label="终端零售价"
|
||||||
prop="price"
|
prop="price"
|
||||||
|
@ -173,8 +173,10 @@
|
||||||
<el-table-column label="商品条码" prop="bar_code" show-overflow-tooltip />
|
<el-table-column label="商品条码" prop="bar_code" show-overflow-tooltip />
|
||||||
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
<el-table-column label="销量" prop="sales" show-overflow-tooltip />
|
||||||
<el-table-column label="售卖库存" prop="stock" show-overflow-tooltip />
|
<el-table-column label="售卖库存" prop="stock" show-overflow-tooltip />
|
||||||
<el-table-column label="兑换库存" prop="swap" show-overflow-tooltip />
|
<!-- <el-table-column label="兑换库存" prop="swap" show-overflow-tooltip /> -->
|
||||||
<el-table-column label="单位" prop="unit_name" show-overflow-tooltip />
|
<el-table-column label="单位" prop="unit_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="价值" prop="total_price" show-overflow-tooltip />
|
||||||
|
|
||||||
<el-table-column label="状态" prop="status">
|
<el-table-column label="状态" prop="status">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-switch
|
<el-switch
|
||||||
|
|
|
@ -49,21 +49,6 @@
|
||||||
:readonly="false"
|
:readonly="false"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="状态" prop="status">
|
|
||||||
<el-radio-group
|
|
||||||
v-model="formData.status"
|
|
||||||
placeholder="请选择状态"
|
|
||||||
:disabled="false"
|
|
||||||
>
|
|
||||||
<el-radio
|
|
||||||
v-for="(item, index) in dictData.show_status"
|
|
||||||
:key="index"
|
|
||||||
:label="parseInt(item.value)"
|
|
||||||
>
|
|
||||||
{{ item.name }}
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
</el-form>
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -48,6 +48,36 @@
|
||||||
<el-table-column label="结算周期" prop="settle_cycle" show-overflow-tooltip />
|
<el-table-column label="结算周期" prop="settle_cycle" show-overflow-tooltip />
|
||||||
<el-table-column label="商户地址" prop="address" show-overflow-tooltip />
|
<el-table-column label="商户地址" prop="address" show-overflow-tooltip />
|
||||||
<el-table-column label="商户备注" prop="mark" show-overflow-tooltip />
|
<el-table-column label="商户备注" prop="mark" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="已结"
|
||||||
|
prop="total_completed_amount"
|
||||||
|
min-width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handleWarehouseProduct(row, 1)"
|
||||||
|
>{{ row.total_completed_amount || 0 }}</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="未结"
|
||||||
|
prop="total_outstanding_amount"
|
||||||
|
min-width="100"
|
||||||
|
show-overflow-tooltip
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handleWarehouseProduct(row, 0)"
|
||||||
|
>{{ row.total_outstanding_amount || 0 }}</el-button
|
||||||
|
>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button
|
<el-button
|
||||||
|
@ -81,6 +111,7 @@
|
||||||
@success="getLists"
|
@success="getLists"
|
||||||
@close="showEdit = false"
|
@close="showEdit = false"
|
||||||
/>
|
/>
|
||||||
|
<warehouseProduct ref="warehouseProductRef"></warehouseProduct>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -91,6 +122,10 @@ import { apiSupplierLists, apiSupplierDelete } from '@/api/supplier'
|
||||||
import { timeFormat } from '@/utils/util'
|
import { timeFormat } from '@/utils/util'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import warehouseProduct from './warehouseProduct.vue'
|
||||||
|
|
||||||
|
const showWarehouseProduct = ref(false)
|
||||||
|
const warehouseProductRef = ref(null)
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
|
@ -109,6 +144,13 @@ const selectData = ref<any[]>([])
|
||||||
const handleSelectionChange = (val: any[]) => {
|
const handleSelectionChange = (val: any[]) => {
|
||||||
selectData.value = val.map(({ id }) => id)
|
selectData.value = val.map(({ id }) => id)
|
||||||
}
|
}
|
||||||
|
// 商品出入库详情
|
||||||
|
const handleWarehouseProduct = async (data: any, type = 1) => {
|
||||||
|
showWarehouseProduct.value = true
|
||||||
|
await nextTick()
|
||||||
|
warehouseProductRef.value?.open()
|
||||||
|
warehouseProductRef.value?.getDetail(data, type)
|
||||||
|
}
|
||||||
|
|
||||||
// 获取字典数据
|
// 获取字典数据
|
||||||
const { dictData } = useDictData('show_status')
|
const { dictData } = useDictData('show_status')
|
||||||
|
|
|
@ -0,0 +1,92 @@
|
||||||
|
<template>
|
||||||
|
<div class="edit-popup">
|
||||||
|
<el-drawer title="结算详情" :size="1000" v-model="isOpen">
|
||||||
|
<div>
|
||||||
|
<div>
|
||||||
|
<el-table :data="pager.lists">
|
||||||
|
<el-table-column label="id" prop="id" show-overflow-tooltip />
|
||||||
|
<el-table-column label="商品图片" prop="image" min-width="80">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-image
|
||||||
|
style="width: 50px; height: 50px"
|
||||||
|
:src="row.image"
|
||||||
|
:preview-teleported="true"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称" prop="store_name" show-overflow-tooltip />
|
||||||
|
<el-table-column label="仓库" prop="warehouse_name" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="供应商"
|
||||||
|
prop="supplier_name"
|
||||||
|
show-overflow-tooltip
|
||||||
|
/>
|
||||||
|
<el-table-column label="供货价" prop="purchase" show-overflow-tooltip />
|
||||||
|
<el-table-column label="数量" prop="nums" show-overflow-tooltip />
|
||||||
|
<el-table-column label="价值" prop="total_price" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
label="操作"
|
||||||
|
width="120"
|
||||||
|
fixed="right"
|
||||||
|
v-if="queryParams.is_pay == 0"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
link
|
||||||
|
@click="handlePay(row)"
|
||||||
|
v-if="row.is_pay == 0"
|
||||||
|
>
|
||||||
|
结算
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div class="flex mt-4 justify-end" v-if="pager.lists.length < pager.count">
|
||||||
|
<pagination v-model="pager" @change="getLists" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-drawer>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup name="storeProductDETAILS">
|
||||||
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
|
import { apiWarehouseProductLists, apiWarehouseProductSettlement } from '@/api/warehouse_product'
|
||||||
|
import type { PropType } from 'vue'
|
||||||
|
|
||||||
|
const emit = defineEmits(['success', 'close'])
|
||||||
|
const isOpen = ref(false)
|
||||||
|
// 查询条件
|
||||||
|
const queryParams = reactive({
|
||||||
|
supplier_id: '',
|
||||||
|
is_pay: 1
|
||||||
|
})
|
||||||
|
const getDetail = async (row: Record<string, any>, type: number) => {
|
||||||
|
queryParams.supplier_id = row.id
|
||||||
|
queryParams.is_pay = type
|
||||||
|
|
||||||
|
getLists()
|
||||||
|
}
|
||||||
|
|
||||||
|
//打开弹窗
|
||||||
|
const open = () => {
|
||||||
|
isOpen.value = true
|
||||||
|
}
|
||||||
|
const handlePay = (row: Record<string, any>) => {
|
||||||
|
apiWarehouseProductSettlement({ id: row.id }).then((res) => {
|
||||||
|
getLists()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 分页相关
|
||||||
|
const { pager, getLists, resetParams, resetPage } = usePaging({
|
||||||
|
fetchFun: apiWarehouseProductLists,
|
||||||
|
params: queryParams
|
||||||
|
})
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open,
|
||||||
|
getDetail
|
||||||
|
})
|
||||||
|
</script>
|
Loading…
Reference in New Issue