新增选入第三方单据,选入领用单据

prod
anthonywj 2 years ago
parent 17d6673cff
commit 9f7cf75456

@ -116,17 +116,19 @@
<el-form-item label="第三方单据类型" prop="prefix"> <el-form-item label="第三方单据类型" prop="prefix">
<el-select v-model="inputQuery.originAction" <el-select v-model="inputQuery.originAction"
size="small" size="small"
clearable
style="width: 90%" style="width: 90%"
filterable
placeholder="请选择第三方系统单据类型" placeholder="请选择第三方系统单据类型"
> >
<el-option <el-option
v-for="item in originTypes" v-for="item in originTypes"
:key="item.name" :key="item.id"
: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.action item.thirdSysName
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>

@ -1,129 +1,144 @@
<template> <template>
<div> <div>
<el-card class="el-card" style="margin-top: -15px"> <el-card class="el-card" style="margin-top: -15px">
<div> <div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini"> <el-form :model="listQuery" size="mini"
<el-row> v-show="showSearch"
<el-form-item class="query-form-item"> label-width="100px">
<el-input <el-row>
v-model="listQuery.billNo" <el-col :span="6">
placeholder="单据号" <el-form-item class="query-form-item" label="单据号:">
clearable <el-input
></el-input> v-model="listQuery.billNo"
</el-form-item> placeholder="单据号"
<el-form-item class="query-form-item"> clearable
<el-input ></el-input>
v-model="listQuery.corpName" </el-form-item>
placeholder="往来单位" </el-col>
clearable <el-col :span="6">
></el-input> <el-form-item class="query-form-item" label="往来单位:">
</el-form-item> <el-input
<el-form-item class="query-form-item"> v-model="listQuery.corpName"
<el-select v-model="listQuery.billAction" placeholder="请选择领用类型" clearable="true"> placeholder="往来单位"
<el-option clearable
v-for="item in originTypes" ></el-input>
:key="item.originAction" </el-form-item>
:label="item.originName" </el-col>
:value="item.originAction"> <el-col :span="6">
<span style="float: left;font-size: 13px">{{ item.originAction }}</span> <el-form-item class="query-form-item" label="领用类型">
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{ <el-select v-model="listQuery.billAction" placeholder="请选择领用类型" clearable="true">
item.originName <el-option
}}</span> v-for="item in originTypes"
</el-option> :key="item.originAction"
</el-select> :label="item.originName"
</el-form-item> :value="item.originAction">
<el-form-item class="query-form-item"> <span style="float: left;font-size: 13px">{{ item.originAction }}</span>
<span style="color: #000; margin-left: 10px; margin-right: 6px" <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
>单据日期:</span item.originName
> }}</span>
<el-date-picker </el-option>
:picker-options="pickerOptions" </el-select>
v-model="actDateRange" </el-form-item>
type="daterange" </el-col>
format="yyyy 年 MM 月 dd 日" </el-row>
value-format="yyyy-MM-dd" <el-row>
range-separator="至" <el-col :span="6">
start-placeholder="开始日期" <el-form-item class="query-form-item" label="单据日期:">
end-placeholder="结束日期" <el-date-picker
> :picker-options="pickerOptions"
</el-date-picker> v-model="actDateRange"
</el-form-item> type="daterange"
<el-form-item style="display: flex"> format="yyyy 年 MM 月 dd 日"
<el-button-group> value-format="yyyy-MM-dd"
<el-button range-separator="至"
type="primary" start-placeholder="开始日期"
icon="el-icon-refresh" end-placeholder="结束日期"
@click="onReset" >
></el-button> </el-date-picker>
<el-button type="primary" icon="search" @click="submitFind"></el-button> </el-form-item>
<el-button type="primary" icon="search" @click="combine" </el-col>
>确定 </el-row>
</el-button </el-form>
>
</el-button-group>
</el-form-item>
</el-row>
<el-row>
</el-row> <div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
>重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="submitFind"></el-button>
<el-button type="primary" icon="el-icon-check" @click="combine"
>确定
</el-button
>
</el-button-group>
</el-form> </div>
<el-table <el-table
:data="dataList" :data="dataList"
style="width: 100%" style="width: 100%"
highlight-current-row="true" border
v-loading="loading" highlight-current-row="true"
:row-class-name="tableRowClassName" v-loading="loading"
@current-change="handleChange" @current-change="handleDetail"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index" width="60"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="领用类型" prop="billType"></el-table-column>
<el-table-column label="往来单位" prop="corpName" width="300" <el-table-column label="单据号" prop="billNo"></el-table-column>
show-overflow-tooltip="true"></el-table-column> <el-table-column label="领用仓库" prop="invName"></el-table-column>
<el-table-column label="单据类型" prop="billTypeName"></el-table-column> <el-table-column label="往来信息" prop="targetInvName" show-overflow-tooltip="true"></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-column label="单据日期" prop="billdate"></el-table-column> <el-table-column label="状态" prop="status">
</el-table> <template slot-scope="scope">
<el-pagination <el-tag :type="(scope.row.status) | statusFilterType">
:page-size="listQuery.limit" {{ statusMap[scope.row.status] }}
@current-change="handleErpPageChange" </el-tag>
layout="prev, pager, next" </template>
:total="pageTotal" </el-table-column>
:current-page="listQuery.page" </el-table>
></el-pagination> <el-pagination
</div> :page-size="listQuery.limit"
</el-card> @current-change="handleErpPageChange"
layout="prev, pager, next"
:total="pageTotal"
:current-page="listQuery.page"
></el-pagination>
</div>
</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="nameCode"></el-table-column>
<el-table-column label="产品通用名" prop="productName" show-overflow-tooltip="true"></el-table-column> <el-table-column label="产品通用名" prop="cpmctymc" 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="ggxh" 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="count"></el-table-column> <el-table-column label="单据数量" prop="count"></el-table-column>
</el-table> </el-table>
</el-card> </el-card>
<el-dialog <el-dialog
v-if="storageVisible" v-if="storageVisible"
title="请选择单据所属仓库信息" title="请选择单据所属仓库信息"
: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
:visible.sync="storageVisible"> :visible.sync="storageVisible">
<selectInvDialog <selectInvDialog
:closeInvDialog="closeInvDialog" :closeInvDialog="closeInvDialog"
:billData="currentRow" :billData="currentRow"
:closeSubmitDialog="closeSubmitDialog" :closeSubmitDialog="closeSubmitDialog"
></selectInvDialog> ></selectInvDialog>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
@ -132,249 +147,264 @@ import store from "../../store";
import {filterAllByUser} from "@/api/system/invWarehouse"; import {filterAllByUser} from "@/api/system/invWarehouse";
import selectInvDialog from "./DialogSelectInv"; import selectInvDialog from "./DialogSelectInv";
import {getReceiveOrder} from "@/api/inout/receiveOrder"; import {getOrderDetail, getReceiveOrder} from "@/api/inout/receiveOrder";
import {getBusChange} from "@/api/basic/busTypeChange"; import {getBusChange} from "@/api/basic/busTypeChange";
export default { export default {
name: "closeDialog", name: "closeDialog",
props: { props: {
data: { data: {
type: Object, type: Object,
required: true, required: true,
},
closeDialog: {
type: Function,
required: true,
},
}, },
closeDialog: {
type: Function,
required: true,
},
},
data() { data() {
return { return {
listQuery: { listQuery: {
billNo: "", billNo: "",
thirdSysFk: "", thirdSysFk: "",
billAction: null, billAction: null,
originType: null, originType: null,
page: 1, page: 1,
limit: 10, limit: 10,
type: 1, type: 1,
editStatus: 2, editStatus: 2,
allocateStatus: 0, allocateStatus: 0,
customerId: null, customerId: null,
},
showSearch: true,
detailList: [],
storageVisible: false,
dataList: [],
pageTotal: 1,
total: 1,
currentRow: null,
curLocInv: null,
loading: false,
multipleUdiSelection: [],
thirdSys: [],
thirdSysFk: null,
originTypes: [],
storageList: [],
actDateRange: [],
statusMap: {
1: "草稿",
2: "未审核",
3: "已审核",
4: "已拒绝"
},
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]);
}, },
detailList: [], },
storageVisible: false, {
dataList: [], text: "最近三个月",
pageTotal: 1, onClick(picker) {
total: 1, const end = new Date();
currentRow: null, const start = new Date();
curLocInv: null, start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
loading: false, picker.$emit("pick", [start, end]);
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();
}, },
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}) { tableRowClassName({row}) {
if (row.checked) return "warning-row"; if (row.checked) return "warning-row";
return ""; return "";
}, },
checkSelectable(row) { checkSelectable(row) {
return !row.check; return !row.check;
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.unionQuery.page = val; this.unionQuery.page = val;
this.getList(); 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) { handleDetail(row) {
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(() => {
});
},
this.currentRow = row;
var query = {};
query.orderIdFk = row.billNo;
getOrderDetail(query) //
.then((response) => {
this.detailList = response.data.list || [];
})
.catch(() => {
this.detailList = [];
});
},
closeInvDialog() { handleErpPageChange(val) {
this.storageVisible = false; 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;
}
let tQuery = {
id: this.currentRow.id,
}
addReceiveOrder(tQuery)
.then((response) => {
if (response.code === 20000) {
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
hideSearch() {
this.showSearch = !this.showSearch;
},
closeSubmitDialog() { 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.storageVisible = false;
this.combine(); this.closeDialog();
}, } else {
this.$message.error(response.message);
}
})
.catch(() => {
});
},
handleSelectionUdiChange(val) {
console.log("----" + val);
this.multipleUdiSelection = val;
}, },
created() { getBusType() {
this.getBusType(); let query = {
this.getStorage(); enabled: false,
this.getList(); };
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();
}, },
components: {selectInvDialog} },
created() {
this.getBusType();
this.getStorage();
this.getList();
},
components: {selectInvDialog}
}; };
</script> </script>
@ -382,10 +412,10 @@ export default {
<style scoped> <style scoped>
div /deep/ .el-table .warning-row { div /deep/ .el-table .warning-row {
background: #bebebe; background: #bebebe;
} }
div /deep/ .el-table .success-row { div /deep/ .el-table .success-row {
background: #ffffff; background: #ffffff;
} }
</style> </style>

@ -2,76 +2,89 @@
<div> <div>
<el-card class="el-card" style="margin-top: -15px"> <el-card class="el-card" style="margin-top: -15px">
<div> <div>
<el-form :inline="true" :model="listQuery" style="display: flex;" size="mini"> <el-form :model="listQuery" size="mini"
v-show="showSearch"
label-width="100px">
<el-row> <el-row>
<el-form-item class="query-form-item"> <el-col :span="6">
<el-input <el-form-item class="query-form-item" label="单据号:">
v-model="listQuery.billNo" <el-input
placeholder="单据号" v-model="listQuery.billNo"
clearable placeholder="单据号"
></el-input> clearable
</el-form-item> ></el-input>
<el-form-item class="query-form-item"> </el-form-item>
<el-input </el-col>
v-model="listQuery.corpName" <el-col :span="6">
placeholder="往来单位" <el-form-item class="query-form-item" label="往来单位:">
clearable <el-input
></el-input> v-model="listQuery.corpName"
</el-form-item> placeholder="往来单位"
<el-form-item class="query-form-item"> clearable
<el-select v-model="listQuery.billAction" placeholder="请选择第三方系统单据类型" clearable="true"> ></el-input>
<el-option </el-form-item>
v-for="item in originTypes" </el-col>
:key="item.name" <el-col :span="6">
:label="item.name" <el-form-item class="query-form-item" label="单据类型:">
:value="item.action"> <el-select v-model="listQuery.billAction" placeholder="请选择第三方系统单据类型" filterable clearable="true">
<span style="float: left;font-size: 13px">{{ item.name }}</span> <el-option
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{ v-for="item in originTypes"
item.thirdSysName :key="item.name"
}}</span> :label="item.name"
</el-option> :value="item.action">
</el-select> <span style="float: left;font-size: 13px">{{ item.name }}</span>
</el-form-item> <span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
<el-form-item class="query-form-item"> item.thirdSysName
<span style="color: #000; margin-left: 10px; margin-right: 6px" }}</span>
>单据日期:</span </el-option>
> </el-select>
<el-date-picker </el-form-item>
:picker-options="pickerOptions" </el-col>
v-model="actDateRange" </el-row>
type="daterange" <el-row>
format="yyyy 年 MM 月 dd 日" <el-col :span="6">
value-format="yyyy-MM-dd" <el-form-item class="query-form-item" label="单据日期:">
range-separator="至" <el-date-picker
start-placeholder="开始日期" :picker-options="pickerOptions"
end-placeholder="结束日期" v-model="actDateRange"
> type="daterange"
</el-date-picker> format="yyyy 年 MM 月 dd 日"
</el-form-item> value-format="yyyy-MM-dd"
<el-form-item style="display: flex"> range-separator="至"
<el-button-group> start-placeholder="开始日期"
<el-button end-placeholder="结束日期"
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-date-picker>
</el-form-item> </el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div class="top-right-btn">
<el-button-group>
<el-button icon="el-icon-view" type="primary" @click="hideSearch">/</el-button>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onReset"
>重置
</el-button>
<el-button type="primary" icon="el-icon-search" @click="submitFind"></el-button>
<el-button type="primary" icon="el-icon-check" @click="combine"
>确定
</el-button
>
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table <el-table
:data="dataList" :data="dataList"
style="width: 100%" style="width: 100%"
highlight-current-row="true" highlight-current-row="true"
v-loading="loading" v-loading="loading"
border border
:row-class-name="tableRowClassName" :row-class-name="tableRowClassName"
@current-change="handleChange" @current-change="handleChange"
> >
<el-table-column label="序号" type="index"></el-table-column> <el-table-column label="序号" type="index"></el-table-column>
<el-table-column label="单据号" prop="billNo"></el-table-column> <el-table-column label="单据号" prop="billNo"></el-table-column>
@ -82,11 +95,11 @@
<el-table-column label="单据日期" prop="billdate"></el-table-column> <el-table-column label="单据日期" prop="billdate"></el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
:page-size="listQuery.limit" :page-size="listQuery.limit"
@current-change="handleErpPageChange" @current-change="handleErpPageChange"
layout="prev, pager, next" layout="prev, pager, next"
:total="pageTotal" :total="pageTotal"
:current-page="listQuery.page" :current-page="listQuery.page"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
@ -106,17 +119,17 @@
<el-dialog <el-dialog
v-if="storageVisible" v-if="storageVisible"
title="请选择单据所属仓库信息" title="请选择单据所属仓库信息"
: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
:visible.sync="storageVisible"> :visible.sync="storageVisible">
<selectInvDialog <selectInvDialog
:closeInvDialog="closeInvDialog" :closeInvDialog="closeInvDialog"
:billData="currentRow" :billData="currentRow"
:closeSubmitDialog="closeSubmitDialog" :closeSubmitDialog="closeSubmitDialog"
></selectInvDialog> ></selectInvDialog>
</el-dialog> </el-dialog>
@ -156,6 +169,7 @@ export default {
type: 0, type: 0,
customerId: null, customerId: null,
}, },
showSearch: true,
detailList: [], detailList: [],
storageVisible: false, storageVisible: false,
dataList: [], dataList: [],
@ -255,23 +269,23 @@ export default {
} }
this.listQuery.customerId = store.getters.customerId; this.listQuery.customerId = store.getters.customerId;
getCloudErp(this.listQuery) getCloudErp(this.listQuery)
.then((response) => { .then((response) => {
console.log(response) console.log(response)
this.loading = false; this.loading = false;
if (response.code === 20000) { if (response.code === 20000) {
this.dataList = response.data.list || []; this.dataList = response.data.list || [];
this.pageTotal = response.data.total || 0; this.pageTotal = response.data.total || 0;
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
this.dataList = [];
this.pageTotal = 0;
}
})
.catch(() => {
this.loading = false;
this.dataList = []; this.dataList = [];
this.pageTotal = 0; this.pageTotal = 0;
} });
})
.catch(() => {
this.loading = false;
this.dataList = [];
this.pageTotal = 0;
});
}, },
intentBack() { intentBack() {
this.closeDialog(); this.closeDialog();
@ -290,17 +304,20 @@ export default {
invWarehouseCode: this.currentRow.invWarehouseCode, invWarehouseCode: this.currentRow.invWarehouseCode,
} }
addStockOrder(tQuery) addStockOrder(tQuery)
.then((response) => { .then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.closeDialog(); this.closeDialog();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
}); });
} }
}, },
hideSearch() {
this.showSearch = !this.showSearch;
},
submitFind() { submitFind() {
this.listQuery.page = 1; this.listQuery.page = 1;
this.getList(); this.getList();
@ -312,16 +329,16 @@ export default {
locStorageCode: this.curLocInv, locStorageCode: this.curLocInv,
} }
addStockOrder(tQuery) addStockOrder(tQuery)
.then((response) => { .then((response) => {
if (response.code === 20000) { if (response.code === 20000) {
this.storageVisible = false; this.storageVisible = false;
this.closeDialog(); this.closeDialog();
} else { } else {
this.$message.error(response.message); this.$message.error(response.message);
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },
handleSelectionUdiChange(val) { handleSelectionUdiChange(val) {
@ -333,23 +350,23 @@ export default {
enabled: true, enabled: true,
}; };
getOriginBusType(query) getOriginBusType(query)
.then((response) => { .then((response) => {
this.originTypes = response.data.list || []; this.originTypes = response.data.list || [];
}) })
.catch(() => { .catch(() => {
}); });
}, },
getStorage(event) { getStorage(event) {
this.storageList = []; this.storageList = [];
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
this.storageList = response.data || []; this.storageList = response.data || [];
if (this.storageList.length == 1) { if (this.storageList.length == 1) {
this.curLocInv = this.storageList[0].code; this.curLocInv = this.storageList[0].code;
} }
}) })
.catch(() => { .catch(() => {
}); });
}, },

@ -128,7 +128,7 @@ import {getOriginBusType} from "@/api/basic/busOriginType";
import {delReceive} from "@/api/thrsys/thrOrderReceive"; import {delReceive} from "@/api/thrsys/thrOrderReceive";
import {filterDetailByKey} from "@/api/basic/basicThirdSys"; import {filterDetailByKey} from "@/api/basic/basicThirdSys";
import {selectIp} from "@/api/param/systemParamConfig"; import {selectIp} from "@/api/param/systemParamConfig";
import thrOrderNew from "./thrOrderNew"; import thrOrderNew from "./DialogNewReceive";
import {getOrderDetail, getReceiveOrder} from "@/api/inout/receiveOrder"; import {getOrderDetail, getReceiveOrder} from "@/api/inout/receiveOrder";
export default { export default {

Loading…
Cancel
Save