预验收入库,第三方仓库信息修改

master
anthonyywj2 3 years ago
parent a972d2a462
commit d247ebb68e

@ -1,153 +1,153 @@
<template> <template>
<div> <div>
<el-card class="el-card"> <el-card class="el-card">
<el-form <el-form
:inline="true" :inline="true"
:model="filterQuery" :model="filterQuery"
class="query-form" class="query-form"
size="mini" 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="单据号"
></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.localAction" placeholder="请选择业务类型"> <el-select v-model="filterQuery.localAction" placeholder="请选择业务类型">
<el-option <el-option
v-for="item in busTypes" v-for="item in busTypes"
:key="item.name" :key="item.name"
:label="item.name" :label="item.name"
:value="item.action"> :value="item.action">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.name }}</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 style="color: #000; margin-left: 10px; margin-right: 6px"
>单据日期:</span >单据日期:</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-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
></el-button>
<el-button type="primary" icon="search" @click="onSubmit"
>查询
</el-button
>
<el-button type="primary" icon="search" @click="importErps"
>导入比对
</el-button
>
<!-- <el-button type="primary" icon="search" @click="combineErps"
>合并下载</el-button
> -->
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="getOrderDetail"
style="width: 100%"
> >
<el-table-column type="selection" width="55"></el-table-column> </el-date-picker>
<el-table-column label="序号" type="index"></el-table-column> </el-form-item>
<el-table-column <el-form-item>
label="订单ID" <el-button-group>
prop="billNo" <el-button
:show-overflow-tooltip="true" type="primary"
></el-table-column> icon="el-icon-refresh"
<!-- <el-table-column--> @click="onReset"
<!-- label="客户ID"--> ></el-button>
<!-- prop="corpId"--> <el-button type="primary" icon="search" @click="onSubmit"
<!-- :show-overflow-tooltip="true"--> >查询
<!-- ></el-table-column>--> </el-button
<el-table-column >
label="客户名称" <el-button type="primary" icon="search" @click="importErps"
prop="corpName" >导入比对
:show-overflow-tooltip="true" </el-button
></el-table-column> >
<el-table-column
label="单据日期"
show-overflow-tooltip
prop="billdate"
></el-table-column>
<el-table-column label="业务单据类型" prop="billType"></el-table-column>
<!-- <el-table-column label="下载状态" prop="isDownload"></el-table-column> --> <!-- <el-button type="primary" icon="search" @click="combineErps"
</el-table> >合并下载</el-button
<el-pagination > -->
:page-size="filterQuery.limit" </el-button-group>
@current-change="handleCurrentChange" </el-form-item>
layout="prev, pager, next" </el-row>
:total="total" </el-form>
></el-pagination> <el-table
</el-card> v-loading="loading"
:data="list"
highlight-current-row="true"
@selection-change="handleSelectionChange"
@row-click="getOrderDetail"
style="width: 100%"
>
<el-table-column type="selection" width="55"></el-table-column>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="订单ID"
prop="billNo"
:show-overflow-tooltip="true"
></el-table-column>
<!-- <el-table-column-->
<!-- label="客户ID"-->
<!-- prop="corpId"-->
<!-- :show-overflow-tooltip="true"-->
<!-- ></el-table-column>-->
<el-table-column
label="客户名称"
prop="corpName"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="单据日期"
show-overflow-tooltip
prop="billdate"
></el-table-column>
<el-table-column label="业务单据类型" prop="billType"></el-table-column>
<el-card class="el-card"> <!-- <el-table-column label="下载状态" prop="isDownload"></el-table-column> -->
<el-table </el-table>
v-loading="detailLoading" <el-pagination
:data="detailList" :page-size="filterQuery.limit"
style="width: 100%" @current-change="handleCurrentChange"
> layout="prev, pager, next"
<el-table-column label="序号" type="index"></el-table-column> :total="total"
></el-pagination>
</el-card>
<el-card class="el-card">
<el-table
v-loading="detailLoading"
:data="detailList"
style="width: 100%"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column <el-table-column
label="产品ID" label="产品ID"
prop="productId" prop="productId"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="产品名称" label="产品名称"
prop="productName" prop="productName"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="批号" label="批号"
prop="batchNo" prop="batchNo"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
></el-table-column> ></el-table-column>
<el-table-column <el-table-column
label="规格型号" label="规格型号"
prop="spec" prop="spec"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
></el-table-column> ></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 label="实际数量" prop="count">
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-card> </el-card>
</div> </div>
</template> </template>
<script> <script>
import { import {
combineErpOrder, combineErpOrder,
selectErpOrder, selectErpOrder,
getCloudErp, getCloudErp,
} from "../../api/inout/erpOrder"; } from "../../api/inout/erpOrder";
import {stockListDetail} from "../../api/inout/stockOrder" import {stockListDetail} from "../../api/inout/stockOrder"
@ -155,248 +155,253 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, filterByBus} from "../../api/basic/busLocalType"; import {getLocalBusType, filterByBus} from "../../api/basic/busLocalType";
export default { export default {
name: "orderId", name: "orderId",
props: { props: {
orderId: { orderId: {
type: Object, type: Object,
required: true, required: true,
},
orderAction: {
type: Object,
required: true,
}
}, },
data() { orderAction: {
return { type: Object,
filterQuery: { required: true,
billcode: "", },
billFlag: null, curLocInv: {
localAction: null, type: Object,
startDate: null, required: true,
endDate: null, }
status: 3, },
page: 1, data() {
limit: 5, return {
}, filterQuery: {
value: "", billcode: "",
total: 0, billFlag: null,
list: [], localAction: null,
busTypes:[], startDate: null,
loading: false, endDate: null,
detailLoading: false, status: 3,
detailList: [], page: 1,
actDateRange: [], limit: 5,
pickerOptions: { },
shortcuts: [ value: "",
{ total: 0,
text: "最近一周", list: [],
onClick(picker) { busTypes: [],
const end = new Date(); loading: false,
const start = new Date(); detailLoading: false,
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); detailList: [],
picker.$emit("pick", [start, end]); actDateRange: [],
}, pickerOptions: {
}, shortcuts: [
{ {
text: "最近一个月", text: "最近一周",
onClick(picker) { onClick(picker) {
const end = new Date(); const end = new Date();
const start = new Date(); const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30); start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
picker.$emit("pick", [start, end]); 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]);
},
},
],
}, },
multipleSelection: [], },
postQuery: { {
orderId: "", text: "最近一个月",
purchaseinResponses: [], onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
picker.$emit("pick", [start, end]);
}, },
idQuery: { },
id: "", {
text: "最近三个月",
onClick(picker) {
const end = new Date();
const start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
picker.$emit("pick", [start, end]);
}, },
}; },
}, ],
},
multipleSelection: [],
postQuery: {
orderId: "",
purchaseinResponses: [],
},
idQuery: {
id: "",
},
};
},
methods: { methods: {
onReset() { onReset() {
this.$router.push({ this.$router.push({
path: "", path: "",
}); });
this.filterQuery = { this.filterQuery = {
billNo: "", billNo: "",
billFlag: null, billFlag: null,
localAction: null, localAction: null,
startDate: null, startDate: null,
endDate: null, endDate: null,
page: 1, page: 1,
limit: 5, limit: 5,
status: 3, status: 3,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
}, },
onSubmit() { onSubmit() {
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.getList();
},
getList() {
this.loading = true;
this.filterQuery.locStorageCode = this.curLocInv;
getCloudErp(this.filterQuery)
.then((response) => {
this.loading = false;
if (response.code == 20000) {
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
} else { } else {
this.filterQuery.startDate = null; this.$message.error(response.message);
this.filterQuery.endDate = null;
} }
this.getList(); })
}, .catch(() => {
getList() { this.loading = false;
this.loading = true; this.list = [];
getCloudErp(this.filterQuery) this.total = 0;
.then((response) => { });
this.loading = false; },
if (response.code == 20000) {
this.list = response.data.list || [];
this.detailList = [];
this.total = response.data.total || 0;
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.list = [];
this.total = 0;
});
},
//
getOrderDetail(row) {
this.detailList = row.subErpOrders;
},
importErps() { //
var selectData = this.multipleSelection; getOrderDetail(row) {
selectData.forEach((obj, index) => { this.detailList = row.subErpOrders;
this.postQuery.purchaseinResponses.push(obj); },
});
if (this.postQuery.purchaseinResponses.length < 1) { importErps() {
this.$message.warning("选择的订单需大于1"); var selectData = this.multipleSelection;
return;
}
this.postQuery.orderId = this.orderId;
selectErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
combineErps() {
var selectData = this.multipleSelection;
selectData.forEach((obj, index) => { selectData.forEach((obj, index) => {
this.postQuery.docids.push(obj.docid); this.postQuery.purchaseinResponses.push(obj);
}); });
if (this.postQuery.docids.length < 1) { if (this.postQuery.purchaseinResponses.length < 1) {
this.$message.warning("选择的订单需大于1"); this.$message.warning("选择的订单需大于1");
return; return;
}
this.postQuery.orderId = this.orderId;
selectErpOrder(this.postQuery)
.then((response) => {
if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
} }
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
combineErps() {
var selectData = this.multipleSelection;
combineErpOrder(this.postQuery) selectData.forEach((obj, index) => {
.then((response) => { this.postQuery.docids.push(obj.docid);
if (response.code == 20000) { });
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
this.$emit("closeManuDialog", false);
});
},
handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
},
getBusType() {
let query = {
enabled: true,
};
getLocalBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
this.getCurBillAction();
})
.catch(() => {
});
}, if (this.postQuery.docids.length < 1) {
this.$message.warning("选择的订单需大于1");
return;
}
getCurBillAction() { combineErpOrder(this.postQuery)
let tQuery = { .then((response) => {
action: this.orderAction if (response.code == 20000) {
this.loading = false;
this.$emit("closeManuDialog", true);
} else {
this.$message.error(response.message);
} }
filterByBus(tQuery) })
.then((response) => { .catch(() => {
this.filterQuery.localAction = response.data; this.loading = false;
this.getList(); this.$emit("closeManuDialog", false);
}) });
.catch(() => {
});
}
}, },
components: {},
mounted() { handleSizeChange(val) {
this.filterQuery.limit = val;
this.getList();
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
}, },
created() { handleSelectionChange(val) {
let end = new Date(); console.log(val);
let start = new Date(); this.multipleSelection = val;
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7); },
this.actDateRange = [start, end]; getBusType() {
let query = {
enabled: true,
};
getLocalBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
// this.filterQuery.billAction = this.busTypes[0].action;
// this.getList();
this.getCurBillAction();
})
.catch(() => {
});
this.getBusType();
}, },
getCurBillAction() {
let tQuery = {
action: this.orderAction
}
filterByBus(tQuery)
.then((response) => {
this.filterQuery.localAction = response.data;
this.getList();
})
.catch(() => {
});
}
},
components: {},
mounted() {
},
created() {
let end = new Date();
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
this.getBusType();
},
}; };
</script> </script>
<style scoped> <style scoped>
.el-card { .el-card {
margin-right: 20px; margin-right: 20px;
/*transition: all .5s;*/ /*transition: all .5s;*/
} }
</style> </style>

@ -284,6 +284,7 @@
v-on:closeManuDialog="closeManuDialog" v-on:closeManuDialog="closeManuDialog"
:orderId="orderId" :orderId="orderId"
:orderAction="billAction" :orderAction="billAction"
:curLocInv="curLocInv"
></selectErpOrder> ></selectErpOrder>
</el-dialog> </el-dialog>
@ -370,6 +371,7 @@ export default {
unitlist: [], unitlist: [],
list: [], list: [],
billAction: null, billAction: null,
curLocInv:null,
detailList: [], detailList: [],
unitUpdateQuery: { unitUpdateQuery: {
id: "", id: "",
@ -778,6 +780,7 @@ export default {
importOrder(row) { importOrder(row) {
this.orderId = row.id; this.orderId = row.id;
this.billAction = row.action; this.billAction = row.action;
this.curLocInv = row.locStorageCode;
this.addDialogVisible = true; this.addDialogVisible = true;
}, },
getBusType() { getBusType() {

@ -18,7 +18,8 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item"> <el-form-item class="query-form-item">
<el-select v-model="query.thirdSysFk" placeholder="请选择第三方系统" @change="thirdSysFkChange(query.thirdSysFk)"> <el-select v-model="query.thirdSysFk" placeholder="请选择第三方系统"
@change="thirdSysFkChange(query.thirdSysFk)">
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.thirdId" :key="item.thirdId"
@ -206,8 +207,8 @@
<el-option label="仓库" :value='false'></el-option> <el-option label="仓库" :value='false'></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="query-form-item" label="第三方系统:"> <el-form-item class="query-form-item" prop="thirdSysFk" label="第三方系统:">
<el-select v-model="formData.thirdSysFk" placeholder="仓库类型" clearable> <el-select v-model="formData.thirdSysFk" placeholder="请选择第三方系统" clearable>
<el-option <el-option
v-for="item in thirdSys" v-for="item in thirdSys"
:key="item.thirdId" :key="item.thirdId"
@ -313,6 +314,9 @@ export default {
], ],
code: [ code: [
{required: true, message: "请输入仓库货位代码", trigger: "blur"} {required: true, message: "请输入仓库货位代码", trigger: "blur"}
],
thirdSysFk: [
{required: true, message: "请选择第三方系统", trigger: "blur"}
] ]
}, },
pidData: {}, pidData: {},
@ -391,14 +395,14 @@ export default {
this.treeList = []; this.treeList = [];
}); });
}, },
getQueryThirdSysFk(){ getQueryThirdSysFk() {
this.thirdSys.forEach((item) => { this.thirdSys.forEach((item) => {
if (item.thirdName == this.query.thirdSysFk) { if (item.thirdName == this.query.thirdSysFk) {
this.query.thirdSysFk = item.thirdId; this.query.thirdSysFk = item.thirdId;
} }
}) })
}, },
getQueryThirdSysFkName(){ getQueryThirdSysFkName() {
this.thirdSys.forEach((item) => { this.thirdSys.forEach((item) => {
if (item.thirdId == this.query.thirdSysFk) { if (item.thirdId == this.query.thirdSysFk) {
this.query.thirdSysFk = item.thirdName; this.query.thirdSysFk = item.thirdName;

Loading…
Cancel
Save