sc
This commit is contained in:
127
src/views/Clue/Order/Comp/DialogOrderProduct.vue
Normal file
127
src/views/Clue/Order/Comp/DialogOrderProduct.vue
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<template>
|
||||||
|
<Dialog title="成交商品" v-model="show" width="80%">
|
||||||
|
<el-table :data="orderProductList" border stripe>
|
||||||
|
<el-table-column prop="productName" label="成交产品" />
|
||||||
|
<el-table-column prop="specsName" label="产品规格" />
|
||||||
|
<el-table-column prop="signNum" label="成交数量" />
|
||||||
|
<el-table-column prop="remark" label="成交备注" />
|
||||||
|
<el-table-column label="生产状态" width="160px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-switch
|
||||||
|
v-model="scope.row.isProduced"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
active-text="已生产"
|
||||||
|
inactive-text="待生产"
|
||||||
|
v-if="checkPermi(['clue:order:update-produce'])"
|
||||||
|
size="small"
|
||||||
|
@change="handleChangeProdoce(scope.row)"
|
||||||
|
/>
|
||||||
|
<div v-else>{{ scope.row.isProducedDesc }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发货状态" prop="sendState" width="90px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-tag :type="scope.row.sendState == '待发货' ? 'danger' : 'success'" size="small">
|
||||||
|
{{ scope.row.sendState }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="发货备注" width="100px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-popover
|
||||||
|
placement="top"
|
||||||
|
width="500px"
|
||||||
|
trigger="click"
|
||||||
|
v-if="scope.row.warehouseName && scope.row.sendRemark"
|
||||||
|
>
|
||||||
|
<template #reference>
|
||||||
|
<el-button type="primary" style="padding: 0" text>点击查看</el-button>
|
||||||
|
</template>
|
||||||
|
<div v-dompurify-html="scope.row.sendRemark"></div>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="100px">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="mr-10px"
|
||||||
|
link
|
||||||
|
:disabled="scope.row.sendState == '已发货'"
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
|
v-hasPermi="['clue:order:send']"
|
||||||
|
@click="handleDelivery(scope.row)"
|
||||||
|
>
|
||||||
|
发货
|
||||||
|
</el-button>
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
link
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
|
v-hasPermi="['clue:order:remove-product']"
|
||||||
|
@click="handleRemoveProduct(scope.row)"
|
||||||
|
>
|
||||||
|
删除
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</Dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import * as OrderApi from '@/api/clue/sign'
|
||||||
|
import { checkPermi } from '@/utils/permission'
|
||||||
|
|
||||||
|
const show = ref(false)
|
||||||
|
const orderProductList = ref([])
|
||||||
|
function open(orderId) {
|
||||||
|
try {
|
||||||
|
show.value = true
|
||||||
|
getFields()
|
||||||
|
OrderApi.getSign(orderId).then((data) => {
|
||||||
|
orderProductList.value = data.signProducts || []
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.log(error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const orderSchema = ref([])
|
||||||
|
function getFields() {
|
||||||
|
getOrderFieldList().then((data) => {
|
||||||
|
const list = useCrudSchemas(data).allSchemas.detailSchema
|
||||||
|
const arr = []
|
||||||
|
list.forEach((it) => {
|
||||||
|
if (it.label.includes('日期')) {
|
||||||
|
it.dateFormat = 'YYYY-MM-DD'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (it.field == 'receivedMoney') {
|
||||||
|
checkPermi(['clue:order:return-list']) && arr.push(it)
|
||||||
|
} else {
|
||||||
|
arr.push(it)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (arr.filter((item) => item.span != 2).length % 2 != 0) {
|
||||||
|
arr.push({})
|
||||||
|
}
|
||||||
|
orderSchema.value = [
|
||||||
|
...arr,
|
||||||
|
{
|
||||||
|
field: 'remark',
|
||||||
|
label: '备注',
|
||||||
|
span: 2,
|
||||||
|
isEditor: true
|
||||||
|
}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({
|
||||||
|
open
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -2,46 +2,6 @@
|
|||||||
<div>
|
<div>
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<div>
|
<div>
|
||||||
<el-form
|
|
||||||
:model="searchForm"
|
|
||||||
ref="moreSearchRef"
|
|
||||||
inline
|
|
||||||
label-width="0"
|
|
||||||
style="display: inline"
|
|
||||||
>
|
|
||||||
<el-form-item style="margin-bottom: 10px">
|
|
||||||
<el-select
|
|
||||||
v-model="searchForm.signProduct"
|
|
||||||
placeholder="选择成交产品"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
@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 style="margin-bottom: 10px">
|
|
||||||
<el-select
|
|
||||||
v-model="searchForm.specsId"
|
|
||||||
placeholder="选择规格"
|
|
||||||
filterable
|
|
||||||
clearable
|
|
||||||
: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>
|
|
||||||
<Search
|
<Search
|
||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
ref="searchRef"
|
ref="searchRef"
|
||||||
@@ -67,8 +27,8 @@
|
|||||||
v-if="!loading"
|
v-if="!loading"
|
||||||
class="mt-10px"
|
class="mt-10px"
|
||||||
v-model:tableObject="tableObject"
|
v-model:tableObject="tableObject"
|
||||||
:tableColumns="allSchemas.tableColumns"
|
:tableColumns="allSchemas.tableColumns.filter((it) => it.paramLevel == 1)"
|
||||||
rowkey="signId"
|
rowkey="signOrderId"
|
||||||
:expandRowKeys="expendRows"
|
:expandRowKeys="expendRows"
|
||||||
@get-list="getTableList"
|
@get-list="getTableList"
|
||||||
@get-checked-columns="getCheckedColumns"
|
@get-checked-columns="getCheckedColumns"
|
||||||
@@ -86,21 +46,39 @@
|
|||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
> -->
|
> -->
|
||||||
<el-table
|
<el-table
|
||||||
:data="row.signProducts"
|
:data="row.childrenOrder"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
stripe
|
stripe
|
||||||
style="width: 90%; margin: 0 auto"
|
style="width: 90%; margin: 0 auto"
|
||||||
>
|
>
|
||||||
<el-table-column prop="" label="子订单号" />
|
<el-table-column prop="signId" label="子订单号" />
|
||||||
<el-table-column prop="" label="登记人" width="120px" />
|
<el-table-column prop="createUserName" label="登记人" width="120px" />
|
||||||
<el-table-column prop="" label="成交日期" width="120px" />
|
<el-table-column prop="dealDate" label="成交日期" width="120px" />
|
||||||
<el-table-column prop="" label="成交价" width="120px" />
|
<el-table-column prop="signPrice" label="成交价" width="120px" />
|
||||||
<el-table-column prop="" label="支付金额" width="120px" />
|
<el-table-column prop="payAmount" label="支付金额" width="120px" />
|
||||||
<el-table-column prop="" label="已到账金额" width="120px" />
|
<el-table-column prop="receivedMoney" label="已到账金额" width="120px" />
|
||||||
<el-table-column prop="" label="提成状态" width="120px" />
|
<el-table-column prop="isCommissioned" label="提成状态" width="120px" />
|
||||||
<el-table-column prop="" label="备注" />
|
<el-table-column prop="remark" label="备注">
|
||||||
<el-table-column label="操作" width="200px" fixed="right">
|
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
|
<el-popover trigger="hover" placement="top">
|
||||||
|
<div v-dompurify-html="scope.row.remark"></div>
|
||||||
|
<template #reference>
|
||||||
|
<el-button type="primary" link>查看</el-button>
|
||||||
|
</template>
|
||||||
|
</el-popover>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="260px" fixed="right">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
class="mr-10px"
|
||||||
|
link
|
||||||
|
style="padding: 0; margin-left: 0"
|
||||||
|
@click="openProduct(scope.row)"
|
||||||
|
>
|
||||||
|
成交商品
|
||||||
|
</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
class="mr-10px"
|
class="mr-10px"
|
||||||
@@ -259,6 +237,7 @@
|
|||||||
<DialogExtraFee ref="extraFeeDialog" />
|
<DialogExtraFee ref="extraFeeDialog" />
|
||||||
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
<DialogDelivery ref="deliveryDialog" @success="getTableList" />
|
||||||
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
|
<DialogAddProduct ref="addProductDialog" @success="getTableList" />
|
||||||
|
<DialogOrderProduct ref="orderProductDialog" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -266,7 +245,6 @@
|
|||||||
import { getSimpleFieldList } from '@/api/clue/orderField'
|
import { getSimpleFieldList } from '@/api/clue/orderField'
|
||||||
import * as SignApi from '@/api/clue/sign'
|
import * as SignApi from '@/api/clue/sign'
|
||||||
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
import { getSimpleUserList as getUserOption, getAllUserList } from '@/api/system/user'
|
||||||
import { getSimpleProductList } from '@/api/mall/product'
|
|
||||||
|
|
||||||
import DialogOrder from './DialogOrder.vue'
|
import DialogOrder from './DialogOrder.vue'
|
||||||
import DialogFeeback from './DialogFeeback.vue'
|
import DialogFeeback from './DialogFeeback.vue'
|
||||||
@@ -274,6 +252,7 @@ import DialogAfterSale from './DialogAfterSale.vue'
|
|||||||
import DialogExtraFee from './DialogExtraPay.vue'
|
import DialogExtraFee from './DialogExtraPay.vue'
|
||||||
import DialogDelivery from './DialogDelivery.vue'
|
import DialogDelivery from './DialogDelivery.vue'
|
||||||
import DialogAddProduct from './DialogAddProduct.vue'
|
import DialogAddProduct from './DialogAddProduct.vue'
|
||||||
|
import DialogOrderProduct from './DialogOrderProduct.vue'
|
||||||
|
|
||||||
import { removeNullField } from '@/utils'
|
import { removeNullField } from '@/utils'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
@@ -293,18 +272,6 @@ const allSchemas = ref({})
|
|||||||
|
|
||||||
const orderDetailDialog = ref()
|
const orderDetailDialog = ref()
|
||||||
const searchRef = ref()
|
const searchRef = ref()
|
||||||
const prodOptions = ref([])
|
|
||||||
|
|
||||||
const specsOptions = computed({
|
|
||||||
get() {
|
|
||||||
return (prodId) => {
|
|
||||||
if (prodId) {
|
|
||||||
return prodOptions.value.find((it) => it.productId == prodId).productSpecList
|
|
||||||
}
|
|
||||||
return []
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const searchForm = ref({
|
const searchForm = ref({
|
||||||
signProduct: undefined
|
signProduct: undefined
|
||||||
@@ -351,6 +318,7 @@ async function getCurdSchemas() {
|
|||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
const data = await getSimpleFieldList()
|
const data = await getSimpleFieldList()
|
||||||
|
// const mainOrderFields = data.filter((it) => it.paramLevel == 1)
|
||||||
data.forEach((elem) => {
|
data.forEach((elem) => {
|
||||||
if (['createUser'].includes(elem.field)) {
|
if (['createUser'].includes(elem.field)) {
|
||||||
elem.search.options = userOptions.value
|
elem.search.options = userOptions.value
|
||||||
@@ -371,7 +339,8 @@ const showColumns = ref([])
|
|||||||
|
|
||||||
// 初始化表格
|
// 初始化表格
|
||||||
function getCheckedColumns(list) {
|
function getCheckedColumns(list) {
|
||||||
showColumns.value = list && list.length ? list : allSchemas.value.tableColumns
|
showColumns.value =
|
||||||
|
list && list.length ? list : allSchemas.value.tableColumns.filter((it) => it.paramLevel == 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 详情
|
// 详情
|
||||||
@@ -412,11 +381,6 @@ function handleAddFee(row) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function getOptions() {
|
async function getOptions() {
|
||||||
// 产品
|
|
||||||
getSimpleProductList().then((data) => {
|
|
||||||
prodOptions.value = data
|
|
||||||
})
|
|
||||||
|
|
||||||
userOptions.value = await getUserOption()
|
userOptions.value = await getUserOption()
|
||||||
allUserOptions.value = await getAllUserList()
|
allUserOptions.value = await getAllUserList()
|
||||||
getCurdSchemas()
|
getCurdSchemas()
|
||||||
@@ -426,11 +390,6 @@ const deliveryDialog = ref()
|
|||||||
// deliveryDialog.value.open(row)
|
// deliveryDialog.value.open(row)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// const addProductDialog = ref()
|
|
||||||
// function handleAddProduct(row) {
|
|
||||||
// addProductDialog.value.open(row.signId, prodOptions.value)
|
|
||||||
// }
|
|
||||||
|
|
||||||
const batchIds = ref([])
|
const batchIds = ref([])
|
||||||
function handleSelectionChange(val) {
|
function handleSelectionChange(val) {
|
||||||
batchIds.value = val.map((it) => it.signId)
|
batchIds.value = val.map((it) => it.signId)
|
||||||
@@ -487,6 +446,11 @@ function handleBatchUpdateInstall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const orderProductDialog = ref()
|
||||||
|
function openProduct(row) {
|
||||||
|
orderProductDialog.value.open(row.orderId)
|
||||||
|
}
|
||||||
|
|
||||||
// async function handleRemoveProduct(row) {
|
// async function handleRemoveProduct(row) {
|
||||||
// try {
|
// try {
|
||||||
// // 修改状态的二次确认
|
// // 修改状态的二次确认
|
||||||
@@ -518,7 +482,7 @@ function handleBatchUpdateInstall() {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// const expendRows = ref([])
|
const expendRows = ref([])
|
||||||
// async function onDragEnd(ev) {
|
// async function onDragEnd(ev) {
|
||||||
// try {
|
// try {
|
||||||
// expendRows.value = [ev.data.signId]
|
// expendRows.value = [ev.data.signId]
|
||||||
|
|||||||
@@ -3,339 +3,367 @@
|
|||||||
<template #btn>
|
<template #btn>
|
||||||
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
|
<el-button class="mr-20px" type="primary" size="small" @click="handleSave">保存</el-button>
|
||||||
</template>
|
</template>
|
||||||
<Descriptions
|
<div v-if="showMergeOrder">
|
||||||
:title="`线索信息-${info.name}`"
|
<div style="color: red">
|
||||||
:data="info"
|
查询到该客户已有成交订单,请选择订单进行合并,不选择则生成独立订单
|
||||||
:schema="showSchema"
|
</div>
|
||||||
:columns="2"
|
<el-radio-group v-model="mergeOrderId" style="width: 100%">
|
||||||
labelWidth="130px"
|
<el-radio
|
||||||
:defaultShow="false"
|
v-for="item in mergeOrderList"
|
||||||
/>
|
:key="item.signOrderId"
|
||||||
<el-form :model="form" ref="formRef" :rules="rules" label-width="100px" class="mt-20px">
|
:label="item.signOrderId"
|
||||||
<el-row>
|
:value="item.signOrderId"
|
||||||
<!-- 驾校招生模式 -->
|
style="width: 100%; margin: 15px 0"
|
||||||
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="成交驾校" prop="signSchool">
|
|
||||||
<el-select
|
|
||||||
v-model="form.signSchool"
|
|
||||||
placeholder="选择驾校"
|
|
||||||
filterable
|
|
||||||
@change="changeSchool"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in schoolOptions"
|
|
||||||
:key="item.schoolId"
|
|
||||||
:label="item.schoolName"
|
|
||||||
:value="item.schoolId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="成交场地" prop="signPlace">
|
|
||||||
<el-select
|
|
||||||
v-model="form.signPlace"
|
|
||||||
placeholder="选择场地"
|
|
||||||
filterable
|
|
||||||
:disabled="!form.signSchool"
|
|
||||||
@change="changePlace"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in placeOptions"
|
|
||||||
:key="item.placeId"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.placeId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="成交班型" prop="signClass">
|
|
||||||
<el-select
|
|
||||||
v-model="form.signClass"
|
|
||||||
:disabled="!form.signPlace"
|
|
||||||
placeholder="选择班型"
|
|
||||||
filterable
|
|
||||||
@change="changeClass"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in classOptions"
|
|
||||||
:key="item.typeId"
|
|
||||||
:label="item.typeName"
|
|
||||||
:value="item.typeId"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="成交日期" prop="dealDate">
|
|
||||||
<el-date-picker
|
|
||||||
v-model="form.dealDate"
|
|
||||||
type="date"
|
|
||||||
format="YYYY-MM-DD"
|
|
||||||
value-format="YYYY-MM-DD"
|
|
||||||
placeholder="选择日期时间"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="成交价" prop="signPrice">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.signPrice"
|
|
||||||
:min="0"
|
|
||||||
style="width: 100%"
|
|
||||||
:controls="false"
|
|
||||||
@change="signPriceChange"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="是否全款">
|
|
||||||
<el-radio-group v-model="form.isPayoff">
|
|
||||||
<el-radio :label="true" :value="true"> 全款 </el-radio>
|
|
||||||
<el-radio :label="false" :value="false"> 非全款 </el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="支付金额" prop="payAmount">
|
|
||||||
<el-input-number
|
|
||||||
v-model="form.payAmount"
|
|
||||||
:min="0"
|
|
||||||
style="width: 100%"
|
|
||||||
:controls="false"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="公司收款" prop="isCompanyReceipts">
|
|
||||||
<el-radio-group v-model="form.isCompanyReceipts">
|
|
||||||
<el-radio :label="true" :value="true">是</el-radio>
|
|
||||||
<el-radio :label="false" :value="false">否</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
|
||||||
<el-col :span="8" :offset="0" v-if="form.signClass">
|
|
||||||
<el-form-item label="利润">
|
|
||||||
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="接待人" prop="receiver">
|
|
||||||
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
|
|
||||||
<el-option
|
|
||||||
v-for="item in allUserOptions"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.nickname"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<el-col :span="8" :offset="0">
|
|
||||||
<el-form-item label="安装状态" prop="installStatus">
|
|
||||||
<el-select v-model="form.installStatus">
|
|
||||||
<el-option label="待安装" :value="1" />
|
|
||||||
<el-option label="已安装" :value="2" />
|
|
||||||
<el-option label="无需安装" :value="3" />
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
</template>
|
|
||||||
<el-col
|
|
||||||
:span="fieldItem.component == 'Editor' ? 24 : 8"
|
|
||||||
:offset="0"
|
|
||||||
v-for="fieldItem in diyFieldList"
|
|
||||||
:key="fieldItem.clueParamId"
|
|
||||||
>
|
>
|
||||||
<el-form-item :label="fieldItem.label" :prop="fieldItem.field">
|
<div class="flex justify-between">
|
||||||
<component :is="componentMap[fieldItem.component]" v-model="form[fieldItem.field]">
|
<div class="mr-20px">订单编号:{{ item.signOrderId }}</div>
|
||||||
<template v-if="fieldItem.component == 'Select'">
|
<div class="mr-20px">登记时间:{{ item.dealDate }}</div>
|
||||||
<el-option
|
<div>线索来源:{{ item.source }}</div>
|
||||||
v-for="item in fieldItem.options"
|
</div>
|
||||||
:key="item.id"
|
</el-radio>
|
||||||
:label="item.name"
|
</el-radio-group>
|
||||||
:value="item.id"
|
</div>
|
||||||
/>
|
<div v-else>
|
||||||
</template>
|
<Descriptions
|
||||||
<template v-else-if="fieldItem.component == 'Radio'">
|
:title="`线索信息-${info.name}`"
|
||||||
<el-radio
|
:data="info"
|
||||||
v-for="item in fieldItem.options"
|
:schema="showSchema"
|
||||||
:key="item.id"
|
:columns="2"
|
||||||
:label="item.id"
|
labelWidth="130px"
|
||||||
:value="item.id"
|
:defaultShow="false"
|
||||||
>
|
/>
|
||||||
{{ item.name }}
|
<el-form :model="form" ref="formRef" :rules="rules" label-width="100px" class="mt-20px">
|
||||||
</el-radio>
|
<el-row>
|
||||||
</template>
|
<!-- 驾校招生模式 -->
|
||||||
<template v-else-if="fieldItem.component == 'Checkbox'">
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
<el-checkbox
|
<el-col :span="8" :offset="0">
|
||||||
v-for="item in fieldItem.options"
|
<el-form-item label="成交驾校" prop="signSchool">
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</component>
|
|
||||||
</el-form-item>
|
|
||||||
</el-col>
|
|
||||||
<!-- 进销存模式 -->
|
|
||||||
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
|
|
||||||
<el-divider direction="horizontal" content-position="left">
|
|
||||||
成交产品<span v-if="prodTotalPrice">,应收:{{ prodTotalPrice }}</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-button
|
|
||||||
class="mb-5px"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="
|
|
||||||
form.signProducts.push({ productId: undefined, specsId: undefined, signNum: 0 })
|
|
||||||
"
|
|
||||||
>
|
|
||||||
添加成交产品
|
|
||||||
</el-button>
|
|
||||||
<el-table :data="form.signProducts" border size="small">
|
|
||||||
<el-table-column type="index" width="50" />
|
|
||||||
<el-table-column prop="productId" label="产品">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="row.productId"
|
v-model="form.signSchool"
|
||||||
placeholder="选择成交产品"
|
placeholder="选择驾校"
|
||||||
filterable
|
filterable
|
||||||
@change="row.specsId = undefined"
|
@change="changeSchool"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in prodOptions"
|
v-for="item in schoolOptions"
|
||||||
:key="item.productId"
|
:key="item.schoolId"
|
||||||
:label="item.productName"
|
:label="item.schoolName"
|
||||||
:value="item.productId"
|
:value="item.schoolId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</el-col>
|
||||||
<el-table-column prop="specsId" label="规格">
|
<el-col :span="8" :offset="0">
|
||||||
<template #default="{ row }">
|
<el-form-item label="成交场地" prop="signPlace">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="row.specsId"
|
v-model="form.signPlace"
|
||||||
placeholder="选择规格"
|
placeholder="选择场地"
|
||||||
filterable
|
filterable
|
||||||
:disabled="!row.productId"
|
:disabled="!form.signSchool"
|
||||||
@change="
|
@change="changePlace"
|
||||||
row.price = specsOptions(row.productId).find(
|
|
||||||
(it) => it.specsId == row.specsId
|
|
||||||
).price
|
|
||||||
"
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in specsOptions(row.productId)"
|
v-for="item in placeOptions"
|
||||||
:key="item.specsId"
|
:key="item.placeId"
|
||||||
:label="item.specsName"
|
:label="item.name"
|
||||||
:value="item.specsId"
|
:value="item.placeId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</el-col>
|
||||||
<el-table-column prop="price" label="销售单价" width="100px" />
|
<el-col :span="8" :offset="0">
|
||||||
<el-table-column prop="signNum" label="成交数量" width="100px">
|
<el-form-item label="成交班型" prop="signClass">
|
||||||
<template #default="{ row }">
|
|
||||||
<el-input-number
|
|
||||||
v-model="row.signNum"
|
|
||||||
:min="1"
|
|
||||||
size="small"
|
|
||||||
:controls="false"
|
|
||||||
style="width: 100%"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="remark" label="备注">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column label="操作" width="60px">
|
|
||||||
<template #default="{ $index }">
|
|
||||||
<Icon
|
|
||||||
icon="ep:remove-filled"
|
|
||||||
class="text-red-500"
|
|
||||||
@click="handleRemove('signProducts', $index)"
|
|
||||||
/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</el-col>
|
|
||||||
<el-col :span="24" :offset="0" class="mb-18px">
|
|
||||||
<el-divider direction="horizontal" content-position="left">
|
|
||||||
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
|
||||||
</el-divider>
|
|
||||||
<el-button
|
|
||||||
class="mb-5px"
|
|
||||||
type="primary"
|
|
||||||
size="small"
|
|
||||||
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
|
|
||||||
>
|
|
||||||
添加其他费用
|
|
||||||
</el-button>
|
|
||||||
<el-table :data="form.extraPay" border size="small">
|
|
||||||
<el-table-column type="index" width="50" />
|
|
||||||
<el-table-column prop="extraPayType" label="费用类型" width="200px">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-select
|
<el-select
|
||||||
v-model="row.extraPayType"
|
v-model="form.signClass"
|
||||||
size="small"
|
:disabled="!form.signPlace"
|
||||||
placeholder="其他费用类型"
|
placeholder="选择班型"
|
||||||
filterable
|
filterable
|
||||||
|
@change="changeClass"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in extraPayOptions"
|
v-for="item in classOptions"
|
||||||
:key="item.value"
|
:key="item.typeId"
|
||||||
:label="item.label"
|
:label="item.typeName"
|
||||||
:value="item.value"
|
:value="item.typeId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</template>
|
</el-form-item>
|
||||||
</el-table-column>
|
</el-col>
|
||||||
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
|
</template>
|
||||||
<template #default="{ row }">
|
<el-col :span="8" :offset="0">
|
||||||
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" />
|
<el-form-item label="成交日期" prop="dealDate">
|
||||||
</template>
|
<el-date-picker
|
||||||
</el-table-column>
|
v-model="form.dealDate"
|
||||||
<el-table-column prop="remark" label="备注">
|
type="date"
|
||||||
<template #default="{ row }">
|
format="YYYY-MM-DD"
|
||||||
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
|
value-format="YYYY-MM-DD"
|
||||||
</template>
|
placeholder="选择日期时间"
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column label="操作" width="60px">
|
/>
|
||||||
<template #default="{ $index }">
|
</el-form-item>
|
||||||
<Icon
|
</el-col>
|
||||||
icon="ep:remove-filled"
|
<el-col :span="8" :offset="0">
|
||||||
class="text-red-500"
|
<el-form-item label="成交价" prop="signPrice">
|
||||||
@click="handleRemove('extraPay', $index)"
|
<el-input-number
|
||||||
/>
|
v-model="form.signPrice"
|
||||||
</template>
|
:min="0"
|
||||||
</el-table-column>
|
style="width: 100%"
|
||||||
</el-table>
|
:controls="false"
|
||||||
<el-divider
|
@change="signPriceChange"
|
||||||
v-if="prodTotalPrice + extraTotalPrice"
|
/>
|
||||||
direction="horizontal"
|
</el-form-item>
|
||||||
content-position="left"
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="是否全款">
|
||||||
|
<el-radio-group v-model="form.isPayoff">
|
||||||
|
<el-radio :label="true" :value="true"> 全款 </el-radio>
|
||||||
|
<el-radio :label="false" :value="false"> 非全款 </el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="支付金额" prop="payAmount">
|
||||||
|
<el-input-number
|
||||||
|
v-model="form.payAmount"
|
||||||
|
:min="0"
|
||||||
|
style="width: 100%"
|
||||||
|
:controls="false"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="公司收款" prop="isCompanyReceipts">
|
||||||
|
<el-radio-group v-model="form.isCompanyReceipts">
|
||||||
|
<el-radio :label="true" :value="true">是</el-radio>
|
||||||
|
<el-radio :label="false" :value="false">否</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<template v-if="appStore.getAppInfo?.instanceType == 1">
|
||||||
|
<el-col :span="8" :offset="0" v-if="form.signClass">
|
||||||
|
<el-form-item label="利润">
|
||||||
|
<div style="color: blue; font-weight: bold; font-size: 16px">{{ profitNum }}</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="接待人" prop="receiver">
|
||||||
|
<el-select v-model="form.receiver" placeholder="选择接待人" clearable filterable>
|
||||||
|
<el-option
|
||||||
|
v-for="item in allUserOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nickname"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<el-col :span="8" :offset="0">
|
||||||
|
<el-form-item label="安装状态" prop="installStatus">
|
||||||
|
<el-select v-model="form.installStatus">
|
||||||
|
<el-option label="待安装" :value="1" />
|
||||||
|
<el-option label="已安装" :value="2" />
|
||||||
|
<el-option label="无需安装" :value="3" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</template>
|
||||||
|
<el-col
|
||||||
|
:span="fieldItem.component == 'Editor' ? 24 : 8"
|
||||||
|
:offset="0"
|
||||||
|
v-for="fieldItem in diyFieldList"
|
||||||
|
:key="fieldItem.clueParamId"
|
||||||
>
|
>
|
||||||
合计应收:{{ prodTotalPrice + extraTotalPrice }}
|
<el-form-item :label="fieldItem.label" :prop="fieldItem.field">
|
||||||
</el-divider>
|
<component :is="componentMap[fieldItem.component]" v-model="form[fieldItem.field]">
|
||||||
</el-col>
|
<template v-if="fieldItem.component == 'Select'">
|
||||||
<el-col :span="24" :offset="0">
|
<el-option
|
||||||
<el-form-item label="备注">
|
v-for="item in fieldItem.options"
|
||||||
<Editor v-model:modelValue="form.remark" />
|
:key="item.id"
|
||||||
</el-form-item>
|
:label="item.name"
|
||||||
</el-col>
|
:value="item.id"
|
||||||
</el-row>
|
/>
|
||||||
</el-form>
|
</template>
|
||||||
<template #footer>
|
<template v-else-if="fieldItem.component == 'Radio'">
|
||||||
|
<el-radio
|
||||||
|
v-for="item in fieldItem.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.id"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
{{ item.name }}
|
||||||
|
</el-radio>
|
||||||
|
</template>
|
||||||
|
<template v-else-if="fieldItem.component == 'Checkbox'">
|
||||||
|
<el-checkbox
|
||||||
|
v-for="item in fieldItem.options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</component>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<!-- 进销存模式 -->
|
||||||
|
<el-col :span="24" :offset="0" v-if="appStore.getAppInfo?.instanceType == 2">
|
||||||
|
<el-divider direction="horizontal" content-position="left">
|
||||||
|
成交产品<span v-if="prodTotalPrice">,应收:{{ prodTotalPrice }}</span>
|
||||||
|
</el-divider>
|
||||||
|
<el-button
|
||||||
|
class="mb-5px"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="
|
||||||
|
form.signProducts.push({ productId: undefined, specsId: undefined, signNum: 0 })
|
||||||
|
"
|
||||||
|
>
|
||||||
|
添加成交产品
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="form.signProducts" border size="small">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column prop="productId" label="产品">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-select
|
||||||
|
v-model="row.productId"
|
||||||
|
placeholder="选择成交产品"
|
||||||
|
filterable
|
||||||
|
@change="row.specsId = undefined"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in prodOptions"
|
||||||
|
:key="item.productId"
|
||||||
|
:label="item.productName"
|
||||||
|
:value="item.productId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="specsId" label="规格">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-select
|
||||||
|
v-model="row.specsId"
|
||||||
|
placeholder="选择规格"
|
||||||
|
filterable
|
||||||
|
:disabled="!row.productId"
|
||||||
|
@change="
|
||||||
|
row.price = specsOptions(row.productId).find(
|
||||||
|
(it) => it.specsId == row.specsId
|
||||||
|
).price
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in specsOptions(row.productId)"
|
||||||
|
:key="item.specsId"
|
||||||
|
:label="item.specsName"
|
||||||
|
:value="item.specsId"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="price" label="销售单价" width="100px" />
|
||||||
|
<el-table-column prop="signNum" label="成交数量" width="100px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number
|
||||||
|
v-model="row.signNum"
|
||||||
|
:min="1"
|
||||||
|
size="small"
|
||||||
|
:controls="false"
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remark" label="备注">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="60px">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<Icon
|
||||||
|
icon="ep:remove-filled"
|
||||||
|
class="text-red-500"
|
||||||
|
@click="handleRemove('signProducts', $index)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0" class="mb-18px">
|
||||||
|
<el-divider direction="horizontal" content-position="left">
|
||||||
|
其他费用<span v-if="extraTotalPrice">,应收:{{ extraTotalPrice }}</span>
|
||||||
|
</el-divider>
|
||||||
|
<el-button
|
||||||
|
class="mb-5px"
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="form.extraPay.push({ extraPayType: undefined, extraPayMoney: 0 })"
|
||||||
|
>
|
||||||
|
添加其他费用
|
||||||
|
</el-button>
|
||||||
|
<el-table :data="form.extraPay" border size="small">
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<el-table-column prop="extraPayType" label="费用类型" width="200px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-select
|
||||||
|
v-model="row.extraPayType"
|
||||||
|
size="small"
|
||||||
|
placeholder="其他费用类型"
|
||||||
|
filterable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in extraPayOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="extraPayMoney" label="费用金额" width="180px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input-number v-model="row.extraPayMoney" size="small" :controls="false" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="remark" label="备注">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-input v-model="row.remark" size="small" placeholder="备注信息" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="60px">
|
||||||
|
<template #default="{ $index }">
|
||||||
|
<Icon
|
||||||
|
icon="ep:remove-filled"
|
||||||
|
class="text-red-500"
|
||||||
|
@click="handleRemove('extraPay', $index)"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-divider
|
||||||
|
v-if="prodTotalPrice + extraTotalPrice"
|
||||||
|
direction="horizontal"
|
||||||
|
content-position="left"
|
||||||
|
>
|
||||||
|
合计应收:{{ prodTotalPrice + extraTotalPrice }}
|
||||||
|
</el-divider>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24" :offset="0">
|
||||||
|
<el-form-item label="备注">
|
||||||
|
<Editor v-model:modelValue="form.remark" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<template #footer v-if="showMergeOrder">
|
||||||
|
<span>
|
||||||
|
<el-button @click="show = false">取 消</el-button>
|
||||||
|
<el-button :disabled="formLoading" type="primary" @click="handleNext">下 一 步</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
<template #footer v-else>
|
||||||
<span>
|
<span>
|
||||||
<el-button @click="show = false">取 消</el-button>
|
<el-button @click="show = false">取 消</el-button>
|
||||||
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
<el-button :disabled="formLoading" type="primary" @click="handleSave">保 存</el-button>
|
||||||
@@ -346,7 +374,7 @@
|
|||||||
|
|
||||||
<script setup name="DialogSuccess">
|
<script setup name="DialogSuccess">
|
||||||
import * as ClueApi from '@/api/clue'
|
import * as ClueApi from '@/api/clue'
|
||||||
import { createSign, getSignProfit } from '@/api/clue/sign'
|
import { createSign, getSignProfit, getSignPage } from '@/api/clue/sign'
|
||||||
import { getDiyFieldList } from '@/api/clue/orderField'
|
import { getDiyFieldList } from '@/api/clue/orderField'
|
||||||
import { getPlaceList } from '@/api/school/place'
|
import { getPlaceList } from '@/api/school/place'
|
||||||
import { getClassTypeList } from '@/api/school/class'
|
import { getClassTypeList } from '@/api/school/class'
|
||||||
@@ -421,23 +449,6 @@ const showSchema = computed(() => {
|
|||||||
return [...list, ...arr]
|
return [...list, ...arr]
|
||||||
})
|
})
|
||||||
|
|
||||||
// const rules = computed(() => {
|
|
||||||
// let ruleObj = {}
|
|
||||||
// props.schema.map((it) => {
|
|
||||||
// if (it.isRequired) {
|
|
||||||
// Reflect.set(ruleObj, it.field, {
|
|
||||||
// required: true,
|
|
||||||
// message: `${it.label}不可为空`,
|
|
||||||
// trigger: 'blur, change'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// if (appStore.getAppInfo?.instanceType == 1) {
|
|
||||||
// ruleObj = { ...ruleObj, ...schoolRules }
|
|
||||||
// }
|
|
||||||
// return ruleObj
|
|
||||||
// })
|
|
||||||
|
|
||||||
const extraPayOptions = getDictOptions('other_pay_type')
|
const extraPayOptions = getDictOptions('other_pay_type')
|
||||||
|
|
||||||
async function open(id) {
|
async function open(id) {
|
||||||
@@ -446,6 +457,10 @@ async function open(id) {
|
|||||||
getDiyFields()
|
getDiyFields()
|
||||||
const data = await ClueApi.getClue(id)
|
const data = await ClueApi.getClue(id)
|
||||||
info.value = { ...data, ...data.diyParams }
|
info.value = { ...data, ...data.diyParams }
|
||||||
|
// 进销存模式,查询是否需要合并订单
|
||||||
|
if (appStore.getAppInfo?.instanceType == 2) {
|
||||||
|
setMergeOrder(data.phone)
|
||||||
|
}
|
||||||
show.value = true
|
show.value = true
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
@@ -473,6 +488,35 @@ function getDiyFields() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const showMergeOrder = ref(false)
|
||||||
|
const mergeOrderList = ref([])
|
||||||
|
const mergeOrderId = ref(undefined)
|
||||||
|
function setMergeOrder(phone) {
|
||||||
|
getSignPage({ phone, pageNo: 1, pageSize: 10 }).then((data) => {
|
||||||
|
if (data.total > 0) {
|
||||||
|
// 选择订单作为主订单
|
||||||
|
showMergeOrder.value = true
|
||||||
|
mergeOrderList.value = data.list
|
||||||
|
mergeOrderId.value = undefined
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleNext() {
|
||||||
|
if (mergeOrderId.value) {
|
||||||
|
form.value.signOrderId = mergeOrderId.value
|
||||||
|
const order = mergeOrderList.value.find((it) => it.signOrderId == mergeOrderId.value)
|
||||||
|
if (order.orderDiyParams) {
|
||||||
|
for (const key in order.orderDiyParams) {
|
||||||
|
if (Object.prototype.hasOwnProperty.call(order.orderDiyParams, key)) {
|
||||||
|
form.value[key] = order.orderDiyParams[key]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showMergeOrder.value = false
|
||||||
|
}
|
||||||
|
|
||||||
async function resetForm(id) {
|
async function resetForm(id) {
|
||||||
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' })
|
const data = await getConfigByConfigKey({ configKey: 'companyCollectionConfig' })
|
||||||
form.value = {
|
form.value = {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
<div v-if="item.field == 'followRecord'">
|
<div v-if="item.field == 'followRecord'">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
text
|
link
|
||||||
style="padding: 0"
|
style="padding: 0"
|
||||||
@click="handleFollow(row)"
|
@click="handleFollow(row)"
|
||||||
v-if="queryType != 4"
|
v-if="queryType != 4"
|
||||||
|
|||||||
Reference in New Issue
Block a user