代码备份
parent
df5cd2a722
commit
49523db144
@ -1,3 +1,3 @@
|
||||
VUE_APP_API_BASE=http://192.168.31.140:9998
|
||||
UDI_SYNC_SERVER_IP= http://127.0.0.1:9995/
|
||||
template=./public/index-dev.html
|
||||
outputDir=serve
|
||||
|
@ -1,3 +1,3 @@
|
||||
VUE_APP_API_BASE=http://127.0.0.1:8080/glxp_warehous/
|
||||
UDI_SYNC_SERVER_IP= http://127.0.0.1:9995/
|
||||
template=./public/index.html
|
||||
outputDir=UDI_WMS_Client
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,44 +1,44 @@
|
||||
{
|
||||
"name": "my-project",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"stage": "vue-cli-service build --mode stage",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.18.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"element-ui": "^2.8.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-cookie": "^2.2.0",
|
||||
"mockjs": "^1.0.1-beta3",
|
||||
"node-sass": "^6.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinyin": "^2.10.2",
|
||||
"vue": "^2.5.16",
|
||||
"vue-router": "^3.0.1",
|
||||
"vuedraggable": "^2.17.0",
|
||||
"vuex": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.0.0-beta.15",
|
||||
"@vue/cli-plugin-eslint": "^3.0.0-beta.15",
|
||||
"@vue/cli-plugin-unit-jest": "^3.0.0-beta.15",
|
||||
"@vue/cli-service": "^3.0.0-beta.15",
|
||||
"@vue/eslint-config-prettier": "^3.0.0-rc.3",
|
||||
"@vue/test-utils": "^1.0.0-beta.16",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-jest": "^23.0.1",
|
||||
"sass-loader": "^7.0.1",
|
||||
"vue-template-compiler": "^2.5.16"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
"name": "my-project",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve",
|
||||
"stage": "vue-cli-service build --mode stage",
|
||||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.23.0",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"element-ui": "^2.15.7",
|
||||
"file-saver": "^2.0.5",
|
||||
"js-cookie": "^2.2.0",
|
||||
"mockjs": "^1.0.1-beta3",
|
||||
"node-sass": "^6.0.1",
|
||||
"nprogress": "^0.2.0",
|
||||
"pinyin": "^2.10.2",
|
||||
"vue": "2.5.16",
|
||||
"vue-router": "^3.0.1",
|
||||
"vuedraggable": "^2.17.0",
|
||||
"vuex": "^3.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^3.0.0-beta.15",
|
||||
"@vue/cli-plugin-eslint": "^3.0.0-beta.15",
|
||||
"@vue/cli-plugin-unit-jest": "^3.0.0-beta.15",
|
||||
"@vue/cli-service": "^3.0.0-beta.15",
|
||||
"@vue/eslint-config-prettier": "^3.0.0-rc.3",
|
||||
"@vue/test-utils": "^1.0.0-beta.16",
|
||||
"babel-core": "7.0.0-bridge.0",
|
||||
"babel-jest": "^23.0.1",
|
||||
"sass-loader": "^7.0.1",
|
||||
"vue-template-compiler": "latest"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions",
|
||||
"not ie <= 8"
|
||||
]
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"BASE_URL":"http://127.0.0.1:9991",
|
||||
"SERVER_IP": "http://127.0.0.1:9991/",
|
||||
"UDI_SYNC_SERVER_IP": "http://127.0.0.1:9995/",
|
||||
"BASE_URL2": "ws://127.0.0.1:9991/api/websocket/"
|
||||
"UDI_SYNC_SERVER_IP": "http://192.168.0.109:9995/",
|
||||
"BASE_URL":"http://192.168.0.109:9991/",
|
||||
"SERVER_IP": "http://192.168.0.109:9991/",
|
||||
"WEBSOCKET_URL": "ws://192.168.0.109:9991/UDI_WMS_MC/api/websocket/"
|
||||
}
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1,36 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
export function getChangeBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/bussinessChangeType/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function addChangeBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/bussinessChangeType/insert",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function deleteChangeBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/bussinessChangeType/delete",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
||||
export function updateChangeBusType(query) {
|
||||
return axios({
|
||||
url: "/spms/bussinessChangeType/update",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,18 @@
|
||||
import axios from "../../utils/axios2";
|
||||
|
||||
export function filterLogs(query) {
|
||||
return axios({
|
||||
url: "/udisync/udi/importLog/filter",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
export function deleteLog(query) {
|
||||
return axios({
|
||||
url: "/udisync/udi/importLog/deleteLog",
|
||||
method: "post",
|
||||
data: query
|
||||
});
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
import axios from "../../utils/axios";
|
||||
|
||||
|
||||
export function filterTrace(query) {
|
||||
return axios({
|
||||
url: "/spms/inv/products/trace",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
||||
export function filterOrderTrace(query) {
|
||||
return axios({
|
||||
url: "/spms/inv/products/order/trace",
|
||||
method: "get",
|
||||
params: query
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,153 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>单据类型名称: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
:disabled="true"
|
||||
v-model="inputQuery.name"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>单据类型代码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="inputQuery.action"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>第三方系统: </span>
|
||||
</div>
|
||||
<el-select v-model="inputQuery.thirdSys" placeholder="请选择" clearable="true">
|
||||
<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>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="10" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>备注: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 200px"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="inputQuery.remark"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-divider></el-divider>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {
|
||||
getBasicThirdSys,
|
||||
} from "../../api/basic/basicThirdSys";
|
||||
|
||||
import {
|
||||
getLocalBusType,
|
||||
} from "../../api/basic/busLocalType";
|
||||
|
||||
export default {
|
||||
name: "inputQuery",
|
||||
props: {
|
||||
inputQuery: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
enabled: true,
|
||||
isBuType: true,
|
||||
},
|
||||
thirdSys: [],
|
||||
localTypes: [],
|
||||
|
||||
value: "",
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
getBasicThirdSys(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.thirdSys = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
});
|
||||
getLocalBusType(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.localTypes = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.localTypes = [];
|
||||
});
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,293 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
||||
<el-row>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.status" 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-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="search" @click="getList">查询</el-button>
|
||||
<el-upload
|
||||
:action="uploadFileUrl"
|
||||
multiple
|
||||
:limit="1"
|
||||
:data="uploadData"
|
||||
:show-file-list="false"
|
||||
:on-success="handleChange"
|
||||
:on-exceed="handleExceed"
|
||||
:before-upload="handleBefore"
|
||||
>
|
||||
<el-button size="mini" type="primary">导入器械信息</el-button>
|
||||
</el-upload>
|
||||
|
||||
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
>
|
||||
<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
|
||||
label="来源"
|
||||
prop="fromType"
|
||||
show-overflow-tooltip
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="更新日期"
|
||||
prop="updateTime"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="文件名称"
|
||||
prop="fileName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="状态"
|
||||
prop="status"
|
||||
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="操作" fixed="right" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row.id)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import {filterLogs, deleteLog} from "../../api/basic/udidb";
|
||||
|
||||
|
||||
import udiInfoImportDetail from "./UdiInfoImportDetail";
|
||||
import axios from "axios";
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
genKey: null,
|
||||
status: null,
|
||||
fromType: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
udiImportDetailVisible: false,
|
||||
checked: false,
|
||||
list: [],
|
||||
detailList: [],
|
||||
thirdSys: [],
|
||||
thirdSysDetail: null,
|
||||
total: 0,
|
||||
currentRow: null,
|
||||
editQuery: null,
|
||||
fromStatus: {
|
||||
0: "产品信息",
|
||||
1: "库存信息",
|
||||
2: "异常第三方上传"
|
||||
},
|
||||
status: {
|
||||
0: "等待处理",
|
||||
1: "正在处理",
|
||||
2: "处理异常",
|
||||
3: "处理完成"
|
||||
},
|
||||
uploadFileUrl: null,
|
||||
uploadData: {
|
||||
thirdSys: "thirdId",
|
||||
},
|
||||
templateDlUrl: null,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
fromType: null,
|
||||
genKey: null,
|
||||
status: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
thirdSysFk: null,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
filterLogs(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
console.log(response.data.code + "---------------" + response.data.total);
|
||||
console.log(response.data.list + "---------------");
|
||||
this.list = response.data.list || [];
|
||||
console.log(this.list + "---------------");
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
genInCode() {
|
||||
this.selectBasicUdiVisible = true;
|
||||
},
|
||||
handleDetailClick(row) {
|
||||
this.currentRow = row;
|
||||
console.log(this.currentRow.genKey)
|
||||
this.udiImportDetailVisible = true;
|
||||
|
||||
},
|
||||
cancelDialog() {
|
||||
this.udiImportDetailVisible = false;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将删除该内部码信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let dQuery = {
|
||||
id: rowId,
|
||||
};
|
||||
deleteLog(dQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("删除成功");
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
init() {
|
||||
axios.get("./config.json").then(res => {
|
||||
let response = res.data.UDI_SYNC_SERVER_IP + "";
|
||||
this.uploadFileUrl = response + "udisync/udiInfo/zipUpload";
|
||||
});
|
||||
},
|
||||
|
||||
handleExceed() {
|
||||
this.$message.error("上传数量超出!");
|
||||
},
|
||||
handleBefore() {
|
||||
this.loading = true;
|
||||
},
|
||||
handleChange(response, files, fileList) {
|
||||
console.log(response);
|
||||
if (response.code != 20000) {
|
||||
this.loading = false;
|
||||
this.$message.error(response.message);
|
||||
} else {
|
||||
this.loading = false;
|
||||
this.$message.success(response.data);
|
||||
}
|
||||
},
|
||||
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
0: "warning",
|
||||
1: "warning",
|
||||
2: "danger",
|
||||
3: "success",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
components: {udiInfoImportDetail},
|
||||
created() {
|
||||
this.getList();
|
||||
this.init();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,885 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="最小销售产品标识"
|
||||
prop="nameCode"
|
||||
width="140"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品编码"
|
||||
prop="thirdId"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
prop="ylqxzcrbarmc"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品通用名"
|
||||
prop="cpmctymc"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="规格型号"
|
||||
prop="ggxh"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="注册/备案凭证"
|
||||
prop="zczbhhzbapzbh"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
|
||||
<el-table-column
|
||||
label="器械类别"
|
||||
prop="qxlb"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column width="200" label="操作" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="handleModifyClick(scope.row)"
|
||||
>详情
|
||||
</el-button>
|
||||
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="bindId(scope.row)"
|
||||
>选入绑定
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-dialog
|
||||
title="产品信息编辑"
|
||||
:visible.sync="editDialogVisible"
|
||||
:close-on-click-modal="false"
|
||||
append-to-body
|
||||
:close-on-press-escape="false"
|
||||
width="70%"
|
||||
v-if="editDialogVisible"
|
||||
>
|
||||
|
||||
<el-table :data="sysList" style="width: 100%" border>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="系统名称"
|
||||
prop="sysName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品编码"
|
||||
prop="thirdId"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="产品名称"
|
||||
prop="thirdName"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="注册/备案凭证号" prop="registerNo" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="生产厂家" prop="manufactory" show-overflow-tooltip></el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="detailList"
|
||||
style="width: 100%; margin-top: 20px"
|
||||
border
|
||||
@current-change="handleDetail"
|
||||
>
|
||||
<el-table-column
|
||||
label="产品标识"
|
||||
prop="nameCode"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="产品通用名"
|
||||
prop="cpmctymc"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="包装级别"
|
||||
prop="packLevel"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="包装层级"
|
||||
prop="bzcj"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-form
|
||||
:model="editQuery"
|
||||
:rules="rules"
|
||||
ref="editQuery"
|
||||
label-width="100px"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>产品名称: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
:disabled="true"
|
||||
v-model="editQuery.cpmctymc"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>产品标识: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.nameCode"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>规格型号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.ggxh"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>器械类别: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.qxlb"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>产品类别: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.cplb"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>分类编码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.flbm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>商品条码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.sptm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>医保编码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%" :disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.ybbm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>医疗器械注册人: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="ylqxzcrbarmc"
|
||||
v-model="editQuery.ylqxzcrbarmc"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>注册人英文名称: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.ylqxzcrbarywmc"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>统一社会信用号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.tyshxydm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>注册证/备案号: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.zczbhhzbapzbh"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>上级产品编码: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="true"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.sjcpbm"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>包装级别: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
:disabled="true"
|
||||
v-model="editQuery.packLevel"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>计量单位/包装级别: </span>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.bzcj"
|
||||
:disabled="true"
|
||||
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>包含下级包装数量: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
:disabled="true"
|
||||
v-model="editQuery.bhxjsl"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>包含下级产品编码: </span>
|
||||
</div>
|
||||
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
:disabled="true"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.bhxjcpbm"
|
||||
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>包含最小销售包装数量: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
size="small"
|
||||
:disabled="true"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.bhzxxsbzsl"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>最小包装单元内包含使用单元数量: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="!checked"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
v-model="editQuery.zxxsbzbhsydysl"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12" class="el-col">
|
||||
<div class="text item">
|
||||
<div class="itemTag">
|
||||
<span>生产厂家: </span>
|
||||
</div>
|
||||
<el-input
|
||||
style="width: 65%"
|
||||
:disabled="!checked"
|
||||
size="small"
|
||||
splaceholder="请输入内容"
|
||||
></el-input>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row :gutter="20" class="el-row" type="flex">
|
||||
<el-col :span="12" class="el-col">
|
||||
</el-col>
|
||||
<el-col :span="4" class="el-col">
|
||||
<el-form-item prop="name">
|
||||
<el-checkbox v-model="checked" class="text item itemTag"
|
||||
:disabled="!isUseDyCheck"
|
||||
>以使用单元数量入库
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" class="el-col">
|
||||
<el-form-item prop="name">
|
||||
<el-checkbox v-model="editQuery.isLock" class="text item itemTag" :disabled="true"
|
||||
>是否锁定
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="3" class="el-col">
|
||||
<el-form-item prop="name">
|
||||
<el-checkbox v-model="editQuery.isDisable" class="text item itemTag" :disabled="true"
|
||||
>是否禁用
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
|
||||
<div style="text-align: center">
|
||||
<el-button type="primary" size="small" icon="search" @click="onAddSubmit"
|
||||
>提交
|
||||
</el-button>
|
||||
<el-button type="primary" size="small" icon="search" @click="cancelDialog"
|
||||
>取消
|
||||
</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getUdiInfos, getAllUdiInfos,
|
||||
deletetUdiInfos,
|
||||
thirdSysDetail,
|
||||
removeRl, sysFilter
|
||||
} from "../../api/basic/udiRelevance";
|
||||
import {selectSysParamByKey} from "../../api/param/systemParamConfig";
|
||||
import {filterByUuid} from "../../api/basic/udiInfo";
|
||||
import {updateBind} from "../../api/inout/order"
|
||||
|
||||
import selectUdi from "../basic/UdiInfoRelevance.vue";
|
||||
import selectErp from "../basic/UdiInfoselectErpUdi";
|
||||
import selectLocalUdi from "../basic/UdiInfoSelectLocalUdi";
|
||||
|
||||
export default {
|
||||
name: "DialogSelectRl",
|
||||
props: {
|
||||
curRow: {
|
||||
type: Object,
|
||||
required: true,
|
||||
},
|
||||
closeBindDialog: {
|
||||
type: Function,
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
nameCode: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
loading: false,
|
||||
editQuery: null,
|
||||
relevanceEdit: {
|
||||
id: null,
|
||||
thirdId: "",
|
||||
isDisable: null,
|
||||
isUseDy: false,
|
||||
isLock: null,
|
||||
},
|
||||
defaultSys: null,
|
||||
isImport: false,
|
||||
isImportUdi: false,
|
||||
isUploadSmp: false,
|
||||
isImportFile: false,
|
||||
uploadFileUrl: null,
|
||||
checked: false,
|
||||
list: [],
|
||||
detailList: [],
|
||||
sysList: [],
|
||||
filterList: [],
|
||||
total: 0,
|
||||
thirdNo: "",
|
||||
uuid: "111",
|
||||
thirdId: null,
|
||||
relId: "",
|
||||
thisData: {
|
||||
nameCode: null,
|
||||
cpmctymc: null,
|
||||
ggxh: null
|
||||
},
|
||||
multipleSelection: [],
|
||||
editDialogVisible: false, //详情
|
||||
selectUdiDialogVisible: false, //关联选入
|
||||
selectErpDialogVisible: false, //选入ERP产品
|
||||
selectLocalVisible: false, //关联UDI
|
||||
isUseDyCheck: false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
nameCode: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.filterQuery.nameCode = this.curRow.nameCode;
|
||||
getAllUdiInfos(this.filterQuery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
if (response.code == 20000) {
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
keyup_submit(event) {
|
||||
this.filterQuery.page = 1;
|
||||
this.getList();
|
||||
event.target.select();
|
||||
},
|
||||
getDetailList(detailQuery) {
|
||||
this.loading = true;
|
||||
filterByUuid(detailQuery)
|
||||
.then((response) => {
|
||||
this.isUseDyCheck = false;
|
||||
this.loading = false;
|
||||
this.detailList = response.data || [];
|
||||
this.detailList.forEach((item, index, array) => {
|
||||
if (item.zxxsbzbhsydysl > 1) {
|
||||
this.isUseDyCheck = true;
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.detailList = [];
|
||||
});
|
||||
},
|
||||
|
||||
handleDetail(row) {
|
||||
this.editQuery = row;
|
||||
console.log(row);
|
||||
},
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
let tquery = {
|
||||
id: data.id + "",
|
||||
};
|
||||
|
||||
deletetUdiInfos(tquery)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该产品信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
intentDetail() {
|
||||
this.isImportUdi = false;
|
||||
this.selectUdiDialogVisible = true;
|
||||
},
|
||||
addSelectErp(row) {
|
||||
this.defaultSys = row.sysId;
|
||||
this.isImport = false;
|
||||
this.selectErpDialogVisible = true;
|
||||
},
|
||||
|
||||
removeErp(row) {
|
||||
this.$confirm("此操作将解除该绑定产品信息, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
let query = {
|
||||
relId: this.editQuery.relId,
|
||||
thirdSys: row.sysId
|
||||
};
|
||||
removeRl(query)
|
||||
.then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.getThirdSysDetail()();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
bindId(val) {
|
||||
let query = {
|
||||
id: this.curRow.id,
|
||||
bindRlFk: val.id
|
||||
};
|
||||
updateBind(query).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.$message.success("绑定成功");
|
||||
this.closeBindDialog(this.curRow.id);
|
||||
} else {
|
||||
this.$message.error("绑定失败");
|
||||
}
|
||||
}).catch(() => {
|
||||
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
handleSelectionChange(val) {
|
||||
console.log("----" + val);
|
||||
},
|
||||
|
||||
cancelDialog() {
|
||||
this.editDialogVisible = false;
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
handleModifyClick(row) {
|
||||
this.uuid = row.uuid;
|
||||
this.relId = row.relId;
|
||||
this.isImport = false;
|
||||
this.thisData = row;
|
||||
this.editDialogVisible = true;
|
||||
this.editQuery = row;
|
||||
this.relevanceEdit = {
|
||||
id: row.id,
|
||||
// thirdId: row.thirdId,
|
||||
isUseDy: row.isUseDy,
|
||||
isDisable: row.isDisable,
|
||||
isLock: row.isLock,
|
||||
};
|
||||
this.checked = row.isUseDy == 1;
|
||||
|
||||
let ttquery = {
|
||||
uuid: row.uuid,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
};
|
||||
console.log("this.editQuery.isUseDy = " + this.editQuery.isUseDy);
|
||||
|
||||
this.getDetailList(ttquery);
|
||||
this.getThirdSysDetail();
|
||||
},
|
||||
closeUdi(val) {
|
||||
this.selectUdiDialogVisible = false;
|
||||
this.selectErpDialogVisible = false;
|
||||
this.selectLocalVisible = false;
|
||||
this.getThirdSysDetail();
|
||||
if (val) {
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
getThirdSysDetail() {
|
||||
let query = {
|
||||
id: this.relevanceEdit.id,
|
||||
};
|
||||
|
||||
thirdSysDetail(query)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.sysList = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.sysList = [];
|
||||
});
|
||||
},
|
||||
getSysFilter() {
|
||||
sysFilter()
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.filterList = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.filterList = [];
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
|
||||
closeDialog() {
|
||||
this.selectErpDialogVisible = false;
|
||||
this.selectLocalVisible = false;
|
||||
},
|
||||
|
||||
selectSysParam() {
|
||||
let query = {
|
||||
paramKey: "smp_isUploadProuct",
|
||||
};
|
||||
selectSysParamByKey(query).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
if (response.data.paramValue == "1") {
|
||||
this.isUploadSmp = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
let query1 = {
|
||||
paramKey: "upload_pi_file_enabled",
|
||||
};
|
||||
selectSysParamByKey(query1).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
if (response.data.paramValue == "1") {
|
||||
this.isImportFile = true;
|
||||
}
|
||||
}
|
||||
});
|
||||
let query2 = {
|
||||
paramKey: "upload_pi_file_url",
|
||||
};
|
||||
selectSysParamByKey(query2).then((response) => {
|
||||
if (response.code == 20000) {
|
||||
this.uploadFileUrl = response.data.paramValue;
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
,
|
||||
mounted() {
|
||||
}
|
||||
,
|
||||
components: {
|
||||
selectUdi,
|
||||
selectErp,
|
||||
selectLocalUdi,
|
||||
}
|
||||
,
|
||||
created() {
|
||||
this.getList();
|
||||
}
|
||||
,
|
||||
}
|
||||
;
|
||||
</script>
|
||||
<style scoped>
|
||||
.itemTag {
|
||||
float: left;
|
||||
text-align: left;
|
||||
margin-top: 10px;
|
||||
width: 25%;
|
||||
}
|
||||
|
||||
.text {
|
||||
font-size: 13px;
|
||||
font-family: "Microsoft YaHei";
|
||||
}
|
||||
|
||||
.query-form-item {
|
||||
display: block !important;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.el-row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.el-col {
|
||||
border-radius: 4px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,530 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card>
|
||||
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
|
||||
<el-row>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="filterQuery.id" placeholder="单号"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.mainAction" placeholder="出入库类型">
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="入库" value="WareHouseIn"></el-option>
|
||||
<el-option label="出库" value="WareHouseOut"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select v-model="filterQuery.action" placeholder="请选择业务类型">
|
||||
<el-option
|
||||
v-for="item in busTypes"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.action">
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button-group>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-refresh"
|
||||
@click="onReset"
|
||||
></el-button>
|
||||
<el-button type="primary" icon="search" @click="onSubmit"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
</el-button-group>
|
||||
</el-form-item>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="list" style="width: 100%">
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="扫码单据类型" prop="action">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getActionName(scope.row.action) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" prop="id"></el-table-column>
|
||||
<!-- <el-table-column label="来源订单号" prop="corpOrderId"></el-table-column>-->
|
||||
<el-table-column label="来源" prop="fromType">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="往来单位" prop="fromCorp" width="220">
|
||||
<template slot-scope="scope">
|
||||
<!-- {{ scope.row.fromCorp }}-->
|
||||
|
||||
<p v-if="scope.row.fromCorp == null">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click.native.stop="handleUnitClick(scope.row)"
|
||||
>选择往来单位
|
||||
</el-button
|
||||
>
|
||||
</p>
|
||||
<p v-if="scope.row.fromCorp !== null">
|
||||
<el-button
|
||||
type="primary"
|
||||
size="mini"
|
||||
@click.native.stop="handleUnitClick(scope.row)"
|
||||
>{{ scope.row.fromCorp }}
|
||||
</el-button
|
||||
>
|
||||
</p>
|
||||
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" prop="actDate" show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<i class="el-icon-time"></i>
|
||||
<span>{{ scope.row.actDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="单据状态" prop="status" width="100">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="(scope.row.status == 3) | statusFilterType">{{
|
||||
checkStatus[scope.row.status]
|
||||
}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="300" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="addOrders(scope.row)"
|
||||
>编辑
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
v-if="scope.row.status !== -1"
|
||||
@click.native.stop="intentDetail(scope.row)"
|
||||
>详情
|
||||
</el-button
|
||||
>
|
||||
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="deleteDialog(scope.row.id)"
|
||||
>删除
|
||||
</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
v-if="scope.row.status !== -1"
|
||||
@click.native.stop="onUpload(scope.row.id)"
|
||||
>提交
|
||||
</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog title="错误信息" :visible.sync="dialogVisible" width="30%" :append-to-body='true'>
|
||||
<span>{{ errorDetail }}</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="dialogVisible = false"
|
||||
>关 闭</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
title="选择往来单位"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:visible.sync="dialogTableVisible"
|
||||
append-to-body
|
||||
width="70%"
|
||||
>
|
||||
<el-form :inline="true" :model="unitquery" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="unitquery.key" placeholder="搜索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="search"
|
||||
@click.native.stop="getUnitList()"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="unitlist"
|
||||
style="width: 100%"
|
||||
@row-click="selectUnit"
|
||||
>
|
||||
<el-table-column
|
||||
label="往来单位ID"
|
||||
prop="erpId"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="往来单位名称"
|
||||
prop="name"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="往来单位简写"
|
||||
prop="spell"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="地址"
|
||||
prop="addr"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column label="状态" prop="status"></el-table-column>
|
||||
<el-table-column label="类型" prop="type"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="单号详情"
|
||||
:visible.sync="codeDetailVisible"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
width="80%"
|
||||
v-if="codeDetailVisible"
|
||||
>
|
||||
<codeDetail
|
||||
:idQuery="idQuery"
|
||||
v-on:closeDetailDialog="closeDetailDialog"
|
||||
></codeDetail>
|
||||
</el-dialog>
|
||||
<el-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
|
||||
<el-dialog
|
||||
title="新增订单"
|
||||
:visible.sync="addOrderVisible"
|
||||
width="75%"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
v-if="addOrderVisible"
|
||||
@close='closeDialog'
|
||||
>
|
||||
<addOrder
|
||||
:closeDialog="closeDialog"
|
||||
:idQuery="idQuery"
|
||||
:addType="addType"
|
||||
></addOrder>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderListByStatus,
|
||||
deleteByOrderId,
|
||||
updateUnit,
|
||||
} from "../../api/inout/order";
|
||||
|
||||
import draggable from "vuedraggable";
|
||||
import codeDetail from "./IONewCode";
|
||||
import addOrder from "./IOAddOrder";
|
||||
import store from "../../store";
|
||||
import {getBussinessType} from "../../api/basic/bussinessType";
|
||||
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
|
||||
|
||||
const formJson = {
|
||||
site_id: "",
|
||||
site_name: "",
|
||||
describe: "",
|
||||
ads: [],
|
||||
};
|
||||
|
||||
export default {
|
||||
name: "AdditionalOrder",
|
||||
data() {
|
||||
return {
|
||||
filterQuery: {
|
||||
id: "",
|
||||
mainAction: null,
|
||||
action: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
},
|
||||
checkStatus: {
|
||||
'-1': "等待提交",
|
||||
// 1: "等待处理",
|
||||
1: "等待处理",
|
||||
2: "等待校验",
|
||||
3: "校验异常",
|
||||
4: "校验成功",
|
||||
5: "等待处理",
|
||||
},
|
||||
curIndex: "",
|
||||
unitquery: {key: "", page: 1, limit: 20},
|
||||
unitlist: [],
|
||||
unitUpdateQuery: {
|
||||
id: "",
|
||||
fromCorpId: "",
|
||||
fromCorp: "",
|
||||
},
|
||||
idQuery: {
|
||||
id: "",
|
||||
},
|
||||
addOrderVisible: false,
|
||||
fromTypeMap: {
|
||||
"1": "UDIMS平台",
|
||||
"2": "网页新增",
|
||||
"3": "pda即时校验",
|
||||
"4": "pda未校验",
|
||||
"5": "pc端扫码精灵",
|
||||
"6": "补录单据",
|
||||
"7": "UDI供应商平台"
|
||||
},
|
||||
list: [],
|
||||
adId: [],
|
||||
adSelectList: [],
|
||||
adList: {},
|
||||
adListNoDataText: "无数据",
|
||||
queryAdIdAsyncLoading: false,
|
||||
codeDetailVisible: false,
|
||||
total: 0,
|
||||
loading: true,
|
||||
index: null,
|
||||
formName: null,
|
||||
errorDetail: "1111111111111",
|
||||
formMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
},
|
||||
addType: "edit",
|
||||
deleteData: {
|
||||
id: "",
|
||||
},
|
||||
dialogTableVisible: false,
|
||||
formLoading: false,
|
||||
dialogVisible: false,
|
||||
formData: formJson,
|
||||
deleteLoading: false,
|
||||
busTypes: [],
|
||||
};
|
||||
},
|
||||
components: {
|
||||
draggable,
|
||||
codeDetail,
|
||||
addOrder,
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.loading = true;
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.filterQuery.limit = val;
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
handleUnitClick(row) {
|
||||
this.curIndex = row.id;
|
||||
this.dialogTableVisible = true;
|
||||
},
|
||||
closeDetailDialog(val) {
|
||||
this.codeDetailVisible = false;
|
||||
},
|
||||
|
||||
closeDialog() {
|
||||
this.addOrderVisible = false;
|
||||
this.getList();
|
||||
},
|
||||
getUnitList() {
|
||||
this.loading = true;
|
||||
getBasicUnitMaintains(this.unitquery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.unitlist = response.data.page.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
selectUnit(row) {
|
||||
console.log(row.id);
|
||||
this.unitUpdateQuery.id = this.curIndex;
|
||||
this.unitUpdateQuery.fromCorp = row.name;
|
||||
this.unitUpdateQuery.fromCorpId = row.erpId;
|
||||
updateUnit(this.unitUpdateQuery)
|
||||
.then((response) => {
|
||||
this.dialogTableVisible = false;
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.dialogTableVisible = false;
|
||||
});
|
||||
},
|
||||
//获取订单列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.filterQuery.status = 5;
|
||||
orderListByStatus(this.filterQuery)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
this.deleteData.id = data;
|
||||
deleteByOrderId(this.deleteData)
|
||||
.then((response) => {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
onUpload(data) {
|
||||
this.loading = true;
|
||||
var idQuery = {
|
||||
orderId: "",
|
||||
};
|
||||
idQuery.orderId = data;
|
||||
addCommitOrder(idQuery)
|
||||
.then((response) => {
|
||||
if (response.code === 20000) {
|
||||
this.$message.success(response.data);
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
handleErrorDetail(poistion) {
|
||||
var mOrder = this.list[poistion];
|
||||
var corpOrderId = mOrder.remark;
|
||||
|
||||
this.errorDetail = mOrder.remark;
|
||||
console.log(corpOrderId + " " + mOrder + " " + mOrder.remark);
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
|
||||
intentDetail(row) {
|
||||
this.codeDetailVisible = true;
|
||||
this.idQuery.id = row.id;
|
||||
},
|
||||
getBusType() {
|
||||
let query = {
|
||||
enabled: true,
|
||||
};
|
||||
getBussinessType(query)
|
||||
.then((response) => {
|
||||
this.busTypes = response.data.list || [];
|
||||
this.filterQuery.billAction = this.busTypes[0].action;
|
||||
// this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getActionName(action) {
|
||||
for (let i = 0; i < this.busTypes.length; i++) {
|
||||
if (this.busTypes[i].action === action) {
|
||||
return this.busTypes[i].name;
|
||||
}
|
||||
}
|
||||
},
|
||||
addOrders(row) {
|
||||
console.log(row)
|
||||
this.idQuery.id = '';
|
||||
this.idQuery.actDate = '';
|
||||
this.idQuery.corpOrderId = '';
|
||||
this.idQuery.billType = row.action;
|
||||
if (row.id !== null && row.id !== undefined && row.id !== '') {
|
||||
this.idQuery.id = row.id;
|
||||
this.idQuery.actDate = row.actDate;
|
||||
this.idQuery.corpOrderId = row.corpOrderId;
|
||||
}
|
||||
this.addOrderVisible = true;
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
false: "success",
|
||||
true: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getBusType();
|
||||
let query = this.$route.query;
|
||||
this.filterQuery = Object.assign(this.filterQuery, query);
|
||||
this.filterQuery.limit = parseInt(this.filterQuery.limit);
|
||||
// 加载表格数据
|
||||
this.getList();
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style type="text/scss" lang="scss">
|
||||
</style>
|
@ -0,0 +1,863 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-card class="el-card">
|
||||
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="filterQuery"
|
||||
style="display: flex"
|
||||
label-width="480px"
|
||||
size="mini"
|
||||
>
|
||||
<el-form-item class="query-form-item" label-width="100px">
|
||||
<el-input
|
||||
v-model="filterQuery.code"
|
||||
placeholder="UDI码"
|
||||
style="width: 500px"
|
||||
@keyup.enter.native="keyup_submit($event)"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item class="query-form-item">
|
||||
<el-select
|
||||
v-model="filterQuery.supId"
|
||||
filterable
|
||||
remote
|
||||
clearable="true"
|
||||
reserve-keyword
|
||||
placeholder="请输入供应商名称"
|
||||
:remote-method="findMethod"
|
||||
size="mini"
|
||||
style="width: 100%"
|
||||
:loading="loading"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in fromOptions"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
:value="item.erpId"
|
||||
>
|
||||
<span style="float: left">{{ item.name }}</span>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item style="display: flex">
|
||||
<el-button type="primary" icon="search" @click="getList"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="list"
|
||||
style="width: 100%"
|
||||
@row-click="getOrderDetail"
|
||||
highlight-current-row
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column label="扫码单据类型" prop="action">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ getActionName(scope.row.action) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="订单号"
|
||||
prop="id"
|
||||
show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column label="来源" prop="fromType">
|
||||
|
||||
<template slot-scope="scope">
|
||||
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
|
||||
</template>
|
||||
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="往来单位" prop="fromCorp" width="250">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.fromCorp }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="actDate"
|
||||
width="150"
|
||||
show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<i class="el-icon-time"></i>
|
||||
<span>{{ scope.row.actDate }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="校验状态" prop="contrastStatus" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-tag :type="(scope.row.contrastStatus === 1) | statusFilterType">
|
||||
{{ erpCheckStatus[scope.row.contrastStatus] }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click.native.stop="intentDetail(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-pagination
|
||||
:page-size="filterQuery.limit"
|
||||
@current-change="handleCurrentChange"
|
||||
layout="prev, pager, next"
|
||||
:total="total"
|
||||
></el-pagination>
|
||||
</el-card>
|
||||
|
||||
<el-card class="el-card" v-if="true" id="printJS-form">
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:row-class-name="tableRowClassName"
|
||||
:data="detailList"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column label="序号" type="index"></el-table-column>
|
||||
<el-table-column
|
||||
label="产品通用名"
|
||||
prop="coName"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="包装规格"
|
||||
prop="packSpec"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="批次号"
|
||||
prop="batchNo"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="生产日期"
|
||||
prop="productDate"
|
||||
: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="erpCount"
|
||||
: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"></el-table-column>
|
||||
<el-table-column
|
||||
label="生产企业"
|
||||
prop="productCompany"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="注册/备案凭证号"
|
||||
prop="authCode"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
</el-card>
|
||||
<el-dialog
|
||||
title="选择往来单位"
|
||||
:visible.sync="dialogTableVisible"
|
||||
width="70%"
|
||||
>
|
||||
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
||||
<el-form-item class="query-form-item">
|
||||
<el-input v-model="unitquery.key" placeholder="搜索"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="search"
|
||||
@click.native.stop="getUnitList()"
|
||||
>查询
|
||||
</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="unitlist"
|
||||
style="width: 100%"
|
||||
@row-click="selectUnit"
|
||||
>
|
||||
<el-table-column label="往来单位ID" prop="unitId"></el-table-column>
|
||||
<el-table-column
|
||||
label="往来单位名称"
|
||||
prop="name"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="往来单位简写"
|
||||
prop="spell"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="地址"
|
||||
prop="addr"
|
||||
show-overflow-tooltip
|
||||
></el-table-column>
|
||||
<el-table-column label="状态" prop="status"></el-table-column>
|
||||
<el-table-column label="类型" prop="type"></el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
title="单号详情"
|
||||
:visible.sync="codeDetailVisible"
|
||||
width="80%"
|
||||
v-if="codeDetailVisible"
|
||||
>
|
||||
<codeDetail
|
||||
:idQuery="idQuery"
|
||||
v-on:closeDetailDialog="closeDetailDialog"
|
||||
></codeDetail>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog title="校验信息" :visible.sync="errDialogVisible" width="30%">
|
||||
<span>{{ errorDetail }}</span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="errDialogVisible = false"
|
||||
>关 闭</el-button
|
||||
>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
orderList,
|
||||
codeList,
|
||||
findAllByOrderId,
|
||||
updateUnit,
|
||||
filterOrder,
|
||||
deleteByOrderId,
|
||||
updateExportStatus,
|
||||
uploadOrder,
|
||||
mergeOrder,
|
||||
orderDetail,
|
||||
} from "../../api/inout/order";
|
||||
import {
|
||||
orderDetailPDFFromTemplateCode,
|
||||
orderDetailPDFFromTemplateFile,
|
||||
inspectionOrderDetailPDFFromTemplateCode,
|
||||
inspectionOrderDetailPDFFromTemplateFile
|
||||
} from "../../api/itextpdf/itextpdf";
|
||||
import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
|
||||
import draggable from "vuedraggable";
|
||||
import {saveAs} from "file-saver";
|
||||
import codeDetail from "../inout/IOFinishCode";
|
||||
import store from "../../store";
|
||||
import {getBussinessType} from "../../api/basic/bussinessType";
|
||||
import {filterOrderTrace} from "@/api/inventory/invCodeTrace";
|
||||
|
||||
const formJson = {
|
||||
site_id: "",
|
||||
site_name: "",
|
||||
describe: "",
|
||||
ads: [],
|
||||
};
|
||||
export default {
|
||||
name: "invUdiTraceOrder",
|
||||
props: {
|
||||
isSelect: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
query: {
|
||||
code: null,
|
||||
batchNo: null,
|
||||
productIdFk: null,
|
||||
customerId: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
supId: null,
|
||||
},
|
||||
checkStatus: {
|
||||
1: "校验异常",
|
||||
0: "未校验",
|
||||
2: "正常",
|
||||
},
|
||||
erpCheckStatus: {
|
||||
// error: "校验异常",
|
||||
// null: "未校验",
|
||||
// success: "正常",
|
||||
1: "校验异常",
|
||||
0: "未校验",
|
||||
2: "校验成功",
|
||||
},
|
||||
fromTypeMap: {
|
||||
"1": "UDIMS平台",
|
||||
"2": "网页新增",
|
||||
"3": "pda即时校验",
|
||||
"4": "pda未校验",
|
||||
"5": "pc端扫码精灵",
|
||||
"6": "补录单据",
|
||||
"7": "UDI供应商平台"
|
||||
},
|
||||
//往来单位
|
||||
unitquery: {key: "", page: 1, limit: 20},
|
||||
unitlist: [],
|
||||
list: [],
|
||||
detailList: [],
|
||||
unitUpdateQuery: {
|
||||
id: "",
|
||||
fromCorpId: "",
|
||||
fromCorp: "",
|
||||
},
|
||||
actDateRange: [],
|
||||
filterQuery: {
|
||||
code: null,
|
||||
batchNo: null,
|
||||
productIdFk: null,
|
||||
customerId: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
supId: null,
|
||||
},
|
||||
detailQuery: {
|
||||
orderId: "",
|
||||
},
|
||||
deleteData: {
|
||||
id: "",
|
||||
},
|
||||
idQuery: {
|
||||
id: "",
|
||||
},
|
||||
curIndex: "",
|
||||
adListNoDataText: "无数据",
|
||||
queryAdIdAsyncLoading: false,
|
||||
codeDetailVisible: false,
|
||||
total: 0,
|
||||
loading: true,
|
||||
index: null,
|
||||
formName: null,
|
||||
orderId: "",
|
||||
formMap: {
|
||||
add: "新增",
|
||||
edit: "编辑",
|
||||
},
|
||||
exportQuery: {
|
||||
orderId: "",
|
||||
exportStatus: "",
|
||||
},
|
||||
|
||||
uploadQuery: {
|
||||
orderId: "",
|
||||
},
|
||||
busTypes: [],
|
||||
multipleSelection: [],
|
||||
dialogTableVisible: false,
|
||||
formLoading: false,
|
||||
formVisible: false,
|
||||
formData: formJson,
|
||||
deleteLoading: false,
|
||||
addDialogVisible: false,
|
||||
errDialogVisible: false,
|
||||
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]);
|
||||
},
|
||||
},
|
||||
{
|
||||
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]);
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
draggable,
|
||||
codeDetail,
|
||||
},
|
||||
methods: {
|
||||
onReset() {
|
||||
this.$router.push({
|
||||
path: "",
|
||||
});
|
||||
this.filterQuery = {
|
||||
code: null,
|
||||
batchNo: null,
|
||||
productIdFk: null,
|
||||
customerId: null,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
supId: null,
|
||||
};
|
||||
this.actDateRange = [];
|
||||
this.getList();
|
||||
},
|
||||
onSubmit() {
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(val) {
|
||||
this.filterQuery.limit = val;
|
||||
this.getList();
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
this.filterQuery.page = val;
|
||||
this.getList();
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
console.log(val);
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
|
||||
handleErrorDetail(poistion) {
|
||||
var mOrder = this.list[poistion];
|
||||
this.errorDetail = mOrder.remark;
|
||||
this.errDialogVisible = true;
|
||||
},
|
||||
|
||||
mergesOrders() {
|
||||
var repeatData = this.multipleSelection;
|
||||
if (repeatData.length <= 1) {
|
||||
this.$message.warning("选择的订单需大于1");
|
||||
return;
|
||||
}
|
||||
var orderid = repeatData[0].id;
|
||||
var unit = repeatData[0].fromCorp;
|
||||
var action = repeatData[0].action;
|
||||
var orderList = [];
|
||||
repeatData.forEach((obj, index) => {
|
||||
if (unit !== obj.fromCorp) {
|
||||
this.$message.warning("往来单位不一致!");
|
||||
return;
|
||||
}
|
||||
if (action !== obj.action) {
|
||||
this.$message.warning("业务类型不一致!");
|
||||
return;
|
||||
}
|
||||
orderList.push(obj.id);
|
||||
});
|
||||
var tquery = {
|
||||
orderList: orderList,
|
||||
};
|
||||
|
||||
this.$confirm(
|
||||
"所选择的订单将会合并到订单号为" + orderid + "的订单下",
|
||||
"提示",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
mergeOrder(tquery).then((response) => {
|
||||
if (response.code === 20000) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "合并成功",
|
||||
});
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
//获取订单列表
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.filterQuery.customerId = store.getters.customerId;
|
||||
filterOrderTrace(this.filterQuery)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.loading = false;
|
||||
this.list = response.data.list || [];
|
||||
this.detailList = [];
|
||||
this.total = response.data.total || 0;
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
//业务明细表
|
||||
getOrderDetail(row) {
|
||||
this.loading = true;
|
||||
this.detailQuery = {
|
||||
orderId: row.id,
|
||||
};
|
||||
this.refresgOrderDetail();
|
||||
},
|
||||
refresgOrderDetail() {
|
||||
orderDetail(this.detailQuery)
|
||||
.then((response) => {
|
||||
console.log(response)
|
||||
this.loading = false;
|
||||
this.detailList = response.data || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.detailList = [];
|
||||
});
|
||||
},
|
||||
|
||||
handleUnitClick(row) {
|
||||
this.curIndex = row.id;
|
||||
// this.dialogTableVisible = true;
|
||||
},
|
||||
getUnitList() {
|
||||
this.loading = true;
|
||||
getBasicUnitMaintains(this.unitquery)
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
this.unitlist = response.data.list || [];
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
intentDetail(row) {
|
||||
// this.$router.push({
|
||||
// path: "../inout/detail",
|
||||
// query: { id: row.id },
|
||||
// });
|
||||
|
||||
this.codeDetailVisible = true;
|
||||
this.idQuery.id = row.id;
|
||||
},
|
||||
|
||||
selectUnit(row) {
|
||||
console.log(row.id);
|
||||
this.unitUpdateQuery.id = this.curIndex;
|
||||
this.unitUpdateQuery.fromCorp = row.name;
|
||||
this.unitUpdateQuery.fromCorpId = row.unitid;
|
||||
updateUnit(this.unitUpdateQuery)
|
||||
.then((response) => {
|
||||
this.dialogTableVisible = false;
|
||||
this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
this.dialogTableVisible = false;
|
||||
});
|
||||
},
|
||||
deleteOrders(data) {
|
||||
this.loading = true;
|
||||
this.deleteData.id = data;
|
||||
deleteByOrderId(this.deleteData)
|
||||
.then((response) => {
|
||||
this.getList();
|
||||
this.refresgOrderDetail();
|
||||
this.$message({
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
tableRowClassName({row, rowIndex}) {
|
||||
if (row.reCount === row.count) {
|
||||
return "success-row";
|
||||
} else {
|
||||
return "warning-row";
|
||||
}
|
||||
},
|
||||
|
||||
exportDialog(value) {
|
||||
var mOrder = value;
|
||||
if (mOrder.exportStatus === "已上传") {
|
||||
this.$confirm("该订单已修改, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.uploadOrderDialog(mOrder);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
} else if (mOrder.contrastStatus === 0) {
|
||||
this.$confirm("该订单校验异常, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.uploadOrderDialog(mOrder);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
} else if (mOrder.contrastStatus === null) {
|
||||
this.$confirm("该订单未校验, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.uploadOrderDialog(mOrder);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
} else {
|
||||
this.$confirm("是否确定修改ERP订单?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.uploadOrderDialog(mOrder);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
exportXml(poistion) {
|
||||
this.loading = true;
|
||||
var mOrder = this.list[poistion];
|
||||
var corpOrderId = mOrder.id;
|
||||
var codeArry;
|
||||
this.query = {
|
||||
corpOrderId: corpOrderId,
|
||||
page: 1,
|
||||
limit: 20,
|
||||
};
|
||||
findAllByOrderId(this.query) //查找该单号下的所有条码
|
||||
.then((response) => {
|
||||
this.loading = false;
|
||||
codeArry = response.data.list || [];
|
||||
var document =
|
||||
'<?xml version="1.0" encoding="utf-8"?>\n' +
|
||||
'<Document xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="终端接口XML Schema-2.0.xsd" SN="" Version="3.0" License="123456">\n' +
|
||||
"<Events>\n" +
|
||||
'<Event Name="' +
|
||||
mOrder.action +
|
||||
'" MainAction="' +
|
||||
mOrder.mainAction +
|
||||
'">' +
|
||||
"<ActionMaping>\n" +
|
||||
'<Action Name="' +
|
||||
mOrder.mainAction +
|
||||
'">\n' +
|
||||
"<ActionData>Code</ActionData>\n" +
|
||||
"<ActionData>CorpOrderID</ActionData>\n" +
|
||||
"<ActionData>Actor</ActionData>\n" +
|
||||
"<ActionData>ActDate</ActionData>\n" +
|
||||
"<ActionData>ToCorpID</ActionData>\n" +
|
||||
"</Action>\n" +
|
||||
" </ActionMaping>\n" +
|
||||
"<DataMaping>\n" +
|
||||
'<MetaData Name="Code" Type="string" />\n' +
|
||||
'<MetaData Name="CorpOrderID" Type="string" />\n' +
|
||||
'<MetaData Name="Actor" Type="string" />\n' +
|
||||
'<MetaData Name="ActDate" Type="Date" />\n' +
|
||||
'<MetaData Name="ToCorpID" Type="string" />\n' +
|
||||
"</DataMaping>\n" +
|
||||
"<DataField>\n";
|
||||
for (var value of codeArry) {
|
||||
if (value.fromCorpId === null) {
|
||||
value.fromCorpId = "";
|
||||
}
|
||||
var tempdata =
|
||||
' <Data Code="' +
|
||||
value.code +
|
||||
'" CorpOrderID="' +
|
||||
value.corpOrderId +
|
||||
'" Actor="' +
|
||||
value.actor +
|
||||
'" ActDate="' +
|
||||
value.actDate +
|
||||
'" ToCorpID="' +
|
||||
value.fromCorpId +
|
||||
'" />\n';
|
||||
|
||||
document = document + tempdata;
|
||||
}
|
||||
document =
|
||||
document +
|
||||
"</DataField>\n" +
|
||||
"</Event>\n" +
|
||||
"</Events>\n" +
|
||||
"</Document>\n";
|
||||
|
||||
var blob = new Blob([document], {
|
||||
type: "text/plain;charset=utf-8",
|
||||
});
|
||||
saveAs(blob, mOrder.action + mOrder.corpOrderId + ".xml");
|
||||
|
||||
this.exportQuery.orderId = corpOrderId;
|
||||
this.exportQuery.exportStatus = "已上传";
|
||||
updateExportStatus(this.exportQuery).then((response) => {
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.loading = false;
|
||||
this.list = [];
|
||||
this.total = 0;
|
||||
});
|
||||
},
|
||||
|
||||
uploadOrderDialog(value) {
|
||||
console.log(value.id + "---" + value.orderid);
|
||||
this.uploadQuery = {
|
||||
orderId: value.id,
|
||||
};
|
||||
uploadOrder(this.uploadQuery)
|
||||
.then((response) => {
|
||||
if (response.code === 20000) {
|
||||
this.$message.success(response.data);
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error(response.message);
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
|
||||
deleteDialog(rowId) {
|
||||
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
this.deleteOrders(rowId);
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
closeDetailDialog(val) {
|
||||
this.codeDetailVisible = false;
|
||||
},
|
||||
closeManuDialog(val) {
|
||||
this.addDialogVisible = false;
|
||||
if (val) {
|
||||
this.$message.success("选入成功");
|
||||
this.refresgOrderDetail();
|
||||
this.getList();
|
||||
} else {
|
||||
this.$message.error("选入失败");
|
||||
}
|
||||
},
|
||||
cancelDialog() {
|
||||
this.addDialogVisible = false;
|
||||
},
|
||||
importOrder(row) {
|
||||
this.orderId = row.id;
|
||||
this.addDialogVisible = true;
|
||||
},
|
||||
getBusType() {
|
||||
let query = {
|
||||
enabled: true,
|
||||
};
|
||||
getBussinessType(query)
|
||||
.then((response) => {
|
||||
this.busTypes = response.data.list || [];
|
||||
this.filterQuery.billAction = this.busTypes[0].action;
|
||||
// this.getList();
|
||||
})
|
||||
.catch(() => {
|
||||
});
|
||||
},
|
||||
getActionName(action) {
|
||||
for (let i = 0; i < this.busTypes.length; i++) {
|
||||
if (this.busTypes[i].action === action) {
|
||||
return this.busTypes[i].name;
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
statusFilterType(status) {
|
||||
const statusMap = {
|
||||
false: "success",
|
||||
true: "danger",
|
||||
};
|
||||
return statusMap[status];
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
document.body.ondrop = function (event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.getBusType();
|
||||
let query = this.$route.query;
|
||||
this.query = Object.assign(this.query, query);
|
||||
this.query.limit = parseInt(this.query.limit);
|
||||
// 加载表格数据
|
||||
this.getList();
|
||||
let end = new Date();
|
||||
let start = new Date();
|
||||
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||
this.actDateRange = [start, end];
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
|
||||
<style>
|
||||
.el-table .warning-row {
|
||||
background: #ffb5b5;
|
||||
}
|
||||
|
||||
.el-table .success-row {
|
||||
background: #ffffff;
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue