|
@@ -8,7 +8,7 @@
|
|
<el-input v-model="businessOpportunityForm.name" clearable placeholder="请输入"></el-input>
|
|
<el-input v-model="businessOpportunityForm.name" clearable placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="商机阶段">
|
|
<el-form-item label="商机阶段">
|
|
- <el-select v-model="businessOpportunityForm.stageId" placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="businessOpportunityForm.stageId" placeholder="请选择" clearable>
|
|
<el-option v-for="item in fixedData.BusinessStage" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in fixedData.BusinessStage" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -19,12 +19,13 @@
|
|
<el-input v-model="businessOpportunityForm.contactPerson" clearable placeholder="请输入"></el-input>
|
|
<el-input v-model="businessOpportunityForm.contactPerson" clearable placeholder="请输入"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="产品">
|
|
<el-form-item label="产品">
|
|
- <el-select v-model="businessOpportunityForm.product" placeholder="请选择">
|
|
|
|
- <el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
|
|
+ <el-select v-model="businessOpportunityForm.product" placeholder="请选择" clearable>
|
|
|
|
+ <el-option v-for="item in fixedData.ProductArr" :key="item.value" :label="item.label"
|
|
|
|
+ :value="item.value" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="负责人">
|
|
<el-form-item label="负责人">
|
|
- <el-select v-model="businessOpportunityForm.inchargerId" placeholder="请选择">
|
|
|
|
|
|
+ <el-select v-model="businessOpportunityForm.inchargerId" placeholder="请选择" clearable>
|
|
<el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in fixedData.Personnel" :key="item.id" :label="item.name" :value="item.id" />
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -61,13 +62,13 @@
|
|
</div>
|
|
</div>
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
<el-table ref="businessTableRef" :data="businessTable" border v-loading="allLoading.businessTableLading"
|
|
<el-table ref="businessTableRef" :data="businessTable" border v-loading="allLoading.businessTableLading"
|
|
- @selection-change="changeBatch" style="width: 100%;height: 100%;">
|
|
|
|
|
|
+ :show-overflow-tooltip="tableShowOverflowTooltip" @selection-change="changeBatch"
|
|
|
|
+ style="width: 100%;height: 100%;">
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column v-for="(item, index) in tableColumn" :prop="item.prop" :label="item.label" :key="index"
|
|
<el-table-column v-for="(item, index) in tableColumn" :prop="item.prop" :label="item.label" :key="index"
|
|
:width="item.width">
|
|
:width="item.width">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
- <el-button link type="primary" size="large" @click="dealWithTableColumn(scope.row, item.eventName)"
|
|
|
|
- v-if="item.eventName">{{ scope.row[item.prop] }}</el-button>
|
|
|
|
|
|
+ <div class="table-text-textnowrap" v-if="item.eventName" @click="dealWithTableColumn(scope.row, item.eventName)">{{ scope.row[item.prop] }}</div>
|
|
<template v-else>{{ scope.row[item.prop] }}</template>
|
|
<template v-else>{{ scope.row[item.prop] }}</template>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -183,10 +184,12 @@ import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, cre
|
|
import { createTask } from '@/components/TaskModal/taskFunction'
|
|
import { createTask } from '@/components/TaskModal/taskFunction'
|
|
import { formatDateTime } from '@/utils/times'
|
|
import { formatDateTime } from '@/utils/times'
|
|
import { GenerateForm } from '@zmjs/form-design';
|
|
import { GenerateForm } from '@zmjs/form-design';
|
|
|
|
+import { tableShowOverflowTooltip } from '@/utils/globalVariables'
|
|
import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
|
|
import RelatedProducts from '@/components/relatedProducts/relatedProducts.vue'
|
|
import TaskModal from '@/components/TaskModal/index.vue'
|
|
import TaskModal from '@/components/TaskModal/index.vue'
|
|
import DeteleBusiness from './component/deteleTables.vue'
|
|
import DeteleBusiness from './component/deteleTables.vue'
|
|
import StageSetting from './component/stageSetting.vue'
|
|
import StageSetting from './component/stageSetting.vue'
|
|
|
|
+import { GETTABLELISTPRODUCT } from "../order/api";
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -244,7 +247,8 @@ const businessOpportunityForm = reactive<businessOpportunityFormType>({
|
|
})
|
|
})
|
|
const fixedData = reactive({
|
|
const fixedData = reactive({
|
|
BusinessStage: [] as fixedDataInterface[],
|
|
BusinessStage: [] as fixedDataInterface[],
|
|
- Personnel: [] as personnelInterface[]
|
|
|
|
|
|
+ Personnel: [] as personnelInterface[],
|
|
|
|
+ ProductArr: [] as productInterface[]
|
|
})
|
|
})
|
|
const productTableList = ref([])
|
|
const productTableList = ref([])
|
|
const productTableListValue = ref([])
|
|
const productTableListValue = ref([])
|
|
@@ -253,8 +257,8 @@ const productTableListValue = ref([])
|
|
function editBusiness(visibles: boolean) {
|
|
function editBusiness(visibles: boolean) {
|
|
businessTemplateRef.value?.getData().then((res: any) => {
|
|
businessTemplateRef.value?.getData().then((res: any) => {
|
|
let productTableListData = relatedProductsRef?.value?.returnData()
|
|
let productTableListData = relatedProductsRef?.value?.returnData()
|
|
- console.log(!productTableListData, judgmentaAmounteEqual({...businessTemplateValue.value, ...res}, productTableListData))
|
|
|
|
- if(!productTableListData || judgmentaAmounteEqual({...businessTemplateValue.value, ...res}, productTableListData)) {
|
|
|
|
|
|
+ console.log(!productTableListData, judgmentaAmounteEqual({ ...businessTemplateValue.value, ...res }, productTableListData))
|
|
|
|
+ if (!productTableListData || judgmentaAmounteEqual({ ...businessTemplateValue.value, ...res }, productTableListData)) {
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -481,6 +485,15 @@ async function getSystemField() {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+ post(GETTABLELISTPRODUCT, { pageIndex: -1, pageSize: -1 }).then(({ data }) => {
|
|
|
|
+ fixedData.ProductArr = (data.record || []).map((item: any) => {
|
|
|
|
+ const { id, productName } = item
|
|
|
|
+ return {
|
|
|
|
+ value: id, label: productName
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
const res = await get(GETGENERATEFOEM)
|
|
const res = await get(GETGENERATEFOEM)
|
|
businessTemplate.value = JSON.parse(res.data[0].config)
|
|
businessTemplate.value = JSON.parse(res.data[0].config)
|
|
}
|
|
}
|