596 lines
15 KiB
Plaintext
596 lines
15 KiB
Plaintext
<template>
|
||
<!-- ECN相关订单查询 -->
|
||
<div class="app-container">
|
||
|
||
|
||
<div class="main">
|
||
<div class="query" ref="query">
|
||
<el-form label-width="100px">
|
||
<el-row>
|
||
|
||
<el-col :span="6">
|
||
<el-form-item label="ECN号">
|
||
<el-input
|
||
v-model="queryParams.ecnNumber"
|
||
placeholder="ECN号"
|
||
clearable
|
||
size="small"
|
||
style="margin-bottom: 1px"
|
||
/>
|
||
</el-form-item>
|
||
</el-col>
|
||
<el-col :span="6">
|
||
<el-form-item>
|
||
<el-button
|
||
type="primary"
|
||
icon="el-icon-search"
|
||
size="mini"
|
||
@click="Query"
|
||
>搜索</el-button
|
||
>
|
||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||
>重置</el-button
|
||
>
|
||
|
||
</el-form-item>
|
||
</el-col>
|
||
</el-row>
|
||
</el-form>
|
||
</div>
|
||
<el-divider></el-divider>
|
||
<div>
|
||
<div>
|
||
<!-- <el-row :gutter="10" class="mb8">
|
||
|
||
<el-popover
|
||
style="float: right"
|
||
placement="bottom-end"
|
||
title="自定义显示列"
|
||
width="250"
|
||
@show="initPopover"
|
||
trigger="hover"
|
||
>
|
||
<headConfig
|
||
ref="test"
|
||
@fathers="fathers"
|
||
:propThis="propThis"
|
||
></headConfig>
|
||
<el-button
|
||
size="mini"
|
||
type="primary"
|
||
class="el-icon-caret-bottom"
|
||
slot="reference"
|
||
>自定义列</el-button
|
||
>
|
||
</el-popover>
|
||
</el-row> -->
|
||
<el-row class="mb8">
|
||
<el-col :span="1.5">
|
||
<el-select
|
||
ref="select"
|
||
@click.native="notSelect"
|
||
style="width: 800px"
|
||
v-model="seqence"
|
||
:multiple="true"
|
||
placeholder=""
|
||
>
|
||
<el-option
|
||
v-for="(item,index) in seqenceOptions"
|
||
:key="index"
|
||
:label="item.label"
|
||
:value="item.value"
|
||
>
|
||
</el-option>
|
||
</el-select>
|
||
</el-col>
|
||
</el-row>
|
||
<el-table
|
||
|
||
@sort-change="sortChange"
|
||
:data="tableData"
|
||
highlight-current-row
|
||
@current-change="handleCurrentChange"
|
||
border
|
||
:height="tableHeight"
|
||
v-loading="loading"
|
||
class="tableStyle"
|
||
>
|
||
<el-table-column
|
||
label="序号"
|
||
type="index"
|
||
align="center"
|
||
>
|
||
</el-table-column>
|
||
<el-table-column
|
||
v-for="(item, index) in realList"
|
||
:sortable="item.notSort == true ? false : `custom`"
|
||
:prop="item.tableProp"
|
||
:key="index"
|
||
:align="item.align"
|
||
header-align="center"
|
||
:min-width="item.width"
|
||
:label="item.tableTitle"
|
||
:show-overflow-tooltip="item.show_overflow_tooltip"
|
||
:formatter="formatter(item.tableProp)"
|
||
>
|
||
</el-table-column>
|
||
</el-table>
|
||
<el-row style="margin-top:20px;">
|
||
{{'共'+this.total+'条'}}
|
||
</el-row>
|
||
<!-- <el-pagination
|
||
style="margin-top: 10px"
|
||
@size-change="handleSizeChange"
|
||
@current-change="handleCurrentChange2"
|
||
:current-page="currentPage"
|
||
:page-sizes="[10, 20, 50, 100, 200, 500, 1000]"
|
||
:page-size="pageSize"
|
||
layout="total, sizes, prev, pager, next, jumper"
|
||
:total="total"
|
||
>
|
||
</el-pagination> -->
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!-- 部署模型对话框 -->
|
||
<el-dialog
|
||
:title="uploadTitle"
|
||
:visible.sync="isUploadShow"
|
||
v-if="isUploadShow"
|
||
width="400px"
|
||
append-to-body
|
||
>
|
||
<el-upload
|
||
ref="upload"
|
||
:limit="1"
|
||
accept=".bpmn, .xml"
|
||
:headers="uploadHeaders"
|
||
:action="upload.url"
|
||
:disabled="upload.isUploading"
|
||
:on-progress="handleFileUploadProgress"
|
||
:on-success="handleFileSuccess"
|
||
:auto-upload="false"
|
||
drag
|
||
>
|
||
<i class="el-icon-upload"></i>
|
||
<div class="el-upload__text">
|
||
将文件拖到此处,或
|
||
<em>点击上传</em>
|
||
</div>
|
||
<div class="el-upload__tip" style="color: red" slot="tip">
|
||
提示:仅允许导入“xls”或“xlsx”格式文件!
|
||
</div>
|
||
|
||
|
||
</el-upload>
|
||
<div slot="footer" class="dialog-footer">
|
||
<el-button type="primary" @click="submitFileForm">确 定</el-button>
|
||
<el-button @click="isUploadShow = false">取 消</el-button>
|
||
</div>
|
||
</el-dialog>
|
||
</div>
|
||
</template>
|
||
|
||
<script>
|
||
import {g_const} from '@/utils/g_const'
|
||
import { getToken } from '@/utils/auth'
|
||
export default {
|
||
name: "fixure",
|
||
components:{
|
||
|
||
},
|
||
props:{
|
||
layerid: {
|
||
type: String,
|
||
default: ''
|
||
},
|
||
ecnNumber: {
|
||
type: String,
|
||
default: ()=>{return ""}
|
||
},
|
||
},
|
||
data() {
|
||
return {
|
||
uploadHeaders:{},
|
||
upload: {
|
||
// 是否显示弹出层(用户导入)
|
||
open: false,
|
||
// 弹出层标题(用户导入)
|
||
title: "",
|
||
// 是否禁用上传
|
||
isUploading: false,
|
||
// 是否更新已经存在的用户数据
|
||
updateSupport: 0,
|
||
// 设置上传的请求头部
|
||
headers:this.uploadHeaders,
|
||
// 上传的地址
|
||
url: [process.env.VUE_APP_BASE_API]+"/basic/activiti6/definition/upload",
|
||
},
|
||
uploadTitle : "部署流程定义",
|
||
isUploadShow:false,
|
||
rules: {
|
||
key: [
|
||
{ required: true, message: 'key不能为空', trigger: 'blur' }
|
||
],
|
||
name: [
|
||
{ required: true, message: '名称不能为空', trigger: 'blur' }
|
||
],
|
||
|
||
},
|
||
addDialogOpen:false,//创建新模型配置对话框是否显示
|
||
isModelerShow:false,
|
||
form:{
|
||
key:"",
|
||
name:"",
|
||
description:""
|
||
},//新模型配置对话框里的表格
|
||
//table格式化
|
||
formatter:(tableProp)=>
|
||
{
|
||
|
||
},
|
||
getRowKeys: (row) => {
|
||
//获取当前行id
|
||
// console.log(row)
|
||
return row.id; //这里看这一行中需要根据哪个属性值是id
|
||
},
|
||
buttonEnableP: true,
|
||
buttonEnableD: true,
|
||
expands: [],
|
||
printInfo: false,
|
||
multipleSelectionTable: [],
|
||
multipleSelection: [],
|
||
childrenList: [],
|
||
childrenStates: [],
|
||
subLoading: false,
|
||
indexShow: false,
|
||
tableHeight: 0,
|
||
showMore: false,
|
||
editNow: false,
|
||
currentRow: null,
|
||
buttonEnable: true,
|
||
List: [],
|
||
realList: [],
|
||
isAdd: null,
|
||
total: null,
|
||
propThis: this,
|
||
pageSize: 10000,
|
||
currentPage: 1,
|
||
tableData: [],
|
||
queryParams: {},
|
||
loading: false,
|
||
warehouseOptions: [],
|
||
seqenceOptions: [],
|
||
seqence: [],
|
||
};
|
||
},
|
||
async mounted() {
|
||
this.uploadHeaders={'Authorization' : 'Bearer ' + getToken()}
|
||
console.log(this.ecnNumber,'1025')
|
||
this.queryParams.ecnNumber=this.ecnNumber
|
||
let tempList = this.$headerConfig.getList("ecnOrder");
|
||
|
||
tempList.forEach((data, index) => {
|
||
if (data.notSort) return;
|
||
let temp = {
|
||
value: null,
|
||
label: null,
|
||
};
|
||
|
||
temp.value = data.tableProp.replace("Show", "") + " ascending";
|
||
temp.label = data.tableTitle + " 升序";
|
||
|
||
this.seqenceOptions.push(temp);
|
||
|
||
let tempD = {
|
||
value: null,
|
||
label: null,
|
||
};
|
||
|
||
tempD.value = data.tableProp.replace("Show", "") + " descending";
|
||
tempD.label = data.tableTitle + " 降序";
|
||
|
||
this.seqenceOptions.push(tempD);
|
||
});
|
||
|
||
this.$nextTick(() => {
|
||
this.tableHeight =
|
||
700 - this.$refs.query.offsetHeight - 200;
|
||
});
|
||
// this.dropDownBoxStatus();
|
||
this.getList();
|
||
const params = {
|
||
tableName: "ecnOrder",
|
||
};
|
||
//调接口
|
||
this.$headerConfig.getRealList(params).then(async (_data) => {
|
||
console.log(data,'d')
|
||
let data=undefined
|
||
if(_data!=undefined)data=_data.config?_data.data:_data
|
||
if (data!=undefined && data.data && data.data.data && data.data.data !== null) {
|
||
let temp = JSON.parse(data.data.data);
|
||
|
||
|
||
this.realList = temp.headerList;
|
||
this.List = temp.List;
|
||
} else {
|
||
this.List = this.$headerConfig.getList("ecnOrder");
|
||
this.realList = this.List;
|
||
let temp = {
|
||
headerList: this.realList,
|
||
List: this.List,
|
||
};
|
||
const params = {
|
||
tableName: "ecnOrder",
|
||
configure: JSON.stringify(temp),
|
||
};
|
||
this.$headerConfig.updateRealList(params).then((value) => {
|
||
console.log(value);
|
||
});
|
||
}
|
||
this.indexShow = true;
|
||
});
|
||
},
|
||
methods: {
|
||
notSelect() {
|
||
this.$refs.select.blur();
|
||
},
|
||
|
||
sortChange({ column, prop, order }) {
|
||
console.log(prop);
|
||
let sTemp = {
|
||
value: null,
|
||
label: null,
|
||
};
|
||
let value = prop.replace("Show", "") + " " + order;
|
||
let judgeValue = value.split(" ");
|
||
// this.seqence.push(value)
|
||
if (this.seqence.length === 0) {
|
||
this.seqence.push(value);
|
||
console.log(this.seqence);
|
||
} else {
|
||
for (let i = 0; i < this.seqence.length; i++) {
|
||
let judgeSeqence = this.seqence[i].split(" ");
|
||
if (judgeValue[0] === judgeSeqence[0]) {
|
||
if (judgeValue[1] === "null") {
|
||
return;
|
||
}
|
||
this.seqence.splice(i, 1, value);
|
||
console.log(this.seqence);
|
||
return;
|
||
}
|
||
if (i + 1 === this.seqence.length) {
|
||
this.seqence.push(value);
|
||
console.log(this.seqence);
|
||
}
|
||
}
|
||
}
|
||
},
|
||
|
||
handleCurrentChange2(val) {
|
||
// this.currentRow = val;
|
||
console.log(val);
|
||
this.currentPage = val;
|
||
this.getList();
|
||
},
|
||
|
||
handleSizeChange(val) {
|
||
this.pageSize = val;
|
||
this.getList();
|
||
},
|
||
|
||
initPopover() {
|
||
const params = {
|
||
tableName: "ecnOrder",
|
||
};
|
||
|
||
this.$refs.test.init();
|
||
},
|
||
fathers(data) {
|
||
this.List = data.configure.List;
|
||
const params = {
|
||
tableName: "ecnOrder",
|
||
configure: JSON.stringify(data.configure),
|
||
};
|
||
|
||
this.realList = data.configure.headerList;
|
||
|
||
this.$headerConfig.updateRealList(params).then((value) => {
|
||
console.log(value);
|
||
});
|
||
},
|
||
|
||
getList() {
|
||
|
||
//获取列表
|
||
this.buttonEnable = true;
|
||
this.loading = true;
|
||
const orders = [];
|
||
this.seqence.map((val) => {
|
||
orders.push(
|
||
val.replace("ascending", "asc").replace("descending", "desc")
|
||
);
|
||
});
|
||
const params = {
|
||
pageSize: this.pageSize,
|
||
pageNum: this.currentPage,
|
||
number: this.queryParams.ecnNumber,
|
||
orders,
|
||
};
|
||
console.log(params,'param666s');
|
||
this.$ecn.getECNProdList(params).then((resp) => {
|
||
|
||
console.log("哈哈哈哈::", resp);
|
||
this.total = resp.data.recordsTotal || resp.data.total || resp.data.data.length || 0;
|
||
console.log(this.total,'total')
|
||
let _tableData = resp.data.data;
|
||
//时间格式转换
|
||
_tableData.forEach((row)=>{
|
||
row.signStatusName=row.signStatus=='0'?'待处理':row.signStatus=='1'?'已处理':'不处理'
|
||
row.signTypeName=row.signType
|
||
})
|
||
this.tableData=_tableData
|
||
this.tableData.map((data) => {
|
||
});
|
||
this.loading = false;
|
||
});
|
||
|
||
},
|
||
arrangeFlowDefine(){
|
||
this.uploadTitle = "部署流程定义";
|
||
this.isUploadShow= true;
|
||
},
|
||
handleDelete() {
|
||
this.$confirm("是否删除?", "提示", {
|
||
confirmButtonText: "确定",
|
||
cancelButtonText: "取消",
|
||
type: "warning",
|
||
})
|
||
.then(() => {
|
||
this.$flowDefine.remove(this.currentRow.deploymentId ).then((data) => {
|
||
if (data.code ==200 || data.data.code === 200) {
|
||
this.$message.success("删除成功");
|
||
this.getList();
|
||
}
|
||
});
|
||
})
|
||
.catch(() => {});
|
||
},
|
||
|
||
|
||
|
||
openDetailAdd() {
|
||
// 创建新模型
|
||
this.addDialogOpen=true
|
||
//this.isModelerShow=true
|
||
|
||
},
|
||
async submitForm()
|
||
//新建对话框 确定按钮点击
|
||
{
|
||
|
||
|
||
},
|
||
async toModel()
|
||
//转模型
|
||
{
|
||
console.log(this.currentRow,'1622')
|
||
let data= await this.$flowDefine.convert2Model(this.currentRow)
|
||
|
||
if (data && (data.code ==200 || data.data.code === 200)) {
|
||
this.$message.success("转换成功");
|
||
this.getList();
|
||
}
|
||
else{ this.$message.error("转换失败");}
|
||
},
|
||
cancel()
|
||
{
|
||
console.log('cancel')
|
||
this.addDialogOpen=false
|
||
},
|
||
closeSubPage(){
|
||
//子页面点击关闭
|
||
this.isModelerShow=false
|
||
},
|
||
Query() {
|
||
console.log(this.queryParams);
|
||
|
||
this.getList();
|
||
},
|
||
|
||
resetQuery() {
|
||
this.queryParams = {};
|
||
this.getList()
|
||
},
|
||
|
||
handleCurrentChange(val) {
|
||
console.log(val);
|
||
this.currentRow = val;
|
||
this.buttonEnable = false;
|
||
this.buttonEnableD = false;
|
||
},
|
||
// 文件上传中处理
|
||
handleFileUploadProgress(event, file, fileList) {
|
||
this.upload.isUploading = true;
|
||
},
|
||
// 文件上传成功处理
|
||
handleFileSuccess(response, file, fileList) {
|
||
this.isUploadShow = false;
|
||
this.upload.isUploading = false;
|
||
this.$refs.upload.clearFiles();
|
||
|
||
this.getList();
|
||
},
|
||
// 提交上传文件
|
||
submitFileForm() {
|
||
this.$refs.upload.submit();
|
||
},
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
},
|
||
watch: {
|
||
seqence: function () {
|
||
this.getList();
|
||
},
|
||
},
|
||
};
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
>>> .el-table__expanded-cell:hover {
|
||
/*padding:20px 0px;*/
|
||
background-color: white !important;
|
||
}
|
||
|
||
>>> .el-table--striped .el-table__body tr.el-table__row--striped.current-row td,
|
||
>>> .el-table__body tr.current-row > td {
|
||
background-color: #8ac1ff !important;
|
||
cursor: pointer;
|
||
}
|
||
|
||
>>> .el-table__body tr:hover > td {
|
||
background-color: #e9edf3;
|
||
cursor: pointer;
|
||
}
|
||
>>> .el-link.el-link--default {
|
||
color: white;
|
||
}
|
||
>>> .el-form-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
.el-divider {
|
||
margin-top: 0px;
|
||
}
|
||
.mb8 >>> .el-select .el-input__inner {
|
||
border: 0px;
|
||
}
|
||
|
||
.mb8 >>> .el-select .el-input__inner {
|
||
border: 0px;
|
||
padding-right: 35px;
|
||
}
|
||
|
||
>>> .el-input__suffix-inner {
|
||
display: none;
|
||
}
|
||
>>> .el-form-item {
|
||
margin-bottom: 10px;
|
||
}
|
||
|
||
.el-divider {
|
||
margin-top: 0px;
|
||
margin-bottom: 5px;
|
||
}
|
||
|
||
>>> .el-table .el-table__header-wrapper th {
|
||
padding: 5px 0;
|
||
}
|
||
</style>
|