|
@@ -4,10 +4,10 @@
|
|
<div class="bg-white w-full h-full shadow-md rounded-md flex flex-col">
|
|
<div class="bg-white w-full h-full shadow-md rounded-md flex flex-col">
|
|
<div class="flex-1 p-3 overflow-y-auto">
|
|
<div class="flex-1 p-3 overflow-y-auto">
|
|
<el-form :model="businessOpportunityForm" label-width="70px" style="max-width: 600px">
|
|
<el-form :model="businessOpportunityForm" label-width="70px" style="max-width: 600px">
|
|
- <el-form-item label="商机名称">
|
|
|
|
|
|
+ <el-form-item :label="`${businessLabel}名称`">
|
|
<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="`${businessLabel}阶段`">
|
|
<el-select v-model="businessOpportunityForm.stageId" placeholder="请选择" clearable>
|
|
<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>
|
|
@@ -58,7 +58,7 @@
|
|
</div>
|
|
</div>
|
|
<div class="justify-end flex">
|
|
<div class="justify-end flex">
|
|
<el-button v-permission="['businessAddAnEdit']" type="primary"
|
|
<el-button v-permission="['businessAddAnEdit']" type="primary"
|
|
- @click="editNewBusiness(false)">新建商机</el-button>
|
|
|
|
|
|
+ @click="editNewBusiness(false)">新建{{ businessLabel }}</el-button>
|
|
<el-button type="primary" @click="showVisible('batchTransferVisible')"
|
|
<el-button type="primary" @click="showVisible('batchTransferVisible')"
|
|
:disabled="batchTableData.length <= 0">批量转移</el-button>
|
|
:disabled="batchTableData.length <= 0">批量转移</el-button>
|
|
<el-button type="primary" v-permission="['businessDelete']" @click="batchDeteleItem()"
|
|
<el-button type="primary" v-permission="['businessDelete']" @click="batchDeteleItem()"
|
|
@@ -163,7 +163,7 @@
|
|
</el-select> -->
|
|
</el-select> -->
|
|
<personnel-search v-model="transferPersonnel" :size="''" placeholder="请选择"></personnel-search>
|
|
<personnel-search v-model="transferPersonnel" :size="''" placeholder="请选择"></personnel-search>
|
|
</div>
|
|
</div>
|
|
- <div class="pl-3 text-[#e94a4a]">转移后,将看不到此商机</div>
|
|
|
|
|
|
+ <div class="pl-3 text-[#e94a4a]">转移后,将看不到此{{ businessLabel }}</div>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
@@ -184,8 +184,8 @@
|
|
<div class="p-8">
|
|
<div class="p-8">
|
|
<div class="ml-4 mr-4">
|
|
<div class="ml-4 mr-4">
|
|
<div class="flex items-center">1、点击下载 <el-link type="primary"
|
|
<div class="flex items-center">1、点击下载 <el-link type="primary"
|
|
- @click="downloadTemplate(MODURL, '商机导入模板.xlsx')">商机导入模板.xlsx</el-link></div>
|
|
|
|
- <div class="mt-4">2、填写excel文件、商机名称、商机金额、商机阶段必填</div>
|
|
|
|
|
|
+ @click="downloadTemplate(MODURL, `${businessLabel}导入模板.xlsx`)">{{businessLabel}}导入模板.xlsx</el-link></div>
|
|
|
|
+ <div class="mt-4">2、填写excel文件、{{businessLabel}}名称、{{businessLabel}}金额、{{businessLabel}}阶段必填</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -222,6 +222,9 @@ import { GETTABLELISTPRODUCT } from "../order/api";
|
|
import personnelSearch from '@/components/translationComponent/personnelSearch/personnelSearch.vue';
|
|
import personnelSearch from '@/components/translationComponent/personnelSearch/personnelSearch.vue';
|
|
import kanbanView from "./component/kanbanView.vue";
|
|
import kanbanView from "./component/kanbanView.vue";
|
|
|
|
|
|
|
|
+
|
|
|
|
+const isExistBusiness = sessionStorage.getItem("isExistBusiness");
|
|
|
|
+const businessLabel = isExistBusiness === "1" ? "商机" : "项目";
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
const globalPopup = inject<GlobalPopup>('globalPopup')
|
|
const globalPopup = inject<GlobalPopup>('globalPopup')
|
|
const businessTableRef = ref<InstanceType<typeof ElTable>>() // 商机table dom
|
|
const businessTableRef = ref<InstanceType<typeof ElTable>>() // 商机table dom
|
|
@@ -254,8 +257,8 @@ const allVisible = reactive({
|
|
importVisible: false
|
|
importVisible: false
|
|
})
|
|
})
|
|
const allText = reactive({
|
|
const allText = reactive({
|
|
- newBusinessisibleText: '新建商机',
|
|
|
|
- transferText: '转移商机'
|
|
|
|
|
|
+ newBusinessisibleText: `新建${businessLabel}`,
|
|
|
|
+ transferText: `转移${businessLabel}`
|
|
}) // 所有文本
|
|
}) // 所有文本
|
|
|
|
|
|
const taskModalForm = ref({}) // 任务弹窗表单
|
|
const taskModalForm = ref({}) // 任务弹窗表单
|
|
@@ -326,14 +329,14 @@ function editNewBusiness(item: any) {
|
|
allLoading.generateFormLading = true
|
|
allLoading.generateFormLading = true
|
|
editProduct(item)
|
|
editProduct(item)
|
|
businessTemplateValue.value = editBusinessData(item)
|
|
businessTemplateValue.value = editBusinessData(item)
|
|
- allText.newBusinessisibleText = '编辑商机'
|
|
|
|
|
|
+ allText.newBusinessisibleText = `编辑${businessLabel}`
|
|
}
|
|
}
|
|
if (!item) {
|
|
if (!item) {
|
|
businessTemplateRef.value && businessTemplateRef.value.reset()
|
|
businessTemplateRef.value && businessTemplateRef.value.reset()
|
|
businessTemplate.value = businessTemplate.value
|
|
businessTemplate.value = businessTemplate.value
|
|
businessTemplateValue.value = {}
|
|
businessTemplateValue.value = {}
|
|
productTableListValue.value = []
|
|
productTableListValue.value = []
|
|
- allText.newBusinessisibleText = '新建商机'
|
|
|
|
|
|
+ allText.newBusinessisibleText = `新建${businessLabel}`
|
|
}
|
|
}
|
|
}, 0)
|
|
}, 0)
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
@@ -382,7 +385,7 @@ function batchDeteleItem() {
|
|
}
|
|
}
|
|
|
|
|
|
function businessDeteleItem(value: string | number, label: string, batch: boolean = false) {
|
|
function businessDeteleItem(value: string | number, label: string, batch: boolean = false) {
|
|
- confirmAction(`确定${batch ? '批量' : ''}删除【${label}】商机吗?`).then(() => {
|
|
|
|
|
|
+ confirmAction(`确定${batch ? '批量' : ''}删除【${label}】${businessLabel}吗?`).then(() => {
|
|
post(BUSINESSDETELE, { ids: value }).then(res => {
|
|
post(BUSINESSDETELE, { ids: value }).then(res => {
|
|
if (res.code != 'ok') {
|
|
if (res.code != 'ok') {
|
|
globalPopup?.showError(res.msg)
|
|
globalPopup?.showError(res.msg)
|
|
@@ -405,7 +408,7 @@ async function importBusiness(param: UploadRequestOptions) {
|
|
allLoading.importLoading = false
|
|
allLoading.importLoading = false
|
|
})
|
|
})
|
|
if (res.code == 'ok') {
|
|
if (res.code == 'ok') {
|
|
- globalPopup?.showSuccess('导入成功' || '')
|
|
|
|
|
|
+ globalPopup?.showSuccess('导入成功')
|
|
searchForBusinessOpportunities()
|
|
searchForBusinessOpportunities()
|
|
return
|
|
return
|
|
}
|
|
}
|
|
@@ -416,7 +419,7 @@ function exportBusinessTableList() {
|
|
allLoading.exoprtLoading = true
|
|
allLoading.exoprtLoading = true
|
|
let valueForm = getFromValue(businessOpportunityForm)
|
|
let valueForm = getFromValue(businessOpportunityForm)
|
|
post(URL_EXPORTBUSINESS, { ...valueForm }).then((res) => {
|
|
post(URL_EXPORTBUSINESS, { ...valueForm }).then((res) => {
|
|
- downloadFile(res.data, '商机表导出.xlsx')
|
|
|
|
|
|
+ downloadFile(res.data, `${businessLabel}表导出.xlsx`)
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
allLoading.exoprtLoading = false
|
|
allLoading.exoprtLoading = false
|
|
})
|
|
})
|