|
@@ -51,9 +51,9 @@
|
|
<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" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
|
|
<el-button type="primary" @click="batchDeteleItem()" :disabled="batchTableData.length <= 0">批量删除</el-button>
|
|
- <el-button type="primary">阶段设置</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="showVisible('stageSetVisible')">阶段设置</el-button>
|
|
<el-button type="primary" @click="showVisible('deteleBusinessVisible')">回收站</el-button>
|
|
<el-button type="primary" @click="showVisible('deteleBusinessVisible')">回收站</el-button>
|
|
- <el-button type="primary" @click="allVisible.importVisible = true">导入</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="showVisible('importVisible')">导入</el-button>
|
|
<el-button type="primary" @click="exportBusinessTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
|
|
<el-button type="primary" @click="exportBusinessTableList()" :loading="allLoading.exoprtLoading">导出</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
<div class="flex-1 w-full overflow-hidden">
|
|
@@ -155,6 +155,9 @@
|
|
|
|
|
|
<!-- 回收站 -->
|
|
<!-- 回收站 -->
|
|
<DeteleBusiness :visibles="allVisible.deteleBusinessVisible" @closeVisible="closeVisible" />
|
|
<DeteleBusiness :visibles="allVisible.deteleBusinessVisible" @closeVisible="closeVisible" />
|
|
|
|
+
|
|
|
|
+ <!-- 阶段设置 -->
|
|
|
|
+ <StageSetting :visibles="allVisible.stageSetVisible" @closeVisible="closeVisible" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -162,7 +165,7 @@
|
|
import { ref, reactive, onMounted, inject } from "vue";
|
|
import { ref, reactive, onMounted, inject } from "vue";
|
|
import type { ElTable, FormInstance, FormRules, UploadRequestOptions } from 'element-plus'
|
|
import type { ElTable, FormInstance, FormRules, UploadRequestOptions } from 'element-plus'
|
|
import { useRouter, useRoute } from "vue-router";
|
|
import { useRouter, useRoute } from "vue-router";
|
|
-import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST, UPDATEINSET, BUSINESSDETELE, BATCHTRANSFER, MODURL, tableColumn } from './api'
|
|
|
|
|
|
+import { GETSYSFILED, MOD, GETPERSONNEL, GETGENERATEFOEM, GETBUSINESSLIST, UPDATEINSET, BUSINESSDETELE, BATCHTRANSFER, MODURL, tableColumn, BUSIESS_GETSATE } from './api'
|
|
import { GETTABLELIST } from '@/pages/product/api'
|
|
import { GETTABLELIST } from '@/pages/product/api'
|
|
import { post, get, uploadFile } from "@/utils/request";
|
|
import { post, get, uploadFile } from "@/utils/request";
|
|
import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, createTaskFromType, formatDate, confirmAction, downloadTemplate, downloadFile } from '@/utils/tools'
|
|
import { getAllListByCode, getFromValue, resetFromValue, getFirstDayOfMonth, createTaskFromType, formatDate, confirmAction, downloadTemplate, downloadFile } from '@/utils/tools'
|
|
@@ -172,6 +175,7 @@ import { GenerateForm } from '@zmjs/form-design';
|
|
import RelatedProducts from './component/relatedProducts.vue'
|
|
import RelatedProducts from './component/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'
|
|
|
|
|
|
const route = useRoute()
|
|
const route = useRoute()
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
@@ -199,6 +203,7 @@ const allVisible = reactive({
|
|
taskModalVisible: false,
|
|
taskModalVisible: false,
|
|
batchTransferVisible: false,
|
|
batchTransferVisible: false,
|
|
deteleBusinessVisible: false,
|
|
deteleBusinessVisible: false,
|
|
|
|
+ stageSetVisible: false,
|
|
importVisible: false
|
|
importVisible: false
|
|
})
|
|
})
|
|
const allText = reactive({
|
|
const allText = reactive({
|
|
@@ -389,15 +394,21 @@ function resetForm() {
|
|
}
|
|
}
|
|
|
|
|
|
async function getSystemField() {
|
|
async function getSystemField() {
|
|
- const systemField = getAllListByCode(['商机阶段'])
|
|
|
|
- for (let i in systemField) {
|
|
|
|
- const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
|
|
|
|
- for (let key of Object.keys(fixedData)) {
|
|
|
|
- if (systemField[i] == key) {
|
|
|
|
- Object.assign(fixedData, { [key]: data })
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ // const systemField = getAllListByCode(['商机阶段'])
|
|
|
|
+ // for (let i in systemField) {
|
|
|
|
+ // const { data } = await get(`${GETSYSFILED}?code=${systemField[i]}`)
|
|
|
|
+ // for (let key of Object.keys(fixedData)) {
|
|
|
|
+ // if (systemField[i] == key) {
|
|
|
|
+ // Object.assign(fixedData, { [key]: data })
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ const row = await post(BUSIESS_GETSATE, {})
|
|
|
|
+ fixedData.BusinessStage = (row.data || []).map((item: any) => {
|
|
|
|
+ const { name, id, seq } = item
|
|
|
|
+ return { name, id, seq }
|
|
|
|
+ }).sort(function (a: any, b: any) {return a.seq - b.seq;});
|
|
|
|
|
|
const { data } = await post(GETPERSONNEL, {})
|
|
const { data } = await post(GETPERSONNEL, {})
|
|
fixedData.Personnel = data.map((item: any) => {
|
|
fixedData.Personnel = data.map((item: any) => {
|