This commit is contained in:
parent
c0120cd922
commit
1c3a9588ee
|
@ -23,8 +23,14 @@
|
|||
</el-form-item>
|
||||
</el-form>
|
||||
<div class="mt-4" v-loading="pager.loading">
|
||||
<el-table :data="pager.lists" @selection-change="handleSelectionChange" :height="300">
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table
|
||||
:data="pager.lists"
|
||||
@selection-change="handleSelectionChange"
|
||||
:height="300"
|
||||
:highlight-current-row="highlight_current_row"
|
||||
@current-change="handleCurrentChange"
|
||||
>
|
||||
<el-table-column :type="selection" width="55" />
|
||||
<el-table-column label="ID" prop="id" show-overflow-tooltip />
|
||||
<el-table-column label="门店名称" prop="name" show-overflow-tooltip />
|
||||
<el-table-column label="手机号码" prop="phone" show-overflow-tooltip />
|
||||
|
@ -59,13 +65,20 @@ import { apiSystemStoreLists, apiSystemStoreDelete } from '@/api/system_store'
|
|||
import { timeFormat } from '@/utils/util'
|
||||
import feedback from '@/utils/feedback'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
const props = defineProps<{
|
||||
is_selection: string
|
||||
}>()
|
||||
// 查询条件
|
||||
const queryParams = reactive({
|
||||
name: '',
|
||||
phone: ''
|
||||
})
|
||||
|
||||
const selection = ref('selection')
|
||||
const highlight_current_row = ref(false)
|
||||
if (props.is_selection == 0) {
|
||||
selection.value = ''
|
||||
highlight_current_row.value = true
|
||||
}
|
||||
// 选中数据
|
||||
const selectData = ref<any[]>([])
|
||||
|
||||
|
@ -84,8 +97,11 @@ const { pager, getLists, resetParams, resetPage } = usePaging({
|
|||
})
|
||||
|
||||
getLists()
|
||||
|
||||
const emits = defineEmits(['onBindStore'])
|
||||
|
||||
const handleCurrentChange = (val: any) => {
|
||||
emits('onBindStore', val)
|
||||
}
|
||||
// 绑定用户
|
||||
const bindStore = () => {
|
||||
const list = pager.lists.filter((item) => selectData.value.includes(item.id))
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
</el-form>
|
||||
</div>
|
||||
<el-dialog v-model="showStore" title="选择门店" width="70%">
|
||||
<store-pop @onBindStore="onBindStore"></store-pop>
|
||||
<store-pop @onBindStore="onBindStore" :is_selection="0"></store-pop>
|
||||
</el-dialog>
|
||||
<el-dialog v-model="showProduct" title="选择商品" width="70%">
|
||||
<product-pop
|
||||
|
@ -223,11 +223,8 @@ const handleDelete = (id: number) => {
|
|||
}
|
||||
// 选择门店
|
||||
const onBindStore = (e: any[]) => {
|
||||
e.forEach((item: any) => {
|
||||
if (!storeList.value.find((t: any) => t.id == item.id)) {
|
||||
storeList.value.push(item)
|
||||
}
|
||||
})
|
||||
storeList.value = []
|
||||
storeList.value.push(e)
|
||||
handleStock()
|
||||
showStore.value = false
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</div>
|
||||
<el-button @click="xlsx(formData.id)"> 打印 </el-button>
|
||||
</div>
|
||||
<el-tabs v-model="activeName" class="demo-tabs" type="border-card">
|
||||
<el-tabs v-model="activeName" class="demo-tabs mt-3" type="border-card">
|
||||
<el-tab-pane label="明细" name="second">
|
||||
<div>
|
||||
<div>
|
||||
|
@ -57,6 +57,18 @@
|
|||
prop="total_price"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['warehouse_product.warehouse_product/delete']"
|
||||
type="danger"
|
||||
link
|
||||
@click="handleDeletes(row.id)"
|
||||
>
|
||||
删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end" v-if="pager.lists.length < pager.count">
|
||||
|
@ -65,17 +77,38 @@
|
|||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-dialog v-model="dialogShop" title="设置采购" width="600">
|
||||
<el-form ref="formRef" :model="updateInfo" label-width="90px">
|
||||
<el-form-item label="采购数量" prop="buyer_nums">
|
||||
<el-input
|
||||
v-model="updateInfo.buyer_nums"
|
||||
clearable
|
||||
placeholder="请输入采购数量"
|
||||
:readonly="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogShop = false">取消</el-button>
|
||||
<el-button type="primary" @click="goodsOfferUpdate"> 确认 </el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</el-drawer>
|
||||
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="storeOrderDETAILS">
|
||||
import { ElMessage, type FormInstance } from 'element-plus'
|
||||
import Popup from '@/components/popup/index.vue'
|
||||
import { apiWarehouseProductLists } from '@/api/warehouse_product'
|
||||
import { apiWarehouseProductLists, apiWarehouseProductDelete } from '@/api/warehouse_product'
|
||||
import { apiWarehouseOrderRentryExport, apiWarehouseOrderExport } from '@/api/warehouse_order'
|
||||
import type { PropType } from 'vue'
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
import { useRoute } from 'vue-router'
|
||||
import feedback from '@/utils/feedback'
|
||||
|
||||
const route = useRoute()
|
||||
|
||||
defineProps({
|
||||
|
@ -87,8 +120,12 @@ defineProps({
|
|||
|
||||
const emit = defineEmits(['success', 'close'])
|
||||
const showDialog = ref(false)
|
||||
const dialogShop = ref(false)
|
||||
const activeName = ref('second')
|
||||
|
||||
const updateInfo=ref({
|
||||
|
||||
})
|
||||
// 表单数据
|
||||
const formData = ref({
|
||||
id: '',
|
||||
|
@ -103,6 +140,9 @@ const queryParams = reactive({
|
|||
oid: '',
|
||||
pay_type: ''
|
||||
})
|
||||
const goodsOfferUpdate(){
|
||||
console.log(111)
|
||||
}
|
||||
// 获取详情
|
||||
const setFormData = async (data: Record<any, any>) => {
|
||||
formData.value = { ...data }
|
||||
|
@ -131,6 +171,12 @@ const xlsx = (id) => {
|
|||
})
|
||||
}
|
||||
}
|
||||
// 删除
|
||||
const handleDeletes = async (id: number | any[]) => {
|
||||
await feedback.confirm('确定要删除?')
|
||||
await apiWarehouseProductDelete({ id })
|
||||
getLists()
|
||||
}
|
||||
//打开弹窗
|
||||
const open = () => {
|
||||
showDialog.value = true
|
||||
|
|
|
@ -155,7 +155,7 @@
|
|||
<span style="color: red">{{ row.mark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<!-- <el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['warehouse_product.warehouse_product/edit']"
|
||||
|
@ -184,7 +184,7 @@
|
|||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
|
|
|
@ -113,7 +113,7 @@
|
|||
<span style="color: red">{{ row.mark }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="120" fixed="right">
|
||||
<!-- <el-table-column label="操作" width="120" fixed="right">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-perms="['warehouse_product.warehouse_product/edit']"
|
||||
|
@ -142,7 +142,7 @@
|
|||
确认
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
</div>
|
||||
<div class="flex mt-4 justify-end">
|
||||
|
|
Loading…
Reference in New Issue