领用单据功能完善

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() {
@ -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 || [];

@ -62,8 +62,7 @@
<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">
@ -109,6 +108,7 @@ 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() {
@ -122,7 +122,7 @@ export default {
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 0, editStatus: 2,
}, },
total: 0, total: 0,
thirdSys: [], thirdSys: [],
@ -188,7 +188,7 @@ export default {
limit: 10, limit: 10,
corpName: null, corpName: null,
type: 1, type: 1,
editStatus: 0, editStatus: 2,
}; };
this.actDateRange = []; this.actDateRange = [];
this.getList(); this.getList();
@ -213,7 +213,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 || [];

@ -56,28 +56,42 @@
<el-row :gutter="20" style="margin-top: -10px"> <el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>业务类型</span> <span>当前仓库</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="billType"> <el-form-item prop="locStorageCode">
<el-select v-model="formData.billType" placeholder="请选择业务类型" <el-select v-model="formData.locStorageCode" style="width: 50%;" placeholder="当前仓库信息"
@change="actionChange" clearable> @change="locInChange"
clearable>
<el-option <el-option
v-for="item in busTypes" v-for="item in storageList"
:key="item.thirdAction" :key="item.name"
:label="item.thirdName" :label="item.name"
:value="item.thirdAction">
<span style="float: left">{{ item.thirdName }}</span> :value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" style="width: 50%;"
clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col>
</el-col>
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>往来单位</span> <span>往来信息</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
@ -86,6 +100,7 @@
v-model="formData.corpName" v-model="formData.corpName"
filterable filterable
remote remote
style="width: 50%"
clearable="true" clearable="true"
reserve-keyword reserve-keyword
placeholder="请输入仓库信息" placeholder="请输入仓库信息"
@ -104,27 +119,41 @@
}}</span> }}</span>
</el-option> </el-option>
</el-select> </el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
style="width: 50%"
>
<el-option
v-for="item in fromSubStorageOptions"
:key="item.code"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20" style="margin-top: -10px"> <el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>当前仓库</span> <span>领用类型</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="locStorageCode"> <el-form-item prop="billType">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange" <el-select v-model="formData.billType" placeholder="请选择领用类型" style="width: 100%"
clearable> clearable>
<el-option <el-option
v-for="item in storageList" v-for="item in busTypes"
:key="item.name" :key="item.originAction"
:label="item.name" :label="item.originName"
:value="item.code"> :value="item.originAction">
<span style="float: left">{{ item.name }}</span> <span style="float: left">{{ item.originName }}</span>
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -132,22 +161,13 @@
<el-col :span="3"> <el-col :span="3">
<div class="ao-text"> <div class="ao-text">
<span>当前分库</span> <span>备注</span>
</div> </div>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<el-form-item prop="invWarehouseCode"> <el-form-item prop="remark">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" <el-input v-model="formData.remark" auto-complete="off"></el-input>
clearable>
<el-option
v-for="item in subInvList"
: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-col> </el-col>
@ -274,20 +294,6 @@
</el-card> </el-card>
</el-form> </el-form>
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
:close-on-click-modal="false"
:close-on-press-escape="false"
width="85%"
v-if="selectProductVisible"
:append-to-body='true'
>
<stockOrderNewSelectProduct
:closeDialog="closeDialogC2"
:data="thisData"
></stockOrderNewSelectProduct>
</el-dialog>
<el-dialog <el-dialog
title="库存产品录入" title="库存产品录入"
@ -302,6 +308,7 @@
:closeDialog="closeDialogC2" :closeDialog="closeDialogC2"
:data="thisData" :data="thisData"
:invQueryData="invQueryData" :invQueryData="invQueryData"
:type="1"
></dialogInvProduct> ></dialogInvProduct>
</el-dialog> </el-dialog>
</div> </div>
@ -330,8 +337,8 @@ 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 {getBusChange} from "@/api/basic/busTypeChange";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive"; import {inserThrOrderWeb, updateReceive} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder"; import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse"; import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -350,6 +357,10 @@ export default {
type: Function, type: Function,
required: true, required: true,
}, },
editType: {
type: Object,
required: true,
},
}, },
data() { data() {
return { return {
@ -395,6 +406,7 @@ export default {
subInvList: [], subInvList: [],
fromOptions: [], fromOptions: [],
fromStorageOptions: [], fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0, total: 0,
loading: false, loading: false,
index: null, index: null,
@ -416,10 +428,6 @@ export default {
1: "预入库", 1: "预入库",
2: "普通采购", 2: "普通采购",
}, },
curAction: {
corpType: 0,
genUnit: false,
},
orderEditor: true, orderEditor: true,
iCount: 0, iCount: 0,
sOptions: [], sOptions: [],
@ -429,11 +437,11 @@ export default {
busTypes: [], busTypes: [],
currentRow: {}, currentRow: {},
selectedIndex: "", selectedIndex: "",
selectProductVisible: false,
selectInvProductVisible: false, selectInvProductVisible: false,
thisData: {}, thisData: {},
storageList: [], storageList: [],
invQueryData: {}, invQueryData: {},
type: 1,
}; };
}, },
@ -510,8 +518,11 @@ export default {
console.log(row); console.log(row);
this.formData.corpId = row.code; this.formData.corpId = row.code;
this.formData.corpName = row.name; this.formData.corpName = row.name;
this.findSubStorageMethod();
}, },
getStorage(event) {
//
getStorage() {
this.storageList = []; this.storageList = [];
filterAllByUser() filterAllByUser()
.then((response) => { .then((response) => {
@ -522,6 +533,23 @@ export default {
}); });
}, },
//
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
},
getActionName(action) { getActionName(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) {
@ -529,7 +557,9 @@ export default {
} }
} }
}, },
findStorageMethod(query) {
//
findStorageMethod() {
if (this.formData.locStorageCode == null) if (this.formData.locStorageCode == null)
return; return;
this.fromStorageOptions = []; this.fromStorageOptions = [];
@ -549,6 +579,22 @@ export default {
.catch(() => { .catch(() => {
}); });
}, },
//
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.corpId,
filter: 2,
};
filterSubByInv(cQuery)
.then((response) => {
this.fromSubStorageOptions = response.data || [];
})
.catch(() => {
});
},
submitFunction(status) { submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交'; let tMessage = status === '501' ? '保存' : '提交';
this.loading = true; this.loading = true;
@ -556,10 +602,7 @@ export default {
tQuery.editStatus = status; tQuery.editStatus = status;
tQuery.subErpOrders = this.codeArray; tQuery.subErpOrders = this.codeArray;
tQuery.thirdPartyDate = 2; tQuery.thirdPartyDate = 2;
if (this.editType === "add") {
// tQuery.billType = this.formData.bi;
console.log(tQuery);
inserThrOrderWeb(tQuery) inserThrOrderWeb(tQuery)
.then(response => { .then(response => {
this.loading = false; this.loading = false;
@ -573,6 +616,23 @@ export default {
.catch(() => { .catch(() => {
this.loading = false; this.loading = false;
}) })
} else if (this.editType === "update") {
updateReceive(tQuery)
.then(response => {
this.loading = false;
if (response.code === 20000) {
this.$message.success(tMessage + "成功");
this.closeDialog(true);
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.loading = false;
})
}
}, },
selectProductFunction(event) { selectProductFunction(event) {
@ -598,25 +658,20 @@ 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;
this.thisData.formData.thirdSysFk = this.curAction.thirdSys;
this.thisData.billType = this.curAction.localAction;
this.invQueryData = { this.invQueryData = {
locStorageCode: this.formData.locStorageCode, locStorageCode: this.formData.locStorageCode,
}; };
this.selectInvProductVisible = true; this.selectInvProductVisible = true;
return; return;
} }
}, },
closeDialogC2(rData) { closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false; this.selectInvProductVisible = false;
this.thisData = {}; this.thisData = {};
@ -865,13 +920,11 @@ export default {
}, },
getBusType() { getBusType() {
let query = { let query = {
enabled: true, enable: false,
corpType: 1,
}; };
getOriginJoinBusType(query) getBusChange(query)
.then((response) => { .then((response) => {
this.busTypes = response.data.list || []; this.busTypes = response.data.list || [];
this.curAction = this.busTypes[0];
}) })
.catch(() => { .catch(() => {
}); });
@ -882,42 +935,6 @@ export default {
this.formData.corpId = event.erpId; this.formData.corpId = event.erpId;
this.formData.unitIdFk = event.erpId; this.formData.unitIdFk = event.erpId;
}, },
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,
corpType: null,
outType: null,
};
if (this.curAction.corpType == 3) {//
cQuery.corpType = 4;
this.formData.corpId = this.curAction.defaultUnit;
} else if (this.curAction.corpType == 2)//
{
cQuery.corpType = 4;
cQuery.outType = 2;
} else if (this.curAction.corpType == 0) {
cQuery.corpType = 2;
} else return;
getBasicUnitMaintains(cQuery)
.then((response) => {
this.loading = false;
this.fromOptions = response.data.page.list || [];
if (this.curAction.corpType == 3) {
for (let i = 0; i < this.fromOptions.length; i++) {
if (this.fromOptions[i].erpId == this.formData.corpId) {
this.formData.corpName = this.fromOptions[i].name;
}
}
}
})
.catch(() => {
this.loading = false;
});
},
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].thirdAction === action) { if (this.busTypes[i].thirdAction === action) {
@ -925,38 +942,15 @@ export default {
} }
} }
}, },
actionChange(item) {
console.log(item);
this.curAction = this.getActionItem(item);
this.locInChange();
this.findMethod();
},
locInChange(item) { locInChange(item) {
if (this.formData.invWarehouseCode != null) { if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = ""; this.formData.invWarehouseCode = "";
} }
this.formData.locStorageCode = item; this.formData.locStorageCode = item;
this.$forceUpdate(); this.$forceUpdate();
this.getBusType(item);
this.findStorageMethod(); this.findStorageMethod();
this.findSubInvs(); this.findSubInvs();
}, },
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
}
}, },
@ -996,8 +990,10 @@ export default {
this.getBusType(); this.getBusType();
this.getStorage(); this.getStorage();
this.findSubInvByInv(); this.findSubInvs();
this.findStorageMethod();
this.findSubStorageMethod(); this.findSubStorageMethod();
// this.findSubInvByInv();
this.codeArray = []; this.codeArray = [];
this.closeConfirmFunction(false); this.closeConfirmFunction(false);
}, },

@ -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>
@ -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