|
@@ -12,16 +12,21 @@
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="同步状态">
|
|
|
- <a-select placeholder="请选择同步状态" v-model="queryParam.statusVal">
|
|
|
- <a-select-option value="1">
|
|
|
+ <a-select placeholder="请选择同步状态" v-model="queryParam.handleResult">
|
|
|
+ <a-select-option value="finish">
|
|
|
同步成功
|
|
|
</a-select-option>
|
|
|
- <a-select-option value="2">
|
|
|
+ <a-select-option value="fail">
|
|
|
同步失败
|
|
|
</a-select-option>
|
|
|
</a-select>
|
|
|
</a-select@change="handlechange"></a-form-item>
|
|
|
</a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="业务编码">
|
|
|
+ <a-input id="rebateSettingsList-no" v-model.trim="queryParam.bizId" allowClear placeholder="请输入完整的业务编码"/>
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="rebateSettingsList-refresh">查询</a-button>
|
|
|
<a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="rebateSettingsList-reset">重置</a-button>
|
|
@@ -41,18 +46,34 @@
|
|
|
:scroll="{ y: tableHeight }"
|
|
|
:defaultLoadData="false"
|
|
|
bordered>
|
|
|
+ <!-- 业务模块 -->
|
|
|
+ <template slot="workModule">
|
|
|
+ 采购单管理
|
|
|
+ </template>
|
|
|
<!-- 同步状态 -->
|
|
|
<template slot="syncStatus" slot-scope="text, record">
|
|
|
- <span v-if="record.status&&record.status=='success'">同步成功</span>
|
|
|
+ <span v-if="record.handleResult&&record.handleResult!='fail'">同步成功</span>
|
|
|
<span v-else style="color:#ed1c24;">同步失败</span>
|
|
|
</template>
|
|
|
+ <!-- 错误信息 -->
|
|
|
+ <template slot="errInfo" slot-scope="text, record">
|
|
|
+ <div v-if="record.errInfo">
|
|
|
+ <a-popover slot="content" trigger="hover">
|
|
|
+ <template slot="rightTop">
|
|
|
+ {{ record.errInfo }}
|
|
|
+ </template>
|
|
|
+ <div>{{ record.errInfo }}</div>
|
|
|
+ </a-popover>
|
|
|
+ </div>
|
|
|
+ <div v-else>--</div>
|
|
|
+ </template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
|
class="button-info"
|
|
|
- v-if="record.status&&record.status!='success'"
|
|
|
+ v-if="record.handleResult&&record.handleResult=='fail'"
|
|
|
@click="handleAgainSync(record)"
|
|
|
id="rebateSettingsList-edit-btn">重新同步</a-button>
|
|
|
<span v-else>--</span>
|
|
@@ -65,7 +86,7 @@
|
|
|
<script>
|
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
-import { queryRebatePage } from '@/api/dealerRelation'
|
|
|
+import { queryReceivePage, handle } from '@/api/mqmsg'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
export default {
|
|
|
name: 'ErpMessageManagementList',
|
|
@@ -76,26 +97,29 @@ export default {
|
|
|
spinning: false,
|
|
|
tableHeight: 0,
|
|
|
queryParam: {
|
|
|
- beginDate: '',
|
|
|
- endDate: '',
|
|
|
- statusVal: undefined
|
|
|
+ createDateStart: '',
|
|
|
+ createDateEnd: '',
|
|
|
+ handleResult: undefined,
|
|
|
+ bizType: 'KdMidSpareInputs',
|
|
|
+ bizId: undefined
|
|
|
},
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
columns: [
|
|
|
{ title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
|
|
|
- { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '同步时间', dataIndex: 'tbDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '业务模块', dataIndex: 'work', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '业务编码', dataIndex: 'ywno', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '同步状态', scopedSlots: { customRender: 'syncStatus' }, width: '7%', align: 'center' },
|
|
|
- { title: '错误信息', dataIndex: 'errorInfo', width: '18%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '同步时间', dataIndex: 'lastHandleDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '业务模块', scopedSlots: { customRender: 'workModule' }, width: '10%', align: 'center' },
|
|
|
+ { title: '业务编码', dataIndex: 'bizId', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '同步次数', dataIndex: 'handleNum', width: '7%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
|
|
|
+ { title: '同步状态', scopedSlots: { customRender: 'syncStatus' }, width: '10%', align: 'center' },
|
|
|
+ { title: '错误信息', scopedSlots: { customRender: 'errInfo' }, width: '15%', align: 'center', ellipsis: true },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
|
this.disabled = true
|
|
|
this.spinning = true
|
|
|
- return queryRebatePage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
+ return queryReceivePage(Object.assign(parameter, this.queryParam)).then(res => {
|
|
|
let data
|
|
|
if (res.status == 200) {
|
|
|
data = res.data
|
|
@@ -114,20 +138,38 @@ export default {
|
|
|
methods: {
|
|
|
// 时间 change
|
|
|
dateChange (date) {
|
|
|
- this.queryParam.beginDate = date[0] ? date[0] : ''
|
|
|
- this.queryParam.endDate = date[1] ? date[1] : ''
|
|
|
+ this.queryParam.createDateStart = date[0] ? date[0] : ''
|
|
|
+ this.queryParam.createDateEnd = date[1] ? date[1] : ''
|
|
|
},
|
|
|
// 重置
|
|
|
resetSearchForm () {
|
|
|
- this.queryParam.statusVal = undefined
|
|
|
- this.queryParam.beginDate = ''
|
|
|
- this.queryParam.endDate = ''
|
|
|
+ this.queryParam.handleResult = undefined
|
|
|
+ this.queryParam.createDateStart = ''
|
|
|
+ this.queryParam.createDateEnd = ''
|
|
|
+ this.queryParam.bizId = undefined
|
|
|
this.$refs.rangeDate.resetDate()
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
// 重新同步
|
|
|
handleAgainSync (row) {
|
|
|
- this.openModal = true
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要重新同步信息吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ handle({ id: row.id }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
pageInit () {
|
|
|
const _this = this
|
|
@@ -137,7 +179,7 @@ export default {
|
|
|
},
|
|
|
setTableH () {
|
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
|
- this.tableHeight = window.innerHeight - tableSearchH - 195
|
|
|
+ this.tableHeight = window.innerHeight - tableSearchH - 205
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
@@ -165,3 +207,8 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less" scope>
|
|
|
+ .ant-table-tbody .ant-table-row{
|
|
|
+ height:42px !important;
|
|
|
+ }
|
|
|
+</style>
|