fix:行政区划
This commit is contained in:
parent
f7050b1f92
commit
24e79521a4
|
|
@ -6,7 +6,7 @@ import request from '@/utils/request'
|
|||
*/
|
||||
export function getXzqhList() {
|
||||
return request({
|
||||
url: 'crmXzqhDm/list',
|
||||
url: 'crmXzqh/treeOptions',
|
||||
method: 'get',
|
||||
headers: {
|
||||
'Content-Type': 'application/json;charset=UTF-8'
|
||||
|
|
|
|||
|
|
@ -63,28 +63,54 @@
|
|||
@click="handlePoolAction">
|
||||
同步数据
|
||||
</el-button>
|
||||
<div class="time-container">
|
||||
<!-- 添加时间选择输入框 -->
|
||||
<el-date-picker
|
||||
v-if="poolId === 34557"
|
||||
v-model="currentDateTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
class="time-select"
|
||||
/>
|
||||
<div v-if="poolId === 34557" class="time-container">
|
||||
<el-form>
|
||||
<el-row>
|
||||
<el-col :span="1"><p>地区:</p></el-col>
|
||||
<el-col :span="10">
|
||||
<el-table-column>
|
||||
<el-cascader
|
||||
v-if="poolId === 34557"
|
||||
:props="{ checkStrictly: true }"
|
||||
:options="xzqhOptions"
|
||||
style="width: 150px"
|
||||
v-model="selectedOptions"
|
||||
placeholder="选择地区"
|
||||
class="time-select"
|
||||
clearable/>
|
||||
</el-table-column>
|
||||
</el-col>
|
||||
<el-col :span="2"><p>开业日期:</p></el-col>
|
||||
<el-col :span="10">
|
||||
<el-table-column>
|
||||
<el-date-picker
|
||||
v-if="poolId === 34557"
|
||||
v-model="currentDateTime"
|
||||
type="datetime"
|
||||
style="width: 150px"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
class="time-select"
|
||||
/>
|
||||
</el-table-column>
|
||||
</el-col>
|
||||
<el-col :span="1">
|
||||
<el-button
|
||||
v-if="poolId === 34557"
|
||||
:loading="isSubmitting"
|
||||
type="primary"
|
||||
size="small"
|
||||
style="margin-left: 2px;height: 40px"
|
||||
@click="queryGsdjxxByDate"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<!-- 添加查询按钮 -->
|
||||
<el-button
|
||||
v-if="poolId === 34557"
|
||||
:loading="isSubmitting"
|
||||
type="primary"
|
||||
size="small"
|
||||
style="margin-left: 2px;height: 40px"
|
||||
@click="queryGsdjxxByDate"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
|
||||
<!-- 操作反馈提示 -->
|
||||
<div v-if="submitSuccess" class="success-message">
|
||||
<el-alert :closable="false" title="查询成功!" type="success" show-icon/>
|
||||
|
|
@ -203,13 +229,11 @@
|
|||
</el-table-column>
|
||||
<el-form-item style="padding-top: 30px">
|
||||
地区:
|
||||
<el-select v-model="xzqhDm" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in xzqhList"
|
||||
:key="item.xzqhDm"
|
||||
:label="item.xzqhMc"
|
||||
:value="item.xzqhDm"/>
|
||||
</el-select>
|
||||
<el-cascader
|
||||
:options="xzqhOptions"
|
||||
v-model="selectedOptions"
|
||||
:props="{ checkStrictly: true }"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
|
|
@ -262,12 +286,11 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { crmCustomerPoolNameListAPI, crmCustomerPoolQueryAuthAPI } from '@/api/crm/customer'
|
||||
|
||||
import {crmCustomerPoolNameListAPI, crmCustomerPoolQueryAuthAPI} from '@/api/crm/customer'
|
||||
import {getXzqhList} from '@/api/crm/xzqh'
|
||||
import CustomerDetail from '../customer/Detail'
|
||||
import TableMixin from '../mixins/Table'
|
||||
import { getXzqhList } from '../../../api/crm/xzqh'
|
||||
import { queryGsdjxxByDate, syGsdjxx } from '../../../api/crm/gsdjxx'
|
||||
import {queryGsdjxxByDate, syGsdjxx} from '../../../api/crm/gsdjxx'
|
||||
|
||||
export default {
|
||||
/** 客户管理 的 公海列表 */
|
||||
|
|
@ -305,7 +328,9 @@ export default {
|
|||
isSubmitting: false, // 提交状态标识
|
||||
autoCloseDelay: 3000, // 新增:提示信息自动关闭的延迟时间,单位毫秒,这里设为3秒
|
||||
successTimer: null, // 新增:用于存储成功提示的定时器
|
||||
errorTimer: null // 新增:用于存储错误提示的定时器
|
||||
errorTimer: null, // 新增:用于存储错误提示的定时器
|
||||
xzqhOptions: [],
|
||||
selectedOptions: []
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
|
@ -352,7 +377,8 @@ export default {
|
|||
mounted() {
|
||||
// 设置默认值为当天日期时间
|
||||
this.setDefaultDateTime()
|
||||
this.queryGsdjxxByDate()
|
||||
// this.queryGsdjxxByDate()
|
||||
this.loadXzqhOptions()
|
||||
},
|
||||
created() {
|
||||
this.getPoolList()
|
||||
|
|
@ -384,7 +410,15 @@ export default {
|
|||
clearTimeout(this.errorTimer)
|
||||
|
||||
const time = this.currentDateTime
|
||||
queryGsdjxxByDate(time)
|
||||
let xzqhDm = ''
|
||||
if (this.selectedOptions) {
|
||||
xzqhDm = this.selectedOptions[this.selectedOptions.length - 1]
|
||||
}
|
||||
let pa = {
|
||||
rq: time,
|
||||
xzqhDm: xzqhDm
|
||||
}
|
||||
queryGsdjxxByDate(pa)
|
||||
.then(res => {
|
||||
console.log('查询成功:', res.data)
|
||||
this.list = res.data.list
|
||||
|
|
@ -418,6 +452,15 @@ export default {
|
|||
const day = String(now.getDate()).padStart(2, '0')
|
||||
this.currentDateTime = `${year}-${month}-${day}`
|
||||
},
|
||||
loadXzqhOptions() {
|
||||
getXzqhList().then(res => {
|
||||
this.xzqhOptions = res.data
|
||||
})
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log('选中的行政区划代码:', value)
|
||||
// 处理选择结果
|
||||
},
|
||||
/**
|
||||
* 获取公海权限
|
||||
*/
|
||||
|
|
@ -428,28 +471,22 @@ export default {
|
|||
.then(res => {
|
||||
this.poolAuth = res.data || {}
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
},
|
||||
// 打开选项框
|
||||
handlePoolAction() {
|
||||
getXzqhList().then(resp => {
|
||||
console.log(resp.data)
|
||||
this.xzqhList = resp.data
|
||||
this.openXky = true
|
||||
})
|
||||
this.openXky = true
|
||||
},
|
||||
// 同步工商登记信息
|
||||
sysGsdjxx() {
|
||||
let xzqhMc = null
|
||||
for (let i = 0; i < this.xzqhList.length; i++) {
|
||||
if (this.xzqhList[i].xzqhDm === this.xzqhDm) {
|
||||
xzqhMc = this.xzqhList[i].xzqhMc
|
||||
}
|
||||
if (!this.selectedOptions || this.month) {
|
||||
this.$message.error('请选选择参数')
|
||||
return
|
||||
}
|
||||
const pa = {
|
||||
rq: this.month,
|
||||
xzqhDm: this.xzqhDm,
|
||||
xzqhMc: xzqhMc
|
||||
xzqhDm: this.selectedOptions[this.selectedOptions.length - 1]
|
||||
}
|
||||
console.log(pa)
|
||||
syGsdjxx(pa)
|
||||
|
|
@ -495,7 +532,7 @@ export default {
|
|||
/**
|
||||
* 通过回调控制class
|
||||
*/
|
||||
cellClassName({ row, column, rowIndex, columnIndex }) {
|
||||
cellClassName({row, column, rowIndex, columnIndex}) {
|
||||
if (column.property === 'customerName') {
|
||||
return 'can-visit--underline'
|
||||
} else if (column.property === 'businessCheck') {
|
||||
|
|
@ -525,4 +562,13 @@ export default {
|
|||
.time-select {
|
||||
margin-left: 50px;
|
||||
}
|
||||
p {
|
||||
padding-left: 10px;
|
||||
padding-top: 15px;
|
||||
width: 100px;
|
||||
word-break: keep-all;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
Loading…
Reference in New Issue