库存,单据 ,根据当前用户,当前库存区分等

master
anthonywj 3 years ago
parent fd900330c8
commit ba84a1f86e

@ -7,3 +7,12 @@ export function getOriginBusType(query) {
params: query params: query
}); });
} }
export function getOriginJoinBusType(query) {
return axios({
url: "/udiwms/originBusType/filterJoin",
method: "get",
params: query
});
}

@ -0,0 +1,9 @@
import axios from "@/utils/axios";
export function inserThrOrderWeb(query) {
return axios({
url: "/udiwms/thrsys/order/insertWeb",
method: "post",
data: query
});
}

@ -234,6 +234,15 @@ export function stockOrderGenerateBillNo(query) {
}); });
} }
export function generateBillNoInt(query) {
return axios({
url: "/udiwms/stock/order/generateBillNoInt",
method: "get",
params: query
});
}
export function supplementOrder(query) { export function supplementOrder(query) {
return axios({ return axios({
url: "/udiwms/stock/order/supplementOrder", url: "/udiwms/stock/order/supplementOrder",

@ -85,9 +85,8 @@ import udplatGoodsImport from "../views/thrsys/UdplatGoodsImport";
import ThrCorps from "../views/thrsys/ThrCorps.vue"; import ThrCorps from "../views/thrsys/ThrCorps.vue";
import thrCorpsExport from "../views/thrsys/ThrCorpsExport.vue"; import thrCorpsExport from "../views/thrsys/ThrCorpsExport.vue";
import thrCorpsImport from "../views/thrsys/ThrCorpsImport.vue"; import thrCorpsImport from "../views/thrsys/ThrCorpsImport.vue";
import receiveOrderNew from "../views/thrsys/ThrOrder.vue"; import receiveOrderNew from "../views/thrsys/ThrOrdedrReceiveAdd.vue";
import receiveOrderSearch from "../views/thrsys/ThrOrder.vue"; import receiveOrderSearch from "../views/thrsys/ThrOrdedrReceiveSearch.vue";
//库存 //库存

@ -1,304 +1,303 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<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 type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="exportExcel"></el-button> <el-button type="primary" icon="search" @click="exportExcel"></el-button>
<el-button type="primary" icon="search" @click="uploadSmp">UDI</el-button> <el-button type="primary" icon="search" @click="uploadSmp">UDI</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<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="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"> <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 label="类型" prop="enabled"> <el-table-column label="类型" prop="enabled">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ typeMap[scope.row.type] }}</span> <span>{{ typeMap[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="下载次数" label="下载次数"
prop="dlCount" prop="dlCount"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="160"> <el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
v-if="scope.row.type==1" v-if="scope.row.type==1"
type="text" type="text"
size="small" size="small"
@click.native.stop="downloadExcel(scope.row)" @click.native.stop="downloadExcel(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="导出往来单位信息"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:visible.sync="corpImportDetailVisible" :visible.sync="corpImportDetailVisible"
width="85%" width="85%"
v-if="corpImportDetailVisible" v-if="corpImportDetailVisible"
> >
<corpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <corpSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></corpSelect> ></corpSelect>
</el-dialog> </el-dialog>
<el-pagination <el-pagination
:page-size="filterQuery.limit" :page-size="filterQuery.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</template> </template>
<script> <script>
import {filterLog, deleteLog} from "../../api/basic/corpExport"; import {filterLog, deleteLog} from "../../api/basic/corpExport";
import corpSelect from "./CorpSelect"; import corpSelect from "./CorpSelect";
import axios from "axios"; import axios from "axios";
// import axios from "../../utils/axios"; import {formatDate} from "@/utils/date";
export default { // import axios from "../../utils/axios";
data() { export default {
return { data() {
filterQuery: { return {
genKey: null, filterQuery: {
status: null, genKey: null,
fromType: null, status: null,
page: 1, fromType: null,
limit: 20, page: 1,
// type: 1, limit: 20,
thirdSysFk: null, // type: 1,
}, thirdSysFk: null,
selectType: 0, },
corpImportDetailVisible: false, selectType: 0,
list: [], corpImportDetailVisible: 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: "处理完成"
typeMap: { },
1: '文件导出', typeMap: {
2: '网络同步', 1: '文件导出',
2: '网络同步',
}, },
uploadFileUrl: null, uploadFileUrl: null,
uploadData: { uploadData: {
thirdSys: "thirdId", 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() { getList() {
this.loading = true; this.loading = true;
filterLog(this.filterQuery) filterLog(this.filterQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
this.list = response.data.list || []; this.list = response.data.list || [];
this.total = response.data.total || 0; this.total = response.data.total || 0;
}) })
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
this.list = []; this.list = [];
this.total = 0; this.total = 0;
}); });
}, },
exportExcel() { exportExcel() {
this.selectType = 0; this.selectType = 0;
this.corpImportDetailVisible = true; this.corpImportDetailVisible = true;
}, },
uploadSmp() { uploadSmp() {
this.selectType = 1; this.selectType = 1;
this.corpImportDetailVisible = true; this.corpImportDetailVisible = 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/corps/exportLog/download" + let href = baseUrl + "/udiwms/corps/exportLog/download" +
"?genKey=" + row.genKey; "?genKey=" + row.genKey;
console.log("href = " + href); console.log("href = " + href);
let a = document.createElement("a"); var timestamp = formatDate(new Date(), "yyyyMMddhhmmss");
fetch(href) let a = document.createElement("a");
.then((res) => res.blob()) fetch(href)
.then((blob) => { .then((res) => res.blob())
a.href = URL.createObjectURL(blob); .then((blob) => {
console.log(a.href); a.href = URL.createObjectURL(blob);
a.download = console.log(a.href);
row.filePath.split("\\")[ a.download = "BaseCorp_" + timestamp + ".LowerIn";
row.filePath.split("\\").length - 1 document.body.appendChild(a);
]; // // a.click();
document.body.appendChild(a); this.getList();
a.click(); });
this.getList(); });
});
});
}, },
cancelDialog(val) { cancelDialog(val) {
this.corpImportDetailVisible = false; this.corpImportDetailVisible = false;
if (val) { if (val) {
this.getList(); this.getList();
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
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", handleChange(response, files, fileList) {
}; console.log(response);
return statusMap[status]; if (response.code != 20000) {
}, this.$message.error(response.message);
}, } else {
mounted() { console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
}, this.$message.success("文件上传成功,请稍后刷新查看!");
components: {corpSelect}, }
created() { },
// this.getBasicThirdSys(); statusFilterType(status) {
this.getList(); const statusMap = {
}, 0: "warning",
}; 1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
},
components: {corpSelect},
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,105 +1,105 @@
<template> <template>
<div> <div>
<el-form :inline="true" :model="query" class="query-form" size="mini"> <el-form :inline="true" :model="query" class="query-form" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input> <el-input v-model="filterQuery.genKey" placeholder="记录ID"></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<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 type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button> <el-button type="primary" icon="search" @click="getList"></el-button>
<el-button type="primary" icon="search" @click="exportExcel"></el-button> <el-button type="primary" icon="search" @click="exportExcel"></el-button>
<el-button type="primary" icon="search" @click="uploadSmp">UDI</el-button> <el-button type="primary" icon="search" @click="uploadSmp">UDI</el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="list" :data="list"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<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="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"> <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 label="类型" prop="enabled"> <el-table-column label="类型" prop="enabled">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ typeMap[scope.row.type] }}</span> <span>{{ typeMap[scope.row.type] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="下载次数" label="下载次数"
prop="dlCount" prop="dlCount"
show-overflow-tooltip show-overflow-tooltip
> >
</el-table-column> </el-table-column>
<el-table-column label="操作" fixed="right" width="160"> <el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="text" type="text"
v-if="scope.row.type==1" v-if="scope.row.type==1"
size="small" size="small"
@click.native.stop="downloadExcel(scope.row)" @click.native.stop="downloadExcel(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="85%"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
append-to-body append-to-body
v-if="udiImportDetailVisible" v-if="udiImportDetailVisible"
> >
<udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog" <udiInfoSelect :selectType="selectType" v-on:cancelDialog="cancelDialog"
></udiInfoSelect> ></udiInfoSelect>
</el-dialog> </el-dialog>
<el-pagination <el-pagination
:page-size="filterQuery.limit" :page-size="filterQuery.limit"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="total" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</template> </template>
<script> <script>
@ -107,197 +107,202 @@ import axios from "axios";
import {filterLog, downloadLog, deleteLog} from "../../api/basic/udiInfoExport"; import {filterLog, downloadLog, deleteLog} from "../../api/basic/udiInfoExport";
import udiInfoSelect from "./UdIInfoSelect"; import udiInfoSelect from "./UdIInfoSelect";
import store from "@/store"; import store from "@/store";
import {formatDate} from "@/utils/date";
export default { export default {
data() { data() {
return { return {
filterQuery: { filterQuery: {
// type: 1, // type: 1,
genKey: null, genKey: null,
status: null, status: null,
fromType: null, fromType: null,
page: 1, page: 1,
limit: 20, limit: 20,
thirdSysFk: null, thirdSysFk: null,
}, },
selectType: 0, selectType: 0,
udiImportDetailVisible: false, udiImportDetailVisible: false,
list: [], list: [],
detailList: [], detailList: [],
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
total: 0, total: 0,
editQuery: null, editQuery: null,
fromStatus: { fromStatus: {
0: "产品信息", 0: "产品信息",
1: "库存信息", 1: "库存信息",
2: "异常第三方上传" 2: "异常第三方上传"
}, },
status: { status: {
0: "等待处理", 0: "等待处理",
1: "正在处理", 1: "正在处理",
2: "处理异常", 2: "处理异常",
3: "处理完成" 3: "处理完成"
}, },
typeMap: { typeMap: {
1: '文件导出', 1: '文件导出',
2: '网络同步', 2: '网络同步',
}, },
uploadFileUrl: null, uploadFileUrl: null,
uploadData: { uploadData: {
thirdSys: "thirdId", thirdSys: "thirdId",
}, },
}; };
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.filterQuery = {
type: 1,
fromType: null,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
filterLog(this.filterQuery)
.then((response) => {
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
}, },
methods: { exportExcel() {
onReset() { this.selectType = 0;
this.$router.push({ this.udiImportDetailVisible = true;
path: "", },
}); uploadSmp() {
this.filterQuery = { this.selectType = 1;
type: 1, this.udiImportDetailVisible = true;
fromType: null, },
genKey: null, downloadExcel(row) {
status: null, axios.get("./config.json").then(res => {
page: 1, let baseUrl = res.data.BASE_URL;
limit: 20, let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey;
thirdSysFk: null, let a = document.createElement("a");
}; var timestamp = formatDate(new Date(), "yyyyMMddhhmmss");
this.getList(); fetch(href)
}, .then((res) => res.blob())
getList() { .then((blob) => {
this.loading = true; a.href = URL.createObjectURL(blob);
filterLog(this.filterQuery)
.then((response) => { a.download = "BaseProduct_" + timestamp + ".LowerIn";
this.loading = false;
this.list = response.data.list || [];
this.total = response.data.total || 0;
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
exportExcel() { // a.download =
this.selectType = 0; // row.filePath.split("\\")[
this.udiImportDetailVisible = true; // row.filePath.split("\\").length - 1
}, // ]; // //
uploadSmp() { document.body.appendChild(a);
this.selectType = 1; a.click();
this.udiImportDetailVisible = true; this.getList();
},
downloadExcel(row) {
axios.get("./config.json").then(res => {
let baseUrl = res.data.BASE_URL;
let href = baseUrl + "/udiwms/products/exportLog/download" + "?genKey=" + row.genKey;
let a = document.createElement("a");
fetch(href)
.then((res) => res.blob())
.then((blob) => {
a.href = URL.createObjectURL(blob);
a.download =
row.filePath.split("\\")[
row.filePath.split("\\").length - 1
]; // //
document.body.appendChild(a);
a.click();
this.getList();
});
}); });
}, });
},
cancelDialog(val) { cancelDialog(val) {
this.udiImportDetailVisible = false; this.udiImportDetailVisible = false;
if (val) { if (val) {
this.getList(); this.getList();
} }
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.filterQuery.page = val; this.filterQuery.page = val;
this.getList(); this.getList();
}, },
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(() => {
this.loading = false;
});
}) })
.catch(() => { .catch(() => {
this.loading = false;
}); });
}, })
handleChange(response, files, fileList) { .catch(() => {
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.getList();
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
},
},
mounted() {
}, },
components: {udiInfoSelect}, handleChange(response, files, fileList) {
created() { console.log(response);
// this.getBasicThirdSys(); if (response.code != 20000) {
this.$message.error(response.message);
} else {
// console.log(files[0] + "\n" + this.fileList[0] + "\n" + fileList[0]);
this.getList(); this.getList();
this.$message.success("文件上传成功,请稍后刷新查看!");
}
},
statusFilterType(status) {
const statusMap = {
0: "warning",
1: "warning",
2: "danger",
3: "success",
};
return statusMap[status];
}, },
},
mounted() {
},
components: {udiInfoSelect},
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>

@ -104,14 +104,14 @@
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
:disabled="scope.row.pid!=0" <!-- :disabled="scope.row.pid!=0"-->
@click.native.stop="handleSubForm(node, scope.row, 'add')" <!-- @click.native.stop="handleSubForm(node, scope.row, 'add')"-->
>添加货位 <!-- >添加货位-->
</el-button <!-- </el-button-->
> <!-- >-->
<el-button <el-button
type="text" type="text"
size="small" size="small"
@ -476,6 +476,13 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="12" class="el-col">
<div class="text item">
<el-checkbox v-model="formData.spUse" :disabled="formData.level!='1'">使</el-checkbox>
</div>
</el-col>
</el-row>
<!-- <el-form-item v-if="formData.pid == 0">--> <!-- <el-form-item v-if="formData.pid == 0">-->
@ -507,109 +514,6 @@
</el-dialog> </el-dialog>
<!-- <el-dialog-->
<!-- :title="formMap[formName]"-->
<!-- :close-on-click-modal="false"-->
<!-- :close-on-press-escape="false"-->
<!-- :visible.sync="formVisible"-->
<!-- :before-close="hideForm"-->
<!-- width="60%"-->
<!-- top="5vh"-->
<!-- >-->
<!-- <el-table v-if="thirdSysVisible" :data="sysList" style="width: 100%; margin-bottom: 30px;" 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="第三方仓库ID"-->
<!-- prop="thirdId"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column-->
<!-- label="第三方仓库名称"-->
<!-- prop="thirdName"-->
<!-- show-overflow-tooltip-->
<!-- ></el-table-column>-->
<!-- <el-table-column label="操作" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click="intentSelect(scope.row)"-->
<!-- >关联-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button type="text" size="small" @click.native.stop="unbindThrWarehouse(scope.row)"-->
<!-- :disabled="scope.row.thirdId=='' ||scope.row.thirdId==null"-->
<!-- >解绑-->
<!-- </el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <el-form :model="formData" :rules="formRules" ref="dataForm">-->
<!-- <el-form-item label="仓库编码" prop="title" class="query-form-item">-->
<!-- <el-input-->
<!-- v-model="formData.code" style="width: 80%"-->
<!-- auto-complete="off"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="仓库名称" prop="name" class="query-form-item">-->
<!-- <el-input-->
<!-- v-model="formData.name" style="width: 80%"-->
<!-- auto-complete="off"-->
<!-- ></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item class="query-form-item" label="仓库类型:">-->
<!-- <el-select v-model="formData.advanceType" placeholder="仓库类型" clearable>-->
<!-- <el-option label="寄售" :value='true'></el-option>-->
<!-- <el-option label="仓库" :value='false'></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="状态:" prop="status" class="query-form-item">-->
<!-- <el-radio-group v-model="formData.status">-->
<!-- <el-radio :label="0">禁用</el-radio>-->
<!-- <el-radio :label="1">正常</el-radio>-->
<!-- </el-radio-group>-->
<!-- </el-form-item>-->
<!-- &lt;!&ndash; <el-form-item v-if="formData.pid == 0">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-row :gutter="20" class="el-row" type="flex">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-col :span="4" class="el-col">&ndash;&gt;-->
<!-- &lt;!&ndash; <div class="text item">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-checkbox v-model="formData.advanceType"></el-checkbox>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- &lt;!&ndash; <el-col :span="4" class="el-col">&ndash;&gt;-->
<!-- &lt;!&ndash; <div class="text item">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-checkbox v-model="formData.isDefault"></el-checkbox>&ndash;&gt;-->
<!-- &lt;!&ndash; </div>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-row>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click.native="hideForm">取消</el-button>-->
<!-- <el-button-->
<!-- type="primary"-->
<!-- @click.native="formSubmit()"-->
<!-- :loading="formLoading"-->
<!-- >提交-->
<!-- </el-button-->
<!-- >-->
<!-- </div>-->
<!-- </el-dialog>-->
<el-dialog title="关联仓库" :visible.sync="thrWareHouseVisible"> <el-dialog title="关联仓库" :visible.sync="thrWareHouseVisible">
<el-table <el-table
:data="thrWarehouseData" :data="thrWarehouseData"
@ -1031,8 +935,9 @@ export default {
); );
this.loading = false; this.loading = false;
const eleLink = document.createElement('a'); const eleLink = document.createElement('a');
var timestamp = formatDate(new Date(), "yyyy-MM-dd_hh:mm") var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
eleLink.download = "仓库信息导出" + timestamp + ".udi"; // eleLink.download = "" + timestamp + ".udi";
eleLink.download = "BaseWarehouse_" + timestamp + ".LowerIn";
eleLink.style.display = 'none'; eleLink.style.display = 'none';
eleLink.href = url; eleLink.href = url;
document.body.appendChild(eleLink) document.body.appendChild(eleLink)

@ -101,8 +101,8 @@
<el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip <el-table-column label="供应商" prop="companyName" v-if="showSup" show-overflow-tooltip
width="120"></el-table-column> width="120"></el-table-column>
<el-table-column label="仓库" prop="invStorageName" v-if="showSup" <!-- <el-table-column label="仓库" prop="invStorageName" v-if="showSup"-->
show-overflow-tooltip width="120"></el-table-column> <!-- show-overflow-tooltip width="120"></el-table-column>-->
</el-table> </el-table>
</el-card> </el-card>

@ -3,7 +3,7 @@
<div> <div>
<h3 class="toptitle">诏安县总医院</h3> <h3 class="toptitle">平和县医院</h3>
</div> </div>
<el-form <el-form

@ -297,6 +297,15 @@ export default {
}, },
methods: { methods: {
/*eslint-disable */ /*eslint-disable */
// <el-button
// style="font-size: 12px;"
// type="text"
// on-click={() => this.handleSubForm(node, data, "add")}
// >
//
// </el-button>
renderContent(h, {node, data, store}) { renderContent(h, {node, data, store}) {
return ( return (
<span <span
@ -306,13 +315,7 @@ export default {
<span style="margin-left:18px">(编码{data.code})</span> <span style="margin-left:18px">(编码{data.code})</span>
</span> </span>
<span> <span>
<el-button
style="font-size: 12px;"
type="text"
on-click={() => this.handleSubForm(node, data, "add")}
>
添加货位
</el-button>
<el-button <el-button
style="font-size: 12px;" style="font-size: 12px;"
type="text" type="text"

@ -74,10 +74,17 @@
<el-table-column label="往来单位ID" prop="corpId"></el-table-column> <el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName" <el-table-column label="往来单位" prop="corpName"
show-overflow-tooltip="true"></el-table-column> show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据状态" prop="billFlag"></el-table-column> <!-- <el-table-column label="单据状态" prop="billFlag"></el-table-column>-->
<el-table-column label="单据日期" prop="billdate"></el-table-column> <el-table-column label="单据日期" prop="billdate"></el-table-column>
<el-table-column label="操作" fixed="right"> <el-table-column label="操作" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native="newDistributionForm(scope.$index, scope.row)"
>编辑
</el-button
>
<el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)" <el-button type="text" size="small" @click.native.stop="deleteDialog(scope.row)"
>删除 >删除
</el-button> </el-button>
@ -100,8 +107,8 @@
<el-table-column label="批次号" prop="batchNo"></el-table-column> <el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column> <el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column> <el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="reCount"></el-table-column> <!-- <el-table-column label="单据数量" prop="reCount"></el-table-column>-->
<el-table-column label="实际数量" prop="count"></el-table-column> <el-table-column label="单据数量" prop="count"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
@ -117,6 +124,7 @@
<thrOrderNew <thrOrderNew
:closeDialog="closeDialog" :closeDialog="closeDialog"
:idQuery="idQuery" :idQuery="idQuery"
:closeConfirmFunction="closeConfirmFunction"
></thrOrderNew> ></thrOrderNew>
</el-dialog> </el-dialog>
</div> </div>
@ -134,6 +142,8 @@ import {
getCloudErp, getCloudErp,
} from "../../api/inout/erpOrder"; } from "../../api/inout/erpOrder";
import thrOrderNew from "./thrOrderNew"; import thrOrderNew from "./thrOrderNew";
import store from "@/store";
export default { export default {
data() { data() {
return { return {
@ -145,7 +155,10 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1,
editStatus: 1,
}, },
idQuery: {},
total: 0, total: 0,
thirdSys: [], thirdSys: [],
thirdSysDetail: null, thirdSysDetail: null,
@ -158,6 +171,7 @@ export default {
uploadData: { uploadData: {
thirdSys: "thirdId", thirdSys: "thirdId",
}, },
closeConfirm: false,
loading: false, loading: false,
actDateRange: [], actDateRange: [],
newSpDistributionVisible: false, newSpDistributionVisible: false,
@ -210,6 +224,8 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1,
editStatus: 1,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -381,7 +397,11 @@ export default {
} }
} }
}, },
closeConfirmFunction(type) {
if (this.$isNotBlank(type) && type) {
this.closeConfirm = type;
}
},
getlocalName(action) { getlocalName(action) {
for (let i = 0; i < this.busTypes.length; i++) { for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) { if (this.busTypes[i].action === action) {
@ -418,6 +438,16 @@ export default {
this.detailList = []; this.detailList = [];
}, },
newDistributionForm(index, row) {
this.idQuery.id = '';
if (this.$isNotBlank(row) && this.$isNotBlank(row.id)) {
this.idQuery.id = row.id;
this.idQuery.formData = row;
}
this.newSpDistributionVisible = true;
},
}, },
components: { components: {
thrOrderNew, thrOrderNew,

@ -98,7 +98,7 @@
<el-table-column label="往来单位ID" prop="corpId"></el-table-column> <el-table-column label="往来单位ID" prop="corpId"></el-table-column>
<el-table-column label="往来单位" prop="corpName" <el-table-column label="往来单位" prop="corpName"
show-overflow-tooltip="true"></el-table-column> show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据状态" prop="billFlag"></el-table-column> <!-- <el-table-column label="单据状态" prop="billFlag"></el-table-column>-->
<el-table-column label="单据日期" prop="billdate"></el-table-column> <el-table-column label="单据日期" prop="billdate"></el-table-column>
@ -167,6 +167,8 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1,
editStatus: 0,
}, },
total: 0, total: 0,
thirdSys: [], thirdSys: [],
@ -231,6 +233,8 @@ export default {
page: 1, page: 1,
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1,
editStatus: 0,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();

@ -136,8 +136,8 @@
<el-table-column label="批次号" prop="batchNo"></el-table-column> <el-table-column label="批次号" prop="batchNo"></el-table-column>
<el-table-column label="生产日期" prop="productDate"></el-table-column> <el-table-column label="生产日期" prop="productDate"></el-table-column>
<el-table-column label="失效日期" prop="expireDate"></el-table-column> <el-table-column label="失效日期" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="reCount"></el-table-column> <!-- <el-table-column label="单据数量" prop="reCount"></el-table-column>-->
<el-table-column label="实际数量" prop="count"></el-table-column> <el-table-column label="单据数量" prop="count"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</div> </div>

@ -13,7 +13,7 @@
> >
<el-button <el-button
type="primary" type="primary"
@click.native="saveOrder('2')" @click.native="saveOrder('0')"
:loading="loading" :loading="loading"
>提交单据 >提交单据
</el-button </el-button
@ -65,10 +65,10 @@
@change="actionChange" clearable> @change="actionChange" clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.localAction" :key="item.thirdAction"
:label="item.localName" :label="item.thirdName"
:value="item.localAction"> :value="item.thirdAction">
<span style="float: left">{{ item.localName }}</span> <span style="float: left">{{ item.thirdName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -344,7 +344,7 @@ import {
addStockOrderDetailFromCode, addStockOrderDetailFromCode,
uploadStockOrderDetail, uploadStockOrderDetail,
stockOrderDetailQueryProduct, stockOrderDetailQueryProduct,
getStockOrderDetailInstrumentById, stockOrderDetail2 getStockOrderDetailInstrumentById, stockOrderDetail2, generateBillNoInt
} from "../../api/warehouse/stockOrder"; } from "../../api/warehouse/stockOrder";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import {saveAs} from "file-saver"; import {saveAs} from "file-saver";
@ -356,6 +356,9 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType"; import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse"; import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct" import dialogInvProduct from "../inventory/DialogInvProduct"
import {getOriginJoinBusType} from "@/api/basic/busOriginType";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails} from "@/api/thrsys/thrOrder";
export default { export default {
name: "idQuery", name: "idQuery",
@ -441,6 +444,7 @@ export default {
thisData: {}, thisData: {},
storageList: [], storageList: [],
invQueryData: {}, invQueryData: {},
}; };
}, },
components: { components: {
@ -473,7 +477,7 @@ export default {
} }
if (status === '3') { if (status === '0') {
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
@ -491,7 +495,7 @@ export default {
} }
} }
if (status === '2') { if (status === '0') {
for (let i = 0; i < this.codeArray.length; i++) { for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") { if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0'); return this.$message.error('单据数量不能为0');
@ -499,33 +503,22 @@ export default {
} }
} }
if (status == "1") {
if (status === '501') {
this.submitFunction(status); this.submitFunction(status);
} else { } else {
let tip = "是否确定提交订单?";
if (status == "1") { this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status); this.submitFunction(status);
} else { }).catch(() => {
let tip = "是否确定提交订单?"; this.loading = false;
if (status == "2") { });
tip = "是否确定提交单据为未配货?"; }
} else if (status == "3") {
tip = "是否确定提交单据为已配货?";
}
this.$confirm(tip, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
this.submitFunction(status);
}).catch(() => {
this.loading = false;
});
}
}
} }
}); });
}, },
@ -576,19 +569,11 @@ export default {
let tMessage = status === '501' ? '保存' : '提交'; let tMessage = status === '501' ? '保存' : '提交';
this.loading = true; this.loading = true;
let tQuery = this.formData; let tQuery = this.formData;
tQuery.status = status; tQuery.editStatus = status;
// if (!this.orderEditor) {
tQuery.subErpOrders = this.codeArray; tQuery.subErpOrders = this.codeArray;
if (status == '3') { // tQuery.billType = this.formData.bi;
tQuery.subErpOrders.forEach((obj) => {
obj.reCount = obj.count;
console.log(obj.reCount);
});
}
console.log(tQuery); console.log(tQuery);
insertStockOrderWeb(tQuery) inserThrOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
@ -602,34 +587,6 @@ export default {
this.loading = false; this.loading = false;
}) })
}, },
submit(formName) {
if (this.total < 1) {
this.$message.warning('未添加产品');
return;
}
this.$confirm("是否提交?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
}).then(() => {
let tQuery = {
id: this.idQuery.id
}
this.loading = true;
submitStockOrder(tQuery)
.then((response) => {
this.loading = false;
if (response.code === 20000) {
this.$message.success("提交成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
});
}).catch(() => {
this.loading = false;
});
},
selectProductFunction(event) { selectProductFunction(event) {
if (event == null) { if (event == null) {
@ -654,18 +611,23 @@ export default {
if (this.orderEditor) { if (this.orderEditor) {
this.thisData.orderId = this.formData.id this.thisData.orderId = this.formData.id
} }
this.curAction = this.getActionItem(this.formData.billType);
this.thisData.stockOrderLists = this.codeArray; this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData; this.thisData.formData = this.formData;
let item = this.getActionItem(this.formData.billType); this.thisData.formData.thirdSysFk = this.curAction.thirdSys;
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) { this.thisData.billType = this.curAction.localAction;
// this.thisData.formData.billType = this.curAction.localAction;
if (this.curAction.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
this.invQueryData = { this.invQueryData = {
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
}; };
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
} else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) { } else if (this.curAction.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
this.invQueryData = { this.invQueryData = {
locStorageCode: this.formData.corpId, locStorageCode: this.formData.corpId,
}; };
console.log("his.invQueryData " + this.invQueryData.locStorageCode); console.log("his.invQueryData " + this.invQueryData.locStorageCode);
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
@ -676,66 +638,66 @@ export default {
return; return;
} }
this.code = this.code.trim(); // this.code = this.code.trim();
//
if (this.code.length > 13) { // if (this.code.length > 13) {
let tStr = this.code.substring(0, 2); // let tStr = this.code.substring(0, 2);
tStr = tStr.replace('m', 'M'); // tStr = tStr.replace('m', 'M');
tStr = tStr.replace('a', 'A'); // tStr = tStr.replace('a', 'A');
if (tStr.indexOf("MA") !== -1) { // if (tStr.indexOf("MA") !== -1) {
this.code = tStr + this.code.substring(2, this.code.length); // this.code = tStr + this.code.substring(2, this.code.length);
} // }
} // }
//
this.loading = true; // this.loading = true;
let tQuery = { // let tQuery = {
code: this.code, // code: this.code,
customerId: store.getters.customerId, // customerId: store.getters.customerId,
}; // };
//
stockOrderDetailQueryProduct(tQuery).then((response) => { // stockOrderDetailQueryProduct(tQuery).then((response) => {
this.loading = false; // this.loading = false;
console.log(response) // console.log(response)
if (response.code === 20000) { // if (response.code === 20000) {
if (response.data.getType === "1") { // if (response.data.getType === "1") {
this.loading = true; // this.loading = true;
//
let ids = [response.data.getId]; // let ids = [response.data.getId];
let tQuery2 = { // let tQuery2 = {
ids: ids, // ids: ids,
udiEntity: response.data // udiEntity: response.data
}; // };
getStockOrderDetailInstrumentById(tQuery2).then((response) => { // getStockOrderDetailInstrumentById(tQuery2).then((response) => {
this.loading = false; // this.loading = false;
if (response.code === 20000) { // if (response.code === 20000) {
this.closeDialogC2(response.data); // this.closeDialogC2(response.data);
} else { // } else {
this.$message.error(response.message); // this.$message.error(response.message);
} // }
}).catch(() => { // }).catch(() => {
this.loading = false; // this.loading = false;
}); // });
} else { // } else {
this.thisData = response.data; // this.thisData = response.data;
this.thisData.code = this.code; // this.thisData.code = this.code;
this.thisData.orderEditor = this.orderEditor; // this.thisData.orderEditor = this.orderEditor;
this.thisData.orderId = ""; // this.thisData.orderId = "";
if (this.orderEditor) { // if (this.orderEditor) {
this.thisData.orderId = this.formData.id // this.thisData.orderId = this.formData.id
} // }
this.thisData.stockOrderLists = this.codeArray; // this.thisData.stockOrderLists = this.codeArray;
this.selectProductVisible = true; // this.selectProductVisible = true;
} // }
} else { // } else {
this.$message.warning(response.message); // this.$message.warning(response.message);
// this.focusNext('inputRef'); // // this.focusNext('inputRef');
if (this.$isNotBlank(event)) { // if (this.$isNotBlank(event)) {
event.target.select(); // event.target.select();
} // }
// event.target.select(); // // event.target.select();
// event.currentTarget.select(); // // event.currentTarget.select();
} // }
}); // });
}, },
@ -956,21 +918,6 @@ export default {
cancelButtonText: "取消", cancelButtonText: "取消",
type: "warning", type: "warning",
}).then(() => { }).then(() => {
// let tQuery = {
// id: row.id
// }
// this.detailLoading = true;
// copyStockOrderDetail(tQuery)
// .then((response) => {
// this.detailLoading = false;
// if (response.code === 20000) {
// this.$message.success("");
// this.getStockOrderDetailList();
// } else {
// this.$message.error(response.message);
// }
// });
let rData = JSON.parse(JSON.stringify(row)); let rData = JSON.parse(JSON.stringify(row));
rData.id = null; rData.id = null;
if (this.codeArray.length === 0) { if (this.codeArray.length === 0) {
@ -1007,7 +954,7 @@ export default {
}, },
getStockOrderDetailList() { getStockOrderDetailList() {
this.loading = true; this.loading = true;
stockOrderDetail(this.query) // getThrOrderDetails(this.query) //
.then((response) => { .then((response) => {
console.log(response) console.log(response)
this.codeArray = response.data.list || []; this.codeArray = response.data.list || [];
@ -1028,7 +975,7 @@ export default {
action: this.formData.billType action: this.formData.billType
} }
this.loading = true; this.loading = true;
stockOrderGenerateBillNo(tQuery) generateBillNoInt(tQuery)
.then((response) => { .then((response) => {
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
@ -1045,7 +992,7 @@ export default {
enabled: true, enabled: true,
// code: invCode, // code: invCode,
}; };
getLocalJoinByUser(query) getOriginJoinBusType(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
}) })
@ -1098,19 +1045,16 @@ export default {
}, },
getActionItem(action) { getActionItem(action) {
for (let i = 0; i < this.busTypes.length; i++) { for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].localAction === action) { if (this.busTypes[i].thirdAction === action) {
return this.busTypes[i]; return this.busTypes[i];
} }
} }
}, },
actionChange(item) { actionChange(item) {
// console.log("item = " + item); console.log(item);
// if (item == '') {
// this.formData.locStorageCode == null;
// } else {
this.curAction = this.getActionItem(item); this.curAction = this.getActionItem(item);
this.formData.locStorageCode = this.curAction.storageCode; // this.formData.locStorageCode = this.curAction.storageCode;
console.log(this.curAction.corpType + "---" + this.formData.locStorageCode + "-----" + this.curAction.action); console.log(this.curAction.corpType + "---" + "-----" + this.curAction.action);
this.findMethod(); this.findMethod();
// } // }

@ -1065,6 +1065,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -1245,8 +1249,6 @@ export default {
let query = this.$route.query; let query = this.$route.query;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
//
this.getList();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);

@ -24,6 +24,18 @@
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
size="mini">
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item> <el-form-item>
<el-button-group> <el-button-group>
<el-button <el-button
@ -212,7 +224,7 @@
:close-on-press-escape="false" :close-on-press-escape="false"
v-if="dialogStorageVisible" v-if="dialogStorageVisible"
> >
<dialogSelectInvStorage v-on:selectStorage="selectStorage"></dialogSelectInvStorage> <dialogSelectInvStorage v-on:selectStorage="selectStorage"></dialogSelectInvStorage>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
@ -256,6 +268,7 @@ import store from "../../store";
import {getBussinessType} from "../../api/basic/bussinessType"; import {getBussinessType} from "../../api/basic/bussinessType";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain"; import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {getLocalJoinByUser} from "@/api/basic/busLocalType"; import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterAllByUser} from "@/api/basic/invWarehouse";
const formJson = { const formJson = {
site_id: "", site_id: "",
@ -273,6 +286,7 @@ export default {
action: null, action: null,
page: 1, page: 1,
limit: 20, limit: 20,
locStorageCode:null,
}, },
checkStatus: { checkStatus: {
'-1': "等待提交", '-1': "等待提交",
@ -303,6 +317,7 @@ export default {
"7": "UDI供应商平台", "7": "UDI供应商平台",
"8": "平衡补录单据", "8": "平衡补录单据",
}, },
storageList: [],
list: [], list: [],
adId: [], adId: [],
adSelectList: [], adSelectList: [],
@ -310,7 +325,7 @@ export default {
adListNoDataText: "无数据", adListNoDataText: "无数据",
queryAdIdAsyncLoading: false, queryAdIdAsyncLoading: false,
codeDetailVisible: false, codeDetailVisible: false,
dialogStorageVisible:false, dialogStorageVisible: false,
total: 0, total: 0,
loading: true, loading: true,
index: null, index: null,
@ -423,7 +438,7 @@ export default {
this.loading = true; this.loading = true;
this.filterQuery.status = 3; this.filterQuery.status = 3;
this.filterQuery.customerId = store.getters.customerId; this.filterQuery.customerId = store.getters.customerId;
orderListError(this.filterQuery) filterOrder(this.filterQuery)
.then((response) => { .then((response) => {
console.log(response) console.log(response)
this.loading = false; this.loading = false;
@ -524,6 +539,18 @@ export default {
} }
} }
}, },
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code;
}
})
.catch(() => {
});
},
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {
@ -547,6 +574,7 @@ export default {
this.filterQuery.limit = parseInt(this.filterQuery.limit); this.filterQuery.limit = parseInt(this.filterQuery.limit);
// //
this.getList(); this.getList();
this.getStorage();
}, },
}; };
</script> </script>

File diff suppressed because it is too large Load Diff

@ -610,6 +610,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -701,8 +705,9 @@ export default {
// window.open(url); // window.open(url);
this.loading = false; this.loading = false;
const eleLink = document.createElement('a'); const eleLink = document.createElement('a');
var timestamp = formatDate(new Date(), "yyyy-MM-dd_hh:mm") var timestamp = formatDate(new Date(), "yyyyMMddhhmmss")
eleLink.download = "已完成单据导出" + timestamp + ".json"; // var timestamp = formatDate(new Date(), "yyyy-MM-dd_hh:mm")
eleLink.download = "Order_" + timestamp + ".LowerIn";
eleLink.style.display = 'none'; eleLink.style.display = 'none';
eleLink.href = url; eleLink.href = url;
document.body.appendChild(eleLink) document.body.appendChild(eleLink)
@ -960,8 +965,6 @@ export default {
let query = this.$route.query; let query = this.$route.query;
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
//
this.getList();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);

@ -969,6 +969,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.filterQuery.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -997,7 +1001,6 @@ export default {
this.query = Object.assign(this.query, query); this.query = Object.assign(this.query, query);
this.query.limit = parseInt(this.query.limit); this.query.limit = parseInt(this.query.limit);
// //
this.getList();
let end = new Date(); let end = new Date();
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);

@ -603,7 +603,7 @@ export default {
getStorage(event) { getStorage(event) {
let query = { let query = {
// advanceType: this.getActionName(event), // advanceType: this.getActionName(event),
isDefault: true, spUse: true,
}; };
this.storageList = []; this.storageList = [];
// this.formData.locStorageCode = null; // this.formData.locStorageCode = null;

@ -310,7 +310,8 @@ export default {
if (this.$isBlank(this.currentRow.id)) { if (this.$isBlank(this.currentRow.id)) {
return; return;
} }
if (this.curLocInv == null) { this.curLocInv = this.currentRow.locStorageCode;
if (this.$isBlank(this.curLocInv)) {
this.storageVisible = true; this.storageVisible = true;
} else { } else {
let tQuery = { let tQuery = {

File diff suppressed because it is too large Load Diff

@ -131,13 +131,13 @@
>发票 >发票
</el-button </el-button
> >
<el-button <!-- <el-button-->
type="text" <!-- type="text"-->
size="small" <!-- size="small"-->
@click.native="generOrder(scope.row)" <!-- @click.native="generOrder(scope.row)"-->
>生成单据 <!-- >复制-->
</el-button <!-- </el-button-->
> <!-- >-->
<!-- v-if="haveDistributionVisible"--> <!-- v-if="haveDistributionVisible"-->
@ -834,6 +834,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -902,7 +906,7 @@ export default {
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getList();
} }
} }
</script> </script>

@ -917,6 +917,9 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code;
}
}) })
.catch(() => { .catch(() => {
}); });

@ -895,6 +895,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -935,7 +939,7 @@ export default {
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getList();
} }
} }
</script> </script>

@ -1098,7 +1098,7 @@ export default {
console.log("-----" + event); console.log("-----" + event);
let query = { let query = {
advanceType: this.getActionName(event), advanceType: this.getActionName(event),
isDefault: true, spUse: true,
}; };
this.storageList = []; this.storageList = [];
filterAll(query) filterAll(query)

@ -325,7 +325,10 @@ export default {
if (this.$isNotBlank(this.data)) { if (this.$isNotBlank(this.data)) {
console.log(this.data.stockOrderLists); console.log(this.data.stockOrderLists);
this.listQuery.nameCode = this.data.udi; this.listQuery.nameCode = this.data.udi;
this.listQuery.billType = this.data.formData.billType; if (this.data.billType != null) {
this.listQuery.billType = this.data.billType;
} else
this.listQuery.billType = this.data.formData.billType;
this.listQuery.corpId = this.data.formData.corpId; this.listQuery.corpId = this.data.formData.corpId;
this.orderEditor = this.data.orderEditor; this.orderEditor = this.data.orderEditor;
this.orderId = this.data.orderId; this.orderId = this.data.orderId;

@ -935,6 +935,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -1010,7 +1014,6 @@ export default {
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getList();
} }
} }
</script> </script>

@ -754,6 +754,10 @@ export default {
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length > 0) {
this.query.locStorageCode = this.storageList[0].code;
this.getList();
}
}) })
.catch(() => { .catch(() => {
}); });
@ -822,7 +826,6 @@ export default {
let start = new Date(); let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end]; this.actDateRange = [start, end];
this.getList();
} }
} }
</script> </script>

Loading…
Cancel
Save