|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<el-form :model="searchForm" label-width="0" inline>
|
|
|
|
<el-form-item>
|
|
|
|
<el-input v-model="searchForm.signId" placeholder="成交单号" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-input v-model="searchForm.name" placeholder="线索名称" clearable />
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-select v-model="searchForm.signUser" placeholder="登记人" clearable filterable>
|
|
|
|
<el-option
|
|
|
|
v-for="item in userOptions"
|
|
|
|
:key="item.id"
|
|
|
|
:label="item.nickname"
|
|
|
|
:value="item.id"
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-date-picker
|
|
|
|
v-model="searchForm.dealDate"
|
|
|
|
type="daterange"
|
|
|
|
format="YYYY-MM-DD"
|
|
|
|
value-format="YYYY-MM-DD"
|
|
|
|
range-separator="-"
|
|
|
|
start-placeholder="登记日期"
|
|
|
|
end-placeholder="登记日期"
|
|
|
|
/>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-select
|
|
|
|
v-model="searchForm.signProduct"
|
|
|
|
placeholder="选择成交产品"
|
|
|
|
filterable
|
|
|
|
@change="searchForm.specsId = undefined"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in prodOptions"
|
|
|
|
:key="item.productId"
|
|
|
|
:label="item.productName"
|
|
|
|
:value="item.productId"
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-select
|
|
|
|
v-model="searchForm.specsId"
|
|
|
|
placeholder="选择规格"
|
|
|
|
filterable
|
|
|
|
:disabled="!searchForm.signProduct"
|
|
|
|
>
|
|
|
|
<el-option
|
|
|
|
v-for="item in specsOptions(searchForm.signProduct)"
|
|
|
|
:key="item.specsId"
|
|
|
|
:label="item.specsName"
|
|
|
|
:value="item.specsId"
|
|
|
|
/>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item>
|
|
|
|
<el-button @click="handleSearch">查询</el-button>
|
|
|
|
<el-button @click="handleReset">重置</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<el-table v-loading="loading" :data="tableList" border>
|
|
|
|
<el-table-column prop="signId" label="成交单号" min-width="150px" />
|
|
|
|
<el-table-column prop="name" label="线索名称" min-width="200px" />
|
|
|
|
<el-table-column prop="phone" label="联系方式" min-width="150px" />
|
|
|
|
<el-table-column prop="signUserName" label="登记人" min-width="90" />
|
|
|
|
<el-table-column prop="dealDate" label="登记时间" min-width="150px" />
|
|
|
|
<el-table-column prop="" label="成交产品" min-width="150px" />
|
|
|
|
<el-table-column prop="" label="产品规格" min-width="150px" />
|
|
|
|
<el-table-column prop="" label="发货时间" min-width="150px" />
|
|
|
|
<el-table-column prop="" label="发货仓库" min-width="100px" />
|
|
|
|
<el-table-column prop="" label="备注" min-width="100px" />
|
|
|
|
<el-table-column label="操作" width="150px" fixed="right">
|
|
|
|
<template #default="{ row }">
|
|
|
|
<el-button type="primary" style="padding: 0" text @click="handleDetail(row.id)">
|
|
|
|
详情
|
|
|
|
</el-button>
|
|
|
|
</template>
|
|
|
|
</el-table-column>
|
|
|
|
</el-table>
|
|
|
|
<Pagination
|
|
|
|
v-model:limit="searchForm.pageSize"
|
|
|
|
v-model:page="searchForm.pageNo"
|
|
|
|
:total="total"
|
|
|
|
@pagination="getList"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup name="Delivery">
|
|
|
|
import { getSimpleUserList as getUserOption } from '@/api/system/user'
|
|
|
|
import { getSimpleProductList } from '@/api/mall/product'
|
|
|
|
// const message = useMessage() // 消息弹窗
|
|
|
|
|
|
|
|
const searchForm = ref({
|
|
|
|
signId: undefined,
|
|
|
|
name: undefined,
|
|
|
|
dealDate: [],
|
|
|
|
signUser: undefined,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 20
|
|
|
|
})
|
|
|
|
|
|
|
|
const userOptions = ref([])
|
|
|
|
|
|
|
|
const tableList = ref([])
|
|
|
|
const total = ref(0)
|
|
|
|
|
|
|
|
function handleSearch() {
|
|
|
|
searchForm.value.pageNo = 1
|
|
|
|
getList()
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleReset() {
|
|
|
|
searchForm.value = {
|
|
|
|
signId: undefined,
|
|
|
|
name: undefined,
|
|
|
|
dealDate: [],
|
|
|
|
signUser: undefined,
|
|
|
|
pageNo: 1,
|
|
|
|
pageSize: 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
const loading = ref(false)
|
|
|
|
async function getList() {
|
|
|
|
loading.value = true
|
|
|
|
try {
|
|
|
|
tableList.value = []
|
|
|
|
// const data = await FeebackApi.getPaymentPage(searchForm.value)
|
|
|
|
// tableList.value = data.list
|
|
|
|
// total.value = data.total
|
|
|
|
} finally {
|
|
|
|
loading.value = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function handleDetail(id) {
|
|
|
|
console.log(id)
|
|
|
|
}
|
|
|
|
|
|
|
|
const prodOptions = ref([])
|
|
|
|
|
|
|
|
const specsOptions = computed({
|
|
|
|
get() {
|
|
|
|
return (prodId) => {
|
|
|
|
if (prodId) {
|
|
|
|
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
|
|
|
|
}
|
|
|
|
return []
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
function getOptions() {
|
|
|
|
getUserOption().then((data) => {
|
|
|
|
userOptions.value = data
|
|
|
|
})
|
|
|
|
// 产品
|
|
|
|
getSimpleProductList().then((data) => {
|
|
|
|
prodOptions.value = data
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
getOptions()
|
|
|
|
handleSearch()
|
|
|
|
})
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped></style>
|