第三方业务单据界面样式修改

prod
郑明梁 3 years ago
parent 6f44066cf1
commit 2d2f7a8b8a

@ -1,101 +1,113 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card>
<el-form :inline="true" :model="filterQuery" <el-form :model="filterQuery" size="mini" label-width="100px" v-show="showSearch">
class="query-form" size="mini"> <el-row>
<el-row> <el-col :span="6">
<el-form-item label="单据号:">
<el-input
v-model="filterQuery.billNo"
style="width: 90%"
placeholder="请输入单据号"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="往来单位:">
<el-input
v-model="filterQuery.corpName"
style="width: 90%"
placeholder="请输入往来单位"
clearable
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.billAction" style="width: 90%" placeholder="请选择第三方系统单据类型"
clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName
}}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="单据日期:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
style="width: 90%"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form-item class="query-form-item"> <div class="top-right-btn">
<el-input <el-button-group style="display:flex;">
v-model="filterQuery.billNo" <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
placeholder="请输入单据号" <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
clearable <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
></el-input> </el-button-group>
</el-form-item> </div>
<el-form-item class="query-form-item">
<el-input
v-model="filterQuery.corpName"
placeholder="请输入往来单位"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.thirdSysName
}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px">单据日期:</span>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row <el-divider style="margin: 15px"></el-divider>
@current-change="handleDetail"> <el-table v-loading="loading" :data="list" style="width: 100%" border highlight-current-row
<el-table-column label="序号" type="index" width="60"></el-table-column> @current-change="handleDetail">
<el-table-column label="第三方单据类型" prop="billType"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="第三方单据类型" prop="billType"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"></el-table-column> <el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位" prop="corpName" <el-table-column label="往来单位ID" prop="corpId"></el-table-column>
show-overflow-tooltip="true"></el-table-column> <el-table-column label="往来单位" prop="corpName"
<el-table-column label="单据状态" prop="billFlag"></el-table-column> show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据日期" prop="billdate"></el-table-column> <el-table-column label="单据状态" prop="billFlag"></el-table-column>
<el-table-column label="操作" width="100px"> <el-table-column label="单据日期" prop="billdate"></el-table-column>
<template slot-scope="scope"> <el-table-column label="操作" width="60">
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" <template slot-scope="scope">
>删除 <el-button type="text" @click.native.stop="deleteDialog(scope.row)"
</el-button> >删除
</template> </el-button>
</el-table-column> </template>
</el-table> </el-table-column>
<pagination </el-table>
v-show="total>0" <pagination
:total="total" v-show="total>0"
:page.sync="filterQuery.page" :total="total"
:limit.sync="filterQuery.limit" :page.sync="filterQuery.page"
@pagination="getList" :limit.sync="filterQuery.limit"
/> @pagination="getList"
</el-card> />
<el-card class="el-card"> </el-card>
<el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row> <el-card class="el-card">
<el-table-column label="序号" type="index" width="120"></el-table-column> <el-table v-loading="loading" :data="detailList" style="width: 100%" border highlight-current-row>
<el-table-column label="产品编码" prop="productId"></el-table-column> <el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="产品编码" prop="productId"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> <el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="批次号" prop="batchNo"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column> <el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column> <el-table-column label="生产日期" prop="productDate"></el-table-column>
<!-- <el-table-column label="单据数量" prop="reCount"></el-table-column>--> <el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column> <!-- <el-table-column label="单据数量" prop="reCount"></el-table-column>-->
</el-table> <el-table-column label="单据数量" prop="count"></el-table-column>
</el-card> </el-table>
</div> </el-card>
</div>
</template> </template>
<script> <script>
import {delThrOrders, delAll, downloadAll} from "@/api/thrsys/thrOrder"; import {delThrOrders, delAll, downloadAll} from "@/api/thrsys/thrOrder";
@ -103,321 +115,324 @@ import {getLocalJoinBusType} from "@/api/basic/busLocalType";
import {getOriginBusType} from "@/api/basic/busOriginType"; import {getOriginBusType} from "@/api/basic/busOriginType";
import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys"; import {getBasicThirdSys, filterDetailByKey} from "@/api/basic/basicThirdSys";
import {selectIp} from "@/api/param/systemParamConfig"; import {selectIp} from "@/api/param/systemParamConfig";
import {getCloudErp,getThirdSysOrder} from "@/api/inout/erpOrder"; import {getCloudErp, getThirdSysOrder} from "@/api/inout/erpOrder";
export default { export default {
data() { data() {
return { return {
filterQuery: { showSearch: true,
billAction: null, filterQuery: {
billNo: "", billAction: null,
originType:null, billNo: "",
thirdSysFk: "", originType: null,
page: 1, thirdSysFk: "",
limit: 10, page: 1,
corpName: null, limit: 10,
corpName: null,
},
total: 0,
thirdSys: [],
thirdSysDetail: null,
busTypes: [],
originTypes: [],
list: [],
detailList: [],
uploadFileUrl: null,
fileList: [],
uploadData: {
thirdSys: "thirdId",
},
loading: false,
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
}, },
total: 0, },
thirdSys: [], {
thirdSysDetail: null, text: "最近一个月",
busTypes: [], onClick(picker) {
originTypes:[], const end = new Date();
list: [], const start = new Date();
detailList: [], start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
uploadFileUrl: null, picker.$emit("pick", [start, end]);
fileList: [],
uploadData: {
thirdSys: "thirdId",
}, },
loading: false, },
actDateRange: [], {
pickerOptions: { text: "最近三个月",
shortcuts: [ onClick(picker) {
{ const end = new Date();
text: "最近一周", const start = new Date();
onClick(picker) { start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
const end = new Date(); picker.$emit("pick", [start, end]);
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
}, },
}; },
}, ],
},
methods: { };
onReset() { },
this.$router.push({
path: "",
});
this.filterQuery = {
billNo: "",
thirdSysFk: "",
billFlag: null,
billAction: null,
startDate: null,
endDate: null,
page: 1,
limit: 10,
corpName: null,
};
this.actDateRange = [];
this.getList();
},
getList() { methods: {
if (this.filterQuery.thirdSysFk == null) { onReset() {
this.$message.warning("请先选择第三方系统!") this.$router.push({
return; path: "",
} });
if (this.actDateRange != null) { this.filterQuery = {
this.filterQuery.startDate = this.actDateRange[0]; billNo: "",
this.filterQuery.endDate = this.actDateRange[1]; thirdSysFk: "",
} else { billFlag: null,
this.filterQuery.startDate = null; billAction: null,
this.filterQuery.endDate = null; startDate: null,
} endDate: null,
this.loading = true; page: 1,
getThirdSysOrder(this.filterQuery) limit: 10,
.then((response) => { corpName: null,
if (response.code == 20000) { };
this.list = response.data.list || []; this.actDateRange = [];
this.total = response.data.total || 0; this.getList();
} else { },
this.$message.error(response.message); hideSearch() {
} this.showSearch = !this.showSearch;
this.loading = false; },
}) getList() {
.catch(() => { if (this.filterQuery.thirdSysFk == null) {
this.loading = false; this.$message.warning("请先选择第三方系统!")
this.list = []; return;
this.total = 0; }
}); if (this.actDateRange != null) {
}, this.filterQuery.startDate = this.actDateRange[0];
handleDetail(row) { this.filterQuery.endDate = this.actDateRange[1];
this.detailList = row.subErpOrders; } else {
}, this.filterQuery.startDate = null;
deleteDialog(row) { this.filterQuery.endDate = null;
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", { }
confirmButtonText: "确定", this.loading = true;
cancelButtonText: "取消", getThirdSysOrder(this.filterQuery)
type: "warning", .then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
handleDetail(row) {
this.detailList = row.subErpOrders;
},
deleteDialog(row) {
this.$confirm("此操作将永久删除该单据, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
let dQuery = {
id: row.id,
};
delThrOrders(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
}) })
.then(() => { .catch(() => {
let dQuery = { this.loading = false;
id: row.id, });
};
delThrOrders(dQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
});
}) })
.catch(() => { .catch(() => {
}); });
}, },
clearAll() { clearAll() {
this.$confirm("此操作将清空所有单据, 是否继续?", "提示", { this.$confirm("此操作将清空所有单据, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
})
.then(() => {
delAll()
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
}) })
.then(() => { .catch(() => {
delAll() this.loading = false;
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.$message.success("删除成功");
this.getList();
} else {
this.$message.success(response.message);
}
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
getBasicThirdSys() {
let query = {
enabled: true,
};
getBasicThirdSys(query)
.then((response) => {
this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.selectSysParam();
this.getThirdSysDetail();
this.getBusType();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/pi/upload";
}
}); });
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
}, })
downloadDatas() { .catch(() => {
let query = { });
billAction: this.filterQuery.billAction },
}; getBasicThirdSys() {
downloadAll(query).then((response) => { let query = {
if (response.code == 20000) { enabled: true,
this.$message.success(response.data); };
} else { getBasicThirdSys(query)
this.$message.error(response.message); .then((response) => {
} this.thirdSys = response.data.list || [];
}); this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.selectSysParam();
this.getThirdSysDetail();
this.getBusType();
})
.catch(() => {
this.loading = false;
this.list = [];
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
selectSysParam() {
let query = {
key: "thirdIpUrl",
thirdSysFk: this.filterQuery.thirdSysFk
};
selectIp(query).then((response) => {
if (response.code == 20000) {
this.uploadFileUrl = response.data.thridUrl + "/udiwms/erp/pi/upload";
}
});
},
thirdSysChange() {
this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getThirdSysDetail();
},
getThirdSysDetail() {
let query = {
thirdSysFk: this.filterQuery.thirdSysFk,
key: "orderQueryUrl",
};
filterDetailByKey(query)
.then((response) => {
this.thirdSysDetail = response.data;
})
.catch(() => {
this.loading = false;
this.list = [];
});
}, },
getActionName(action) { downloadDatas() {
for (let i = 0; i < this.busTypes.length; i++) { let query = {
if (this.busTypes[i].action === action) { billAction: this.filterQuery.billAction
return this.busTypes[i].name; };
} downloadAll(query).then((response) => {
} if (response.code == 20000) {
}, this.$message.success(response.data);
} else {
this.$message.error(response.message);
}
});
getlocalName(action) { },
for (let i = 0; i < this.busTypes.length; i++) { getActionName(action) {
if (this.busTypes[i].action === action) { for (let i = 0; i < this.busTypes.length; i++) {
return this.busTypes[i].localName; if (this.busTypes[i].action === action) {
} return this.busTypes[i].name;
} }
}, }
getBusType() { },
let query = {
enabled: true,
};
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.getList();
})
.catch(() => {
});
getOriginBusType(query)
.then((response) => {
this.originTypes = response.data.list || [];
// this.filterQuery.originType = this.originTypes[0].action;
// this.getList();
})
.catch(() => {
});
getlocalName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
return this.busTypes[i].localName;
}
}
},
getBusType() {
let query = {
enabled: true,
};
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.getList();
})
.catch(() => {
});
getOriginBusType(query)
.then((response) => {
this.originTypes = response.data.list || [];
// this.filterQuery.originType = this.originTypes[0].action;
// this.getList();
})
.catch(() => {
});
},
}, },
components: {},
mounted() { },
}, components: {},
created() { mounted() {
this.getBasicThirdSys(); },
let end = new Date(); created() {
let start = new Date(); this.getBasicThirdSys();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); let end = new Date();
this.actDateRange = [start, end]; let start = new Date();
}, start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
},
}; };
</script> </script>
<style scoped> <style scoped>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 25%; width: 25%;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.query-form-item { .query-form-item {
display: block !important; display: block !important;
margin-right: 10px; margin-right: 10px;
margin-bottom: 5px; margin-bottom: 5px;
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,291 +1,298 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.genKey" placeholder="清输入记录ID"></el-input> <el-form-item label="记录ID:">
</el-form-item> <el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="清输入记录ID"></el-input>
<el-form-item> </el-form-item>
<el-button-group style="display:flex;"> </el-col>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> </el-row>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> </el-form>
<el-button type="primary" icon="el-icon-upload2" @click="exportExcel">Excel</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table <div class="top-right-btn">
v-loading="loading" <el-button-group style="display:flex;">
:data="list" <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
style="width: 100%" <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
@selection-change="handleSelectionChange" <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
border highlight-current-row <el-button type="primary" icon="el-icon-upload2" @click="exportExcel">Excel</el-button>
> </el-button-group>
<el-table-column label="序号" type="index"></el-table-column> </div>
<el-table-column <el-divider style="margin: 15px"></el-divider>
label="记录ID"
prop="genKey" <el-table
show-overflow-tooltip v-loading="loading"
></el-table-column> :data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
border highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="更新日期" label="更新日期"
prop="updateTime" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
show-overflow-tooltip show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" width="120">
<template slot-scope="scope">
<el-button
type="text"
@click.native.stop="downloadExcel(scope.row)"
>下载
</el-button
> >
<template slot-scope="scope"> <el-button
<el-tag type="text"
:type="statusFilterType(scope.row.status)" @click.native.stop="deleteDialog(scope.row.id)"
>{{ status[scope.row.status] }} >删除
</el-tag </el-button
>
</template>
</el-table-column>
<el-table-column
label="下载次数"
prop="dlCount"
show-overflow-tooltip
> >
</el-table-column> </template>
<el-table-column label="操作" fixed="right" width="160"> </el-table-column>
<template slot-scope="scope"> </el-table>
<el-button
type="text"
size="small"
@click.native.stop="downloadExcel(scope.row)"
>下载
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-dialog
title="导出业务单据" title="导出业务单据"
:visible.sync="thrOrderSelectVisible" :visible.sync="thrOrderSelectVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="thrOrderSelectVisible" v-if="thrOrderSelectVisible"
> >
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrOrderSelect> ></thrOrderSelect>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "@/api/thrsys/thrOrderExport"; import {filterLog, deleteLog} from "@/api/thrsys/thrOrderExport";
import thrOrderSelect from "./thrOrderSelect"; import thrOrderSelect from "./thrOrderSelect";
import axios from "axios"; import axios from "axios";
import {formatDate} from "@/utils/date"; import {formatDate} from "@/utils/date";
export default { export default {
data() { data() {
return { return {
filterQuery: { showSearch: true,
type: 1, filterQuery: {
genKey: null, type: 1,
status: null, genKey: null,
fromType: null, status: null,
page: 1, fromType: null,
limit: 20, page: 1,
thirdSysFk: null, limit: 20,
}, thirdSysFk: null,
selectType: 0, },
thrOrderSelectVisible: false, selectType: 0,
list: [], thrOrderSelectVisible: false,
detailList: [], list: [],
thirdSys: [], detailList: [],
thirdSysDetail: null, thirdSys: [],
total: 0, thirdSysDetail: null,
editQuery: null, total: 0,
fromStatus: { editQuery: null,
0: "产品信息", fromStatus: {
1: "库存信息", 0: "产品信息",
2: "异常第三方上传" 1: "库存信息",
}, 2: "异常第三方上传"
status: { },
0: "等待处理", status: {
1: "正在处理", 0: "等待处理",
2: "处理异常", 1: "正在处理",
3: "处理完成" 2: "处理异常",
}, 3: "处理完成"
uploadFileUrl: null, },
uploadData: { uploadFileUrl: null,
thirdSys: "thirdId", uploadData: {
}, thirdSys: "thirdId",
}; },
}, };
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
fromType: null, fromType: null,
genKey: null, genKey: null,
status: null, status: null,
page: 1, page: 1,
type: 1, type: 1,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}; };
this.getList(); this.getList();
}, },
getList() { hideSearch() {
this.loading = true; this.showSearch = !this.showSearch;
filterLog(this.filterQuery) },
.then((response) => { getList() {
if (response.code == 20000) { this.loading = true;
this.list = response.data.list || []; filterLog(this.filterQuery)
this.total = response.data.total || 0; .then((response) => {
} else { if (response.code == 20000) {
this.$message.error(response.message); this.list = response.data.list || [];
} this.total = response.data.total || 0;
this.loading = false; } else {
}) this.$message.error(response.message);
.catch(() => { }
this.loading = false; this.loading = false;
this.list = []; })
this.total = 0; .catch(() => {
}); this.loading = false;
}, this.list = [];
this.total = 0;
});
},
exportExcel() { exportExcel() {
this.selectType = 0; this.selectType = 0;
this.thrOrderSelectVisible = true; this.thrOrderSelectVisible = true;
}, },
uploadSmp() { uploadSmp() {
this.selectType = 1; this.selectType = 1;
this.thrOrderSelectVisible = true; this.thrOrderSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
axios.get("./config.json").then(res => { axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL; let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/thrOrder/exportLog/download" + "?genKey=" + row.genKey; let href = baseUrl + "/udiwms/thrOrder/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
var timestamp = formatDate(new Date(), "yyyyMMddhhmmss") var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
fetch(href) fetch(href)
.then((res) => res.blob()) .then((res) => res.blob())
.then((blob) => { .then((blob) => {
a.href = URL.createObjectURL(blob); a.href = URL.createObjectURL(blob);
console.log(a.href); console.log(a.href);
a.download = "ThirdOrder_" + timestamp + ".UpperIn"; a.download = "ThirdOrder_" + timestamp + ".UpperIn";
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
this.getList(); this.getList();
}); });
}); });
}, },
cancelDialog(val) { cancelDialog(val) {
if (val) { if (val) {
this.getList(); this.getList();
} }
this.thrOrderSelectVisible = false; this.thrOrderSelectVisible = false;
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", { this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let dQuery = { let dQuery = {
id: rowId, id: rowId,
}; };
deleteLog(dQuery) deleteLog(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {
}); });
}, },
handleChange(response, files, fileList) { handleChange(response, files, fileList) {
console.log(response); console.log(response);
if (response.code != 20000) { if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
} else { } else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!"); this.$message.success("文件上传成功,请稍后刷新查看!");
} }
}, },
statusFilterType(status) { statusFilterType(status) {
const statusMap = { const statusMap = {
0: "warning", 0: "warning",
1: "warning", 1: "warning",
2: "danger", 2: "danger",
3: "success", 3: "success",
}; };
return statusMap[status]; return statusMap[status];
}, },
}, },
mounted() { mounted() {
}, },
components: {thrOrderSelect}, components: {thrOrderSelect},
created() { created() {
// this.getBasicThirdSys(); // this.getBasicThirdSys();
this.getList(); this.getList();
}, },
}; };
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,102 +1,99 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.genKey" placeholder="请输入记录ID"></el-input> <el-form-item label="记录ID:">
</el-form-item> <el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
<el-form-item> </el-form-item>
<el-button-group style="display:flex;"> </el-col>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> </el-row>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> </el-form>
<!--<el-button type="primary" icon="search" @click="exportExcel">Excel</el-button>-->
<el-button type="primary" icon="search" @click="uploadSmp"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table <div class="top-right-btn">
v-loading="loading" <el-button-group style="display:flex;">
:data="list" <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
style="width: 100%" <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
@selection-change="handleSelectionChange" <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
border highlight-current-row <el-button type="primary" icon="el-icon-share" @click="uploadSmp"></el-button>
> </el-button-group>
<el-table-column label="序号" type="index"></el-table-column> </div>
<el-table-column <el-divider style="margin: 15px"></el-divider>
label="记录ID"
prop="genKey" <el-table
show-overflow-tooltip v-loading="loading"
></el-table-column> :data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
border highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="记录ID"
prop="genKey"
show-overflow-tooltip
></el-table-column>
<el-table-column <el-table-column
label="更新日期" label="更新日期"
prop="updateTime" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
show-overflow-tooltip show-overflow-tooltip
>
<template slot-scope="scope">
<el-tag
:type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }}
</el-tag
> >
<template slot-scope="scope"> </template>
<el-tag </el-table-column>
:type="statusFilterType(scope.row.status)" <el-table-column
>{{ status[scope.row.status] }} label="下载次数"
</el-tag prop="dlCount"
> show-overflow-tooltip
</template> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column label="操作" width="60">
label="下载次数" <template slot-scope="scope">
prop="dlCount" <el-button
show-overflow-tooltip type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
> >
</el-table-column> </template>
<el-table-column label="操作" fixed="right" width="160"> </el-table-column>
<template slot-scope="scope"> </el-table>
<!--<el-button-->
<!--type="text"-->
<!--size="small"-->
<!--@click.native.stop="downloadExcel(scope.row)"-->
<!--&gt;下载-->
<!--</el-button-->
<!--&gt;-->
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-dialog <el-dialog
title="导出业务单据" title="导出业务单据"
:visible.sync="thrOrderSelectVisible" :visible.sync="thrOrderSelectVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
width="85%" width="80%"
v-if="thrOrderSelectVisible" v-if="thrOrderSelectVisible"
> >
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></thrOrderSelect> ></thrOrderSelect>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
:total="total" :total="total"
:page.sync="filterQuery.page" :page.sync="filterQuery.page"
:limit.sync="filterQuery.limit" :limit.sync="filterQuery.limit"
@pagination="getList" @pagination="getList"
/> />
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
@ -104,197 +101,201 @@ import {filterLog, deleteLog} from "@/api/thrsys/thrOrderExport";
import thrOrderSelect from "./thrOrderSelect"; import thrOrderSelect from "./thrOrderSelect";
export default { export default {
data() { data() {
return { return {
filterQuery: { showSearch: true,
genKey: null, filterQuery: {
status: null, genKey: null,
fromType: null, status: null,
page: 1, fromType: null,
limit: 20, page: 1,
type: 2, limit: 20,
thirdSysFk: null, type: 2,
}, thirdSysFk: null,
loading: false, },
selectType: 0, loading: false,
thrOrderSelectVisible: false, selectType: 0,
list: [], thrOrderSelectVisible: false,
detailList: [], list: [],
thirdSys: [], detailList: [],
thirdSysDetail: null, thirdSys: [],
total: 0, thirdSysDetail: null,
editQuery: null, total: 0,
fromStatus: { editQuery: null,
0: "产品信息", fromStatus: {
1: "库存信息", 0: "产品信息",
2: "异常第三方上传" 1: "库存信息",
}, 2: "异常第三方上传"
status: { },
0: "等待处理", status: {
1: "正在处理", 0: "等待处理",
2: "处理异常", 1: "正在处理",
3: "处理完成" 2: "处理异常",
}, 3: "处理完成"
uploadFileUrl: null, },
uploadData: { uploadFileUrl: null,
thirdSys: "thirdId", uploadData: {
}, thirdSys: "thirdId",
}; },
}, };
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
fromType: null, fromType: null,
genKey: null, genKey: null,
status: null, status: null,
page: 1, page: 1,
type: 2, type: 2,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}; };
this.getList(); this.getList();
}, },
getList() { hideSearch() {
this.loading = true; this.showSearch = !this.showSearch;
filterLog(this.filterQuery) },
.then((response) => { getList() {
if (response.code == 20000) { this.loading = true;
this.list = response.data.list || []; filterLog(this.filterQuery)
this.total = response.data.total || 0; .then((response) => {
} else { if (response.code == 20000) {
this.$message.error(response.message); this.list = response.data.list || [];
} this.total = response.data.total || 0;
this.loading = false; } else {
}) this.$message.error(response.message);
.catch(() => { }
this.loading = false; this.loading = false;
this.list = []; })
this.total = 0; .catch(() => {
}); this.loading = false;
}, this.list = [];
this.total = 0;
});
},
exportExcel() { exportExcel() {
this.selectType = 0; this.selectType = 0;
this.thrOrderSelectVisible = true; this.thrOrderSelectVisible = true;
}, },
uploadSmp() { uploadSmp() {
this.selectType = 1; this.selectType = 1;
this.thrOrderSelectVisible = true; this.thrOrderSelectVisible = true;
}, },
downloadExcel(row) { downloadExcel(row) {
let href = let href =
"http://127.0.0.1:9991" + "http://127.0.0.1:9991" +
"/udiwms/thrOrder/exportLog/download" + "/udiwms/thrOrder/exportLog/download" +
"?genKey=" + row.genKey; "?genKey=" + row.genKey;
let a = document.createElement("a"); let a = document.createElement("a");
fetch(href) fetch(href)
.then((res) => res.blob()) .then((res) => res.blob())
.then((blob) => { .then((blob) => {
// blob // blob
a.href = URL.createObjectURL(blob); a.href = URL.createObjectURL(blob);
console.log(a.href); console.log(a.href);
// a.download = ""; // // a.download = ""; //
a.download = a.download =
row.filePath.split("/")[ row.filePath.split("/")[
row.filePath.split("/").length - 1 row.filePath.split("/").length - 1
]; // // ]; // //
document.body.appendChild(a); document.body.appendChild(a);
a.click(); a.click();
this.getList(); this.getList();
}); });
// a.setAttribute("download", ""); // a.setAttribute("download", "");
// a.setAttribute("href", href); // a.setAttribute("href", href);
// a.click(); // a.click();
// window.open(mOrder.exportFilePath); // window.open(mOrder.exportFilePath);
}, },
cancelDialog(val) { cancelDialog(val) {
if (val) { if (val) {
this.getList(); this.getList();
} }
this.thrOrderSelectVisible = false; this.thrOrderSelectVisible = false;
}, },
deleteDialog(rowId) { deleteDialog(rowId) {
this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", { this.$confirm("此操作将删除该往来单位信息, 是否继续?", "提示", {
confirmButtonText: "确定", confirmButtonText: "确定",
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let dQuery = { let dQuery = {
id: rowId, id: rowId,
}; };
deleteLog(dQuery) deleteLog(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
} else { } else {
this.$message.error(response.message);
}
this.getList();
})
.catch(() => {
this.loading = false;
});
})
.catch(() => {
});
},
handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message); this.$message.error(response.message);
} else { }
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]); this.getList();
this.$message.success("文件上传成功,请稍后刷新查看!"); })
} .catch(() => {
}, this.loading = false;
statusFilterType(status) { });
const statusMap = { })
0: "warning", .catch(() => {
1: "warning", });
2: "danger",
3: "success",
};
return statusMap[status];
},
}, },
mounted() { handleChange(response, files, fileList) {
console.log(response);
if (response.code != 20000) {
this.$message.error(response.message);
} else {
console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.$message.success("文件上传成功,请稍后刷新查看!");
}
}, },
components: {thrOrderSelect}, statusFilterType(status) {
created() { const statusMap = {
// this.getBasicThirdSys(); 0: "warning",
this.getList(); 1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}, },
},
mounted() {
},
components: {thrOrderSelect},
created() {
// this.getBasicThirdSys();
this.getList();
},
}; };
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

@ -1,155 +1,158 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.genKey" placeholder="请输入记录ID"></el-input> <el-form-item label="记录ID:">
</el-form-item> <el-input v-model="filterQuery.genKey" style="width: 90%" placeholder="请输入记录ID"></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="处理状态:">
<el-select v-model="filterQuery.status" style="width: 90%" placeholder="请选择处理状态">
<el-option label="全部" value=""></el-option>
<el-option label="处理中" value="0"></el-option>
<el-option label="已处理" value="1"></el-option>
<el-option label="异常" value="2"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="外部系统:">
<el-select v-model="filterQuery.thirdSysFk" style="width: 90%" placeholder="请选择第三方系统"
@change="sysChange">
<el-option
v-for="item in thirdSys"
:key="item.value"
:label="item.thirdName"
:value="item.thirdId">
<span style="float: left">{{ item.thirdName }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form-item class="query-form-item"> <div class="top-right-btn">
<el-select v-model="filterQuery.status" placeholder="请选择处理状态"> <el-button-group style="display:flex;">
<el-option label="全部" value=""></el-option> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-option label="处理中" value="0"></el-option> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-option label="已处理" value="1"></el-option> <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-option label="异常" value="2"></el-option> <el-upload
</el-select> :action="uploadFileUrl"
</el-form-item> multiple
:limit="1"
<el-form-item class="query-form-item"> :data="uploadData"
<el-select v-model="filterQuery.thirdSysFk" placeholder="请选择第三方系统" @change="sysChange"> :show-file-list="false"
<el-option :on-success="handleChange"
v-for="item in thirdSys" v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1"
:key="item.value" :file-list="fileList"
:label="item.thirdName" >
:value="item.thirdId"> <el-button icon="el-icon-bottom-right" type="primary">导入业务单据</el-button>
<span style="float: left">{{ item.thirdName }}</span> </el-upload>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.thirdId }}</span> <el-button type="primary" icon="el-icon-download" @click="downloadOrderss"
</el-option> v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
</el-select> 下载业务单据
</el-form-item> </el-button>
</el-button-group>
<el-form-item> </div>
<el-button-group style="display:flex;"> <el-divider style="margin: 15px"></el-divider>
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-table
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
<el-upload
:action="uploadFileUrl"
multiple
:limit="1"
:data="uploadData"
:show-file-list="false"
:on-success="handleChange"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1"
:file-list="fileList"
>
<el-button size="mini" type="primary">导入业务单据</el-button>
</el-upload>
<!-- <el-button type="primary" icon="search" @click="jumpDl"-->
<!-- v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==1">模板下载-->
<!-- </el-button>-->
<el-button type="primary" icon="el-icon-download" @click="downloadOrderss"
v-if="this.thirdSysDetail.enabled && this.thirdSysDetail.fromType==3">
下载业务单据
</el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
border highlight-current-row border highlight-current-row
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="记录ID" label="记录ID"
prop="genKey" prop="genKey"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="来源" label="来源"
prop="fromType" prop="fromType"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="更新日期" label="更新日期"
prop="updateTime" prop="updateTime"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="来源系统" label="来源系统"
prop="thirdSysFk" prop="thirdSysFk"
:formatter="formatterThirdSys" :formatter="formatterThirdSys"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="状态" label="状态"
prop="status" prop="status"
show-overflow-tooltip show-overflow-tooltip
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag <el-tag
:type="statusFilterType(scope.row.status)" :type="statusFilterType(scope.row.status)"
>{{ status[scope.row.status] }} >{{ status[scope.row.status] }}
</el-tag </el-tag
> >
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="备注" label="备注"
prop="remark" prop="remark"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column label="操作" fixed="right" width="160"> <el-table-column label="操作" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="handleDetailClick(scope.row)" @click.native.stop="handleDetailClick(scope.row)"
>详情 >详情
</el-button </el-button
> >
<el-button <el-button
type="text" type="text"
size="small" size="small"
@click.native.stop="deleteDialog(scope.row.id)" @click.native.stop="deleteDialog(scope.row.id)"
>删除 >删除
</el-button </el-button
> >
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-dialog <el-dialog
title="导入订单详情" title="导入订单详情"
:visible.sync="udiImportDetailVisible" :visible.sync="udiImportDetailVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="udiImportDetailVisible" v-if="udiImportDetailVisible"
> >
<thrOrderImportDetail <thrOrderImportDetail
:currentRow="currentRow" :currentRow="currentRow"
></thrOrderImportDetail> ></thrOrderImportDetail>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="下载业务单据" title="下载业务单据"
:visible.sync="thrOrderSelectVisible" :visible.sync="thrOrderSelectVisible"
width="85%" width="80%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="thrOrderSelectVisible" v-if="thrOrderSelectVisible"
> >
<thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" :isDownThrSys="true" <thrOrderSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" :isDownThrSys="true"
></thrOrderSelect> ></thrOrderSelect>
</el-dialog> </el-dialog>
<pagination <pagination
v-show="total>0" v-show="total>0"
@ -175,6 +178,7 @@ import {selectIp} from "@/api/param/systemParamConfig";
export default { export default {
data() { data() {
return { return {
showSearch: true,
filterQuery: { filterQuery: {
genKey: null, genKey: null,
status: null, status: null,
@ -229,23 +233,26 @@ export default {
}; };
this.getList(); this.getList();
}, },
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() { getList() {
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.loading = false; this.loading = false;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
handleDetailClick(row) { handleDetailClick(row) {
@ -276,44 +283,44 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}) })
.then(() => { .then(() => {
let dQuery = { let dQuery = {
id: rowId, id: rowId,
}; };
deleteLog(dQuery) deleteLog(dQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code == 20000) { if (response.code == 20000) {
this.$message.success("删除成功"); this.$message.success("删除成功");
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
this.getList(); this.getList();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}); });
}) })
.catch(() => { .catch(() => {
}); });
}, },
getBasicThirdSys() { getBasicThirdSys() {
let query = { let query = {
enabled: true, enabled: true,
}; };
getBasicThirdSys(query) getBasicThirdSys(query)
.then((response) => { .then((response) => {
this.thirdSys = response.data.list || []; this.thirdSys = response.data.list || [];
this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId; this.filterQuery.thirdSysFk = this.thirdSys[0].thirdId;
this.uploadData.thirdSys = this.filterQuery.thirdSysFk; this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
this.getList(); this.getList();
this.getThirdSysDetail(); this.getThirdSysDetail();
this.selectSysParam(); this.selectSysParam();
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
axios.get("./config.json").then(res => { axios.get("./config.json").then(res => {
// //
let response = res.data.BASE_URL; let response = res.data.BASE_URL;
@ -371,13 +378,13 @@ export default {
key: "orderQueryUrl", key: "orderQueryUrl",
}; };
filterDetailByKey(query) filterDetailByKey(query)
.then((response) => { .then((response) => {
this.thirdSysDetail = response.data; this.thirdSysDetail = response.data;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
}); });
this.uploadData.thirdSys = this.filterQuery.thirdSysFk; this.uploadData.thirdSys = this.filterQuery.thirdSysFk;
}, },
@ -412,12 +419,12 @@ export default {
enabled: true, enabled: true,
}; };
getBussinessType(query) getBussinessType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action; this.filterQuery.billAction = this.busTypes[0].action;
}) })
.catch(() => { .catch(() => {
}); });
}, },
formatter(row, index) { formatter(row, index) {
if (row.isE == true) { if (row.isE == true) {

@ -1,164 +1,171 @@
<template> <template>
<div> <div>
<el-card> <el-card>
<el-form :inline="true" :model="query" size="mini"> <el-form :model="query" size="mini" label-width="100px" v-show="showSearch">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input v-model="filterQuery.billNo" placeholder="请输入UDI编码"></el-input> <el-form-item label="UDI编码:">
</el-form-item> <el-input v-model="filterQuery.billNo" style="width: 90%" placeholder="请输入UDI编码"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
<el-form-item> <div class="top-right-btn">
<el-button-group style="display:flex;"> <el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button> <el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button type="primary" icon="el-icon-search" @click="getList"></el-button> <el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
</el-button-group> <el-button type="primary" icon="el-icon-search" @click="getList"></el-button>
</el-form-item> </el-button-group>
</el-row> </div>
</el-form> <el-divider style="margin: 15px"></el-divider>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
border highlight-current-row
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId"
show-overflow-tooltip="true"></el-table-column>
<el-table-column label="往来单位" prop="corpName"
show-overflow-tooltip="true"></el-table-column>
<el-table <el-table-column label="扫码单据类型" prop="billType">
v-loading="loading" </el-table-column>
:data="list" <el-table-column label="单据状态" prop="billFlag" width="80" show-overflow-tooltip="true"></el-table-column>
style="width: 100%" <el-table-column label="单据日期" prop="billdate" show-overflow-tooltip="true"></el-table-column>
border highlight-current-row <el-table-column label="产品编码" prop="productId" show-overflow-tooltip="true"></el-table-column>
> <el-table-column label="产品名称" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="批次号" prop="batchNo" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="往来单位ID" prop="corpId" <el-table-column label="生产日期" prop="productDate" show-overflow-tooltip="true"></el-table-column>
show-overflow-tooltip="true"></el-table-column> <el-table-column label="失效日期" prop="expireDate" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="往来单位" prop="corpName" <el-table-column label="单据数量" prop="reCount" show-overflow-tooltip="true"></el-table-column>
show-overflow-tooltip="true"></el-table-column> <el-table-column label="实际数量" prop="count" show-overflow-tooltip="true"></el-table-column>
</el-table>
<el-table-column label="扫码单据类型" prop="billType"> <pagination
</el-table-column> v-show="total>0"
<el-table-column label="单据状态" prop="billFlag" width="80" show-overflow-tooltip="true"></el-table-column> :total="total"
<el-table-column label="单据日期" prop="billdate" show-overflow-tooltip="true"></el-table-column> :page.sync="filterQuery.page"
<el-table-column label="产品编码" prop="productId" show-overflow-tooltip="true"></el-table-column> :limit.sync="filterQuery.limit"
<el-table-column label="产品名称" prop="productName" show-overflow-tooltip="true"></el-table-column> @pagination="getList"
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></el-table-column> />
<el-table-column label="批次号" prop="batchNo" show-overflow-tooltip="true"></el-table-column> </el-card>
<el-table-column label="生产日期" prop="productDate" show-overflow-tooltip="true"></el-table-column> </div>
<el-table-column label="失效日期" prop="expireDate" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据数量" prop="reCount" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="实际数量" prop="count" show-overflow-tooltip="true"></el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="filterQuery.page"
:limit.sync="filterQuery.limit"
@pagination="getList"
/>
</el-card>
</div>
</template> </template>
<script> <script>
import { import {
filterDetail, filterDetail,
} from "@/api/thrsys/thrOrderImport"; } from "@/api/thrsys/thrOrderImport";
export default {
name: "ThrOrderImportDetail",
props: {
currentRow: {
type: Object,
required: true,
},
}, export default {
data() { name: "ThrOrderImportDetail",
return { props: {
filterQuery: { currentRow: {
genKey: null, type: Object,
billNo: null, required: true,
status: null, },
page: 1,
limit: 10,
},
list: [],
detailList: [],
total: 0,
status: {
0: "未处理",
1: "处理失败",
2: "处理成功"
},
};
},
methods: { },
onReset() { data() {
this.$router.push({ return {
path: "", showSearch: true,
}); filterQuery: {
this.filterQuery = { genKey: null,
genKey: null, billNo: null,
billNo: null, status: null,
status: null, page: 1,
page: 1, limit: 10,
limit: 10, },
}; list: [],
this.getList(); detailList: [],
}, total: 0,
getList() { status: {
this.loading = true; 0: "未处理",
console.log(" this.genKey = " + this.currentRow) 1: "处理失败",
this.filterQuery.genKey = this.currentRow.genKey; 2: "处理成功"
filterDetail(this.filterQuery) },
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
}else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "danger",
2: "success",
};
return statusMap[status];
},
},
mounted() {
},
created() {
this.getList();
},
filters: {},
}; };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
genKey: null,
billNo: null,
status: null,
page: 1,
limit: 10,
};
this.getList();
},
hideSearch() {
this.showSearch = !this.showSearch;
},
getList() {
this.loading = true;
console.log(" this.genKey = " + this.currentRow)
this.filterQuery.genKey = this.currentRow.genKey;
filterDetail(this.filterQuery)
.then((response) => {
if (response.code == 20000) {
this.list = response.data.list || [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
this.loading = false;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "danger",
2: "success",
};
return statusMap[status];
},
},
mounted() {
},
created() {
this.getList();
},
filters: {},
};
</script> </script>
<style> <style>
.itemTag { .itemTag {
float: left; float: left;
text-align: left; text-align: left;
margin-top: 10px; margin-top: 10px;
width: 100px; width: 100px;
} }
.text { .text {
font-size: 13px; font-size: 13px;
font-family: "Microsoft YaHei"; font-family: "Microsoft YaHei";
} }
.el-row { .el-row {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
} }
.el-col { .el-col {
border-radius: 4px; border-radius: 4px;
flex-wrap: wrap; flex-wrap: wrap;
} }
</style> </style>

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save