|
|
@ -24,52 +24,278 @@ |
|
|
|
:httpOverallSearchData="httpOverallSearchData" |
|
|
|
> |
|
|
|
</tablePagination> |
|
|
|
<!-- 新增与编辑 --> |
|
|
|
<newAndEdiDialog |
|
|
|
:loading="Loading.newAndEdiLoading" |
|
|
|
:active="active" |
|
|
|
:pageStatus="pageStatus" |
|
|
|
:formReveal="formReveal" |
|
|
|
:formTitle="formTitle" |
|
|
|
:displayDialog="editDialog" |
|
|
|
:FormData="formReveal ? CreateFormData : editFormData" |
|
|
|
:Form="formReveal ? CreateForm : editForm" |
|
|
|
:Options="editOptions" |
|
|
|
:Handle="editHandle" |
|
|
|
:Rules="formReveal ? editRules.cerateRule : editRules.editRule" |
|
|
|
@FormSubmit="FormSubmit" |
|
|
|
@close="FormClose" |
|
|
|
@goBack="goBack" |
|
|
|
></newAndEdiDialog> |
|
|
|
<curren-Drawer |
|
|
|
:title="tableColumns" |
|
|
|
:tableColumns="tableColumns" |
|
|
|
:DrawerLoading="Loading.DrawerLoading" |
|
|
|
:drawer="displayDialog.detailsDialog" |
|
|
|
:dropdownData="dropdownData" |
|
|
|
:propsData="propsData" |
|
|
|
:tabsDesTions="tabsDesTions" |
|
|
|
@drawerShut="(val) => (displayDialog.detailsDialog = val)" |
|
|
|
@drawerbutton="drawerbutton" |
|
|
|
@handleCommand="drawerHandle" |
|
|
|
@close-value="closeValue" |
|
|
|
></curren-Drawer> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import { tableMixins } from "@/mixins/TableMixins"; |
|
|
|
import { LoadingMixins } from "@/mixins/LoadingMixins"; |
|
|
|
import { drawerMixins } from "@/mixins/drawerMixins" |
|
|
|
import { TableHeaderMixins } from "@/mixins/TableHeaderMixins"; |
|
|
|
import { newAndEdiDialogMixins } from "@/mixins/newAndEdiDialogMixins" |
|
|
|
import { mixins } from "@/mixins/mixins"; |
|
|
|
import { dataExchangeFromOut } from "@/api/wms-interface" |
|
|
|
import { filterSelectMixins } from '@/mixins/filter-Select' |
|
|
|
import { dataExchangeFromOut,dataExchangeFromOut_save,dataExchangeFromOut_delete } from "@/api/wms-interface" |
|
|
|
import { getToken } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "dataExchangeFromOut", |
|
|
|
mixins: [ |
|
|
|
tableMixins, |
|
|
|
LoadingMixins, |
|
|
|
drawerMixins, |
|
|
|
TableHeaderMixins, |
|
|
|
mixins, |
|
|
|
filterSelectMixins, |
|
|
|
newAndEdiDialogMixins |
|
|
|
], |
|
|
|
computed: { |
|
|
|
editDialog: { |
|
|
|
get: function () { |
|
|
|
return this.displayDialog.newDialog || this.displayDialog.editDialog; |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
let _this = this |
|
|
|
return { |
|
|
|
tableLoading:false, |
|
|
|
//常用按钮数据 |
|
|
|
currenButtonData: [ |
|
|
|
// this.defaultAddBtn(),//新增 |
|
|
|
this.defaultFieldSettingBtn(),//字段设置 |
|
|
|
this.defaultFreshBtn(),//刷新 |
|
|
|
// this.defaultFilterBtn(),//筛选 |
|
|
|
], |
|
|
|
//新增 |
|
|
|
CreateFormData: { |
|
|
|
number: null,//数字+点* |
|
|
|
remark: null, |
|
|
|
dataType: null, |
|
|
|
tableType: null,//数字+点* |
|
|
|
dataAction: null,//数字+点* |
|
|
|
effectiveDate: null,//* |
|
|
|
status: null,//数字+点* |
|
|
|
sourceSystem: null, |
|
|
|
sourceDataId: null, |
|
|
|
sourceDataGroupCode: null, |
|
|
|
sourceDataDetailCode: null, |
|
|
|
sourceDataContent: null, |
|
|
|
writeTime: null,//* |
|
|
|
writer: null, |
|
|
|
destinationSystem: null, |
|
|
|
destinationDataId: null, |
|
|
|
destinationDataContent: null, |
|
|
|
readTime: null,//* |
|
|
|
reader: null, |
|
|
|
errorCode: null,//数字+点* |
|
|
|
errorMessage: null, |
|
|
|
retryTimes: null,//数字+点* |
|
|
|
}, |
|
|
|
//新增 |
|
|
|
editFormData: { |
|
|
|
number: null,//数字+点* |
|
|
|
remark: null, |
|
|
|
dataType: null, |
|
|
|
tableType: null,//数字+点* |
|
|
|
dataAction: null,//数字+点* |
|
|
|
effectiveDate: null,//* |
|
|
|
status: null,//数字+点* |
|
|
|
sourceSystem: null, |
|
|
|
sourceDataId: null, |
|
|
|
sourceDataGroupCode: null, |
|
|
|
sourceDataDetailCode: null, |
|
|
|
sourceDataContent: null, |
|
|
|
writeTime: null,//* |
|
|
|
writer: null, |
|
|
|
destinationSystem: null, |
|
|
|
destinationDataId: null, |
|
|
|
destinationDataContent: null, |
|
|
|
readTime: null,//* |
|
|
|
reader: null, |
|
|
|
errorCode: null,//数字+点* |
|
|
|
errorMessage: null, |
|
|
|
retryTimes: null,//数字+点* |
|
|
|
}, |
|
|
|
CreateForm: [ |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.number"), prop: 'number', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsPublic.remark"), prop: 'remark', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.dataType"), prop: 'dataType', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.tableType"), prop: 'tableType', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.dataAction"), prop: 'dataAction', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.effectiveDate"), prop: 'effectiveDate', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.status"), prop: 'status', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceSystem"), prop: 'sourceSystem', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataId"), prop: 'sourceDataId', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataGroupCode"), prop: 'sourceDataGroupCode', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataDetailCode"), prop: 'sourceDataDetailCode', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataContent"), prop: 'sourceDataContent', colSpan: 12, }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.writeTime"), prop: 'writeTime', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.writer"), prop: 'writer', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationSystem"), prop: 'destinationSystem', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataId"), prop: 'destinationDataId', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataContent"), prop: 'destinationDataContent', colSpan: 12, }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.readTime"), prop: 'readTime', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.reader"), prop: 'reader', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.errorCode"), prop: 'errorCode', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.errorMessage"), prop: 'errorMessage', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.retryTimes"), prop: 'retryTimes', colSpan: 12, validType:'pointNumber'}, |
|
|
|
], |
|
|
|
editForm: [ |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.number"), prop: 'number', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsPublic.remark"), prop: 'remark', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.dataType"), prop: 'dataType', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.tableType"), prop: 'tableType', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.dataAction"), prop: 'dataAction', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.effectiveDate"), prop: 'effectiveDate', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.status"), prop: 'status', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceSystem"), prop: 'sourceSystem', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataId"), prop: 'sourceDataId', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataGroupCode"), prop: 'sourceDataGroupCode', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataDetailCode"), prop: 'sourceDataDetailCode', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.sourceDataContent"), prop: 'sourceDataContent', colSpan: 12, }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.writeTime"), prop: 'writeTime', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.writer"), prop: 'writer', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationSystem"), prop: 'destinationSystem', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataId"), prop: 'destinationDataId', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.destinationDataContent"), prop: 'destinationDataContent', colSpan: 12, }, |
|
|
|
{ type: "dateTime", label: _this.$t("ColumsDashboard.readTime"), prop: 'readTime', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.reader"), prop: 'reader', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.errorCode"), prop: 'errorCode', colSpan: 12, validType:'pointNumber' }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.errorMessage"), prop: 'errorMessage', colSpan: 12, }, |
|
|
|
{ type: "input", label: _this.$t("ColumsDashboard.retryTimes"), prop: 'retryTimes', colSpan: 12, validType:'pointNumber'}, |
|
|
|
], |
|
|
|
editOptions: {}, |
|
|
|
editRules: { |
|
|
|
cerateRule: { |
|
|
|
number: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// tableType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// dataAction: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// effectiveDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// status: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// writeTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// readTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// errorCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
// retryTimes: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
}, |
|
|
|
editRule: { |
|
|
|
number: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
tableType: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
dataAction: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
effectiveDate: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
status: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
writeTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
readTime: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
errorCode: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
retryTimes: [{ required: true, trigger: "blur", message: "不可为空" }], |
|
|
|
} |
|
|
|
}, |
|
|
|
}; |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.paging(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
//渲染数据 |
|
|
|
paging(callback) { |
|
|
|
this.Loading.tableLoading = true; |
|
|
|
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|
|
|
dataExchangeFromOut(this.PageListParams) |
|
|
|
.then(result => { |
|
|
|
let res = result.data |
|
|
|
this.tableData = res.items |
|
|
|
this.totalCount = res.totalCount |
|
|
|
this.pagingCallback(callback) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.Loading.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
//渲染数据 |
|
|
|
paging(callback) { |
|
|
|
this.Loading.tableLoading = true; |
|
|
|
this.PageListParams.SkipCount = (this.oldSkipCount - 1) * this.PageListParams.MaxResultCount |
|
|
|
dataExchangeFromOut(this.PageListParams) |
|
|
|
.then(result => { |
|
|
|
let res = result.data |
|
|
|
this.tableData = res.items |
|
|
|
this.totalCount = res.totalCount |
|
|
|
this.pagingCallback(callback) |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.Loading.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
//打开抽屉 |
|
|
|
inlineDialog(val) { |
|
|
|
this.Loading.DrawerLoading = true |
|
|
|
this.displayDialog.detailsDialog = true; |
|
|
|
dataExchangeFromOut(this.PageListParams) |
|
|
|
.then(result => { |
|
|
|
this.propsData = result.data.items.filter(item=>{ |
|
|
|
return item.id == val.id |
|
|
|
})[0] |
|
|
|
this.inlineDialogCallback() |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.Loading.DrawerLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 新增/编辑提交 |
|
|
|
FormSubmit(val){ |
|
|
|
this.Loading.tableLoading = true |
|
|
|
const _data = new URLSearchParams(); |
|
|
|
for(let item in this.CreateFormData){ |
|
|
|
_data.append('ViewModel.'+item.slice(0,1).toUpperCase() +item.slice(1).toLowerCase(), this.CreateFormData[item]) |
|
|
|
} |
|
|
|
// todo:1、接口302 2、token取值的问题 |
|
|
|
_data.append('__RequestVerificationToken',getToken()) |
|
|
|
// this.formReveal为真是新增 |
|
|
|
dataExchangeFromOut_save(_data,this.formReveal) |
|
|
|
.then(result => { |
|
|
|
this.Loading.tableLoading = false |
|
|
|
}) |
|
|
|
.catch(err => { |
|
|
|
this.Loading.tableLoading = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 重载抽屉 删除按钮 |
|
|
|
drawerHandle(val) { |
|
|
|
if (val == 'delete') { |
|
|
|
this.$confirm('此操作将永久删除该消息, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.Loading.appMainLoading = true |
|
|
|
this.displayDialog.detailsDialog = false |
|
|
|
// todo:1、接口302 |
|
|
|
dataExchangeFromOut_delete(this.propsData.id).then(res => { |
|
|
|
this.$successMsg('删除成功!') |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
this.paging() |
|
|
|
}).catch(err => { |
|
|
|
this.Loading.appMainLoading = false |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
//取消操作 |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|