领用单据功能完善

tagView
anthonywj 2 years ago
parent a5e48ce6df
commit 7527400e6d

@ -25,6 +25,15 @@ export function addStockOrder(query) {
}); });
} }
export function addReceiveOrder(query) {
return axios({
url: "/udiwms/receive/addStockOrder",
method: "get",
params: query
});
}
export function getErpMainOrderStatus(query) { export function getErpMainOrderStatus(query) {
return axios({ return axios({

@ -0,0 +1,13 @@
import axios from "../../utils/axios";
//--------------获取领用单据-------------------
export function getReceiveOrder(query) {
return axios({
url: "/udiwms/receive/order/filter",
method: "get",
params: query
});
}

@ -7,3 +7,12 @@ export function inserThrOrderWeb(query) {
data: query data: query
}); });
} }
export function updateReceive(query) {
return axios({
url: "/udiwms/receive/order/update",
method: "post",
data: query
});
}

@ -104,6 +104,10 @@ export default {
invQueryData: { invQueryData: {
type: Object, type: Object,
required: true, required: true,
},
type: {
type: Object,
required: true,
} }
}, },
data() { data() {
@ -299,6 +303,7 @@ export default {
let tQuery = { let tQuery = {
datas: ids, datas: ids,
stockOrderLists: this.data.stockOrderLists, stockOrderLists: this.data.stockOrderLists,
type: this.type,
}; };
getStockOrderDetailInstrumentById(tQuery).then((response) => { getStockOrderDetailInstrumentById(tQuery).then((response) => {
this.loading = false; this.loading = false;

@ -1,12 +1,9 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form :inline="true" :model="filterQuery" <el-form :inline="true" :model="filterQuery"
class="query-form" size="mini"> 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 <el-input
v-model="filterQuery.billNo" v-model="filterQuery.billNo"
@ -23,7 +20,7 @@
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="filterQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true"> <el-select v-model="filterQuery.billAction" placeholder="单据类型" clearable="true">
<el-option <el-option
v-for="item in originTypes" v-for="item in originTypes"
:key="item.name" :key="item.name"
@ -65,14 +62,12 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true" <el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row="true"
@current-change="handleDetail"> @current-change="handleDetail">
<el-table-column label="序号" type="index" width="60"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="第三方单据类型" prop="billTypeName"></el-table-column> <el-table-column label="领用类型" prop="billTypeName"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="单据号" prop="billNo"></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="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">
@ -124,6 +119,7 @@
:closeDialog="closeDialog" :closeDialog="closeDialog"
:idQuery="idQuery" :idQuery="idQuery"
:closeConfirmFunction="closeConfirmFunction" :closeConfirmFunction="closeConfirmFunction"
:editType="formName"
></thrOrderNew> ></thrOrderNew>
</el-dialog> </el-dialog>
</div> </div>
@ -141,7 +137,7 @@ import {
getCloudErp, getCloudErp,
} from "../../api/inout/erpOrder"; } from "../../api/inout/erpOrder";
import thrOrderNew from "./thrOrderNew"; import thrOrderNew from "./thrOrderNew";
import store from "@/store"; import {getReceiveOrder} from "@/api/inout/receiveOrder";
export default { export default {
data() { data() {
@ -156,7 +152,7 @@ export default {
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
thirdPartyDate:2, thirdPartyDate: 2,
}, },
formName: null, formName: null,
formMap: { formMap: {
@ -232,7 +228,7 @@ export default {
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 1, editStatus: 1,
thirdPartyDate:2, thirdPartyDate: 2,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -256,7 +252,7 @@ export default {
this.filterQuery.endDate = null; this.filterQuery.endDate = null;
} }
this.loading = true; this.loading = true;
getCloudErp(this.filterQuery) getReceiveOrder(this.filterQuery)
.then((response) => { .then((response) => {
if (response.code == 20000) { if (response.code == 20000) {
this.list = response.data.list || []; this.list = response.data.list || [];

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

File diff suppressed because it is too large Load Diff

@ -0,0 +1,393 @@
<template>
<div>
<el-card class="el-card" style="margin-top: -15px">
<div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input
v-model="listQuery.billNo"
placeholder="单据号"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input
v-model="listQuery.corpName"
placeholder="往来单位"
clearable
></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="listQuery.billAction" placeholder="请选择领用类型" clearable="true">
<el-option
v-for="item in originTypes"
:key="item.originAction"
:label="item.originName"
:value="item.originAction">
<span style="float: left;font-size: 13px">{{ item.originAction }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.originName
}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px"
>单据日期:</span
>
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
type="daterange"
format="yyyy 年 MM 月 dd 日"
value-format="yyyy-MM-dd"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item style="display: flex">
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="submitFind"></el-button>
<el-button type="primary" icon="search" @click="combine"
>确定
</el-button
>
</el-button-group>
</el-form-item>
</el-row>
<el-row>
</el-row>
</el-form>
<el-table
:data="dataList"
style="width: 100%"
highlight-current-row="true"
v-loading="loading"
:row-class-name="tableRowClassName"
@current-change="handleChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column>
<el-table-column label="往来单位" prop="corpName" width="300"
show-overflow-tooltip="true"></el-table-column>
<el-table-column label="单据类型" prop="billType"></el-table-column>
<el-table-column label="单据状态" prop="billFlag" width="80"></el-table-column>
<el-table-column label="单据日期" prop="billdate"></el-table-column>
</el-table>
<el-pagination
:page-size="listQuery.limit"
@current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></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="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog
v-if="storageVisible"
title="请选择单据所属仓库信息"
:close-on-click-modal="false"
:close-on-press-escape="false"
append-to-body
:visible.sync="storageVisible">
<selectInvDialog
:closeInvDialog="closeInvDialog"
:billData="currentRow"
:closeSubmitDialog="closeSubmitDialog"
></selectInvDialog>
</el-dialog>
</div>
</template>
<script>
import {addReceiveOrder, addStockOrder, getCloudErp} from "../../api/inout/erpOrder";
import {getLocalJoinBusType} from "../../api/basic/busLocalType";
import store from "../../store";
import {getOriginBusType} from "@/api/basic/busOriginType";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import selectInvDialog from "./DialogSelectInv";
import {getReceiveOrder} from "@/api/inout/receiveOrder";
import {getBusChange} from "@/api/basic/busTypeChange";
export default {
name: "closeDialog",
props: {
data: {
type: Object,
required: true,
},
closeDialog: {
type: Function,
required: true,
},
},
data() {
return {
listQuery: {
billNo: "",
thirdSysFk: "",
billAction: null,
originType: null,
page: 1,
limit: 10,
type: 1,
editStatus: 2,
allocateStatus: 0,
customerId: null,
},
detailList: [],
storageVisible: false,
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
curLocInv: null,
loading: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
originTypes: [],
storageList: [],
actDateRange: [],
pickerOptions: {
shortcuts: [
{
text: "最近一周",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近一个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
},
},
{
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
},
},
],
},
};
},
methods: {
onReset() {
this.$router.push({
path: "",
});
this.listQuery = {
billNo: "",
corpName: null,
billAction: null,
type: 1,
editStatus: 2,
page: 1,
allocateStatus: 0,
limit: 10,
};
this.actDateRange = [];
this.getList();
},
tableRowClassName({row}) {
if (row.checked) return "warning-row";
return "";
},
checkSelectable(row) {
return !row.check;
},
handleCurrentChange(val) {
this.unionQuery.page = val;
this.getList();
},
handleChange(val) {
this.currentRow = val;
this.detailList = val.subErpOrders;
},
handleErpPageChange(val) {
this.listQuery.page = val;
this.getList();
},
keyup_submit(event) {
this.getList();
event.target.select();
},
getList() {
this.loading = true;
if (this.actDateRange !== null) {
this.listQuery.startDate = this.actDateRange[0];
this.listQuery.endDate = this.actDateRange[1];
} else {
this.listQuery.startDate = null;
this.listQuery.endDate = null;
}
this.listQuery.customerId = store.getters.customerId;
getReceiveOrder(this.listQuery)
.then((response) => {
console.log(response)
this.loading = false;
if (response.code === 20000) {
this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0;
} else {
this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
},
intentBack() {
this.closeDialog();
},
combine() {
if (this.$isBlank(this.currentRow.id)) {
return;
}
this.curLocInv = this.currentRow.locStorageCode;
if (this.$isBlank(this.curLocInv)) {
this.storageVisible = true;
} else {
let tQuery = {
id: this.currentRow.id,
locStorageCode: this.curLocInv,
invWarehouseCode: this.currentRow.invWarehouseCode,
}
addReceiveOrder(tQuery)
.then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}
},
submitFind() {
this.listQuery.page = 1;
this.getList();
},
selectStorage(row) {
this.curLocInv = row.code;
let tQuery = {
id: this.currentRow.id,
locStorageCode: this.curLocInv,
}
addStockOrder(tQuery)
.then((response) => {
if (response.code === 20000) {
this.storageVisible = false;
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleSelectionUdiChange(val) {
console.log("----" + val);
this.multipleUdiSelection = val;
},
getBusType() {
let query = {
enabled: false,
};
getBusChange(query)
.then((response) => {
this.originTypes = response.data.list || [];
})
.catch(() => {
});
},
getStorage(event) {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList.length == 1) {
this.curLocInv = this.storageList[0].code;
}
})
.catch(() => {
});
},
closeInvDialog() {
this.storageVisible = false;
},
closeSubmitDialog() {
this.storageVisible = false;
this.combine();
},
},
created() {
this.getBusType();
this.getStorage();
this.getList();
},
components: {selectInvDialog}
};
</script>
<style scoped>
div /deep/ .el-table .warning-row {
background: #bebebe;
}
div /deep/ .el-table .success-row {
background: #ffffff;
}
</style>

@ -1,8 +1,7 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card" style="margin-top: -15px">
<div> <div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini"> <el-form :inline="true" :model="listQuery" style="display: flex;" size="mini">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
@ -20,7 +19,6 @@
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="listQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true"> <el-select v-model="listQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true">
<el-option <el-option
v-for="item in originTypes" v-for="item in originTypes"
@ -32,13 +30,8 @@
item.thirdSysName item.thirdSysName
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-row>
<el-row>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<span style="color: #000; margin-left: 10px; margin-right: 6px" <span style="color: #000; margin-left: 10px; margin-right: 6px"
>单据日期:</span >单据日期:</span
@ -98,6 +91,19 @@
</div> </div>
</el-card> </el-card>
<el-card class="el-card">
<el-table v-loading="loading" :data="detailList" style="width: 100%">
<el-table-column label="序号" type="index" width="120"></el-table-column>
<el-table-column label="产品编码" prop="productId"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column>
<el-table-column label="规格型号" prop="spec" show-overflow-tooltip="true"></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="expireDate"></el-table-column>
<el-table-column label="单据数量" prop="count"></el-table-column>
</el-table>
</el-card>
<el-dialog <el-dialog
v-if="storageVisible" v-if="storageVisible"
@ -148,15 +154,11 @@ export default {
originType: null, originType: null,
page: 1, page: 1,
limit: 10, limit: 10,
editStatus: 2, allocateStatus: 0,
type: 0,
customerId: null, customerId: null,
}, },
combineQuery: { detailList: [],
thirdId: "",
relId: "",
erpName: "",
keys: [],
},
storageVisible: false, storageVisible: false,
dataList: [], dataList: [],
pageTotal: 1, pageTotal: 1,
@ -215,6 +217,7 @@ export default {
billAction: null, billAction: null,
page: 1, page: 1,
limit: 10, limit: 10,
allocateStatus: 0,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -232,8 +235,8 @@ export default {
this.getList(); this.getList();
}, },
handleChange(val) { handleChange(val) {
console.log(val);
this.currentRow = val; this.currentRow = val;
this.detailList = val.subErpOrders;
}, },
handleErpPageChange(val) { handleErpPageChange(val) {
this.listQuery.page = val; this.listQuery.page = val;

@ -71,7 +71,10 @@
<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="onSubmit"></el-button> <el-button type="primary" icon="search" @click="onSubmit"></el-button>
<el-button type="primary" icon="search" @click="selectThrOrderFunction()" <el-button type="primary" icon="search" @click="selectThrOrderFunction()"
:loading="loading">选入单据 :loading="loading">选入第三方单据
</el-button>
<el-button type="primary" icon="search" @click="selectReceive()"
:loading="loading">选入领用单据
</el-button> </el-button>
</el-button-group> </el-button-group>
</el-form-item> </el-form-item>
@ -84,7 +87,7 @@
@row-click="getStockOrderDetailList" ref="multipleTable"> @row-click="getStockOrderDetailList" ref="multipleTable">
<el-table-column type="index" label="序号" width="50"></el-table-column> <el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="150"></el-table-column> <el-table-column label="单据号" prop="billNo" show-overflow-tooltip width="150"></el-table-column>
<el-table-column label="往来单位" prop="corpName" show-overflow-tooltip width="150" ></el-table-column> <el-table-column label="往来单位" prop="corpName" show-overflow-tooltip width="150"></el-table-column>
<el-table-column label="单据来源" prop="sourceType" width="120" show-overflow-tooltip> <el-table-column label="单据来源" prop="sourceType" width="120" show-overflow-tooltip>
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ sourceMap[scope.row.sourceType] }}</span> <span>{{ sourceMap[scope.row.sourceType] }}</span>
@ -436,7 +439,7 @@
</el-dialog> </el-dialog>
<el-dialog <el-dialog
title="选入单据" title="选入第三方单据"
:visible.sync="selectThrOrderVisible" :visible.sync="selectThrOrderVisible"
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
@ -448,6 +451,21 @@
:data="thisData" :data="thisData"
></selectThrOrder> ></selectThrOrder>
</el-dialog> </el-dialog>
<el-dialog
title="选入领用单据"
:visible.sync="selectReceiveVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectReceiveVisible"
>
<selectReceiveOrderDialog
:closeDialog="closeDialog"
:data="thisData"
></selectReceiveOrderDialog>
</el-dialog>
</div> </div>
</template> </template>
@ -463,7 +481,8 @@ import {BASE_URL} from "../../config/app";
import stockOrderDistribution from "./stockOrderDistribution"; import stockOrderDistribution from "./stockOrderDistribution";
import stockOrderEditDistribution from "./stockOrderEditDistribution"; import stockOrderEditDistribution from "./stockOrderEditDistribution";
import stockQRCodeExport from "./stockQRCodeExport"; import stockQRCodeExport from "./stockQRCodeExport";
import selectThrOrder from "./selectThrOrder"; import selectThrOrder from "./selectThrOrderDialog";
import selectReceiveOrderDialog from "./selectReceiveOrderDialog";
import draggable from "vuedraggable"; import draggable from "vuedraggable";
import codeDetail from "./errorCode"; import codeDetail from "./errorCode";
import addOrder from "./addOrder"; import addOrder from "./addOrder";
@ -547,6 +566,7 @@ export default {
qrcodeExportVisible: false, qrcodeExportVisible: false,
filterUDIType: false, filterUDIType: false,
selectThrOrderVisible: false, selectThrOrderVisible: false,
selectReceiveVisible: false,
thisData: {}, thisData: {},
actDateRange: [], actDateRange: [],
pickerOptions: { pickerOptions: {
@ -680,9 +700,15 @@ export default {
selectThrOrderFunction() { selectThrOrderFunction() {
this.selectThrOrderVisible = true; this.selectThrOrderVisible = true;
}, },
selectReceive() {
this.selectReceiveVisible = true;
},
closeDialog(type) { closeDialog(type) {
this.distributionVisible = false; this.distributionVisible = false;
this.selectThrOrderVisible = false; this.selectThrOrderVisible = false;
this.selectReceiveVisible = false;
this.getList(); this.getList();
if (this.$isNotBlank(type)) { if (this.$isNotBlank(type)) {
this.detailList = []; this.detailList = [];
@ -967,7 +993,7 @@ export default {
stockOrderDistribution, stockOrderDistribution,
stockQRCodeExport, stockQRCodeExport,
stockOrderEditDistribution, stockOrderEditDistribution,
selectThrOrder, selectThrOrder, selectReceiveOrderDialog
}, },
filters: { filters: {
statusFilterType(status) { statusFilterType(status) {

Loading…
Cancel
Save