接收第三方单据上传

fengcang
anthonyywj2 3 years ago
parent aa3460de4d
commit 994630b56d

@ -65,6 +65,8 @@ import stockOrder from "../views/business/stockOrder";
//业务单据上传
import stockOrderUpload from "@/views/business/stockOrderUpload";
import stockOrderUploadLog from "@/views/business/stockOrderUploadLog";
import stockOrderRecedLog from "@/views/business/stockOrderRecedLog";
import thirdUploadSet from "@/views/thrsys/thirdUploadSet";
@ -735,7 +737,15 @@ export const asyncRouterMap = [
{
path: "stockOrderUploadLog",
component: stockOrderUploadLog,
name: "上传日志",
name: "单据上传日志",
meta: {
authRule: ["busOrderUpload/uploadLog"]
}
},
{
path: "stockOrderRecedLog",
component: stockOrderRecedLog,
name: "单据接收日志",
meta: {
authRule: ["busOrderUpload/uploadLog"]
}

@ -63,6 +63,8 @@
<el-col :span="7">
<el-form-item prop="corpName">
<el-input v-model="formData.corpName" auto-complete="off" :disabled="true"></el-input>
<el-input v-if="formData.fromSubInvName !=null" v-model="formData.fromSubInvName"
auto-complete="off" :disabled="true"></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
@ -147,6 +149,7 @@
</el-button
>
</el-button-group>
<el-table v-loading="loading" :data="codeArray" style="width: 100%;"
:row-class-name="tableRowClassName"
max-height="300" height="300" ref="multipleTable">
@ -230,6 +233,8 @@
></el-table-column>
<el-table-column label="操作" fixed="right" width="150">
<template slot-scope="scope">
<!-- v-if="orderEditor && scope.row.index !== selectedIndex"-->
<el-button
type="text"
size="small"
@ -259,8 +264,33 @@
</el-table-column>
</el-table>
<!-- <div class="block" v-if="orderEditor">-->
<!-- <el-pagination-->
<!-- @current-change="handleCurrentChange"-->
<!-- layout="prev, pager, next"-->
<!-- :page-size="query.limit"-->
<!-- :total="total">-->
<!-- </el-pagination>-->
<!-- </div>-->
</el-card>
</el-form>
<!-- <el-dialog-->
<!-- title="产品录入"-->
<!-- :visible.sync="selectProductVisible"-->
<!-- width="85%"-->
<!-- v-if="selectProductVisible"-->
<!-- :append-to-body='true'-->
<!-- :close-on-click-modal="false"-->
<!-- :close-on-press-escape="false"-->
<!-- >-->
<!-- <stockOrderNewSelectProduct-->
<!-- :closeDialog="closeDialogC2"-->
<!-- :data="thisData"-->
<!-- ></stockOrderNewSelectProduct>-->
<!-- </el-dialog>-->
<el-dialog
title="产品录入"
:visible.sync="selectProductVisible"
@ -288,6 +318,7 @@
<dialogInvProduct
:closeDialog="closeDialogC2"
:data="thisData"
:invQueryData="invQueryData"
></dialogInvProduct>
</el-dialog>
</div>
@ -312,8 +343,6 @@ import {
getStockOrderDetailInstrumentById, stockOrderDetail2
} from "../../api/inout/stockOrder";
import draggable from "vuedraggable";
import {saveAs} from "file-saver";
import {parseTime} from "../../filtres/index";
import store from "../../store";
import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
@ -321,6 +350,7 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType";
import {filterAll, filterAllByUser} from "@/api/basic/invWarehouse";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import dialogInvProduct from "@/views/inventory/DialogInvProduct";
export default {
name: "idQuery",
@ -337,6 +367,10 @@ export default {
type: Object,
required: true,
}
// closeConfirmFunction: {
// type: Function,
// required: true,
// },
},
data() {
return {
@ -398,11 +432,16 @@ export default {
thisData: {},
storageList: [],
subInvList: [],
curAction: {
corpType: 0,
genUnit: false,
},
invQueryData: {},
};
},
components: {
draggable,
stockOrderNewSelectProduct,
stockOrderNewSelectProduct, dialogInvProduct,
},
methods: {
saveOrder(status) {
@ -412,6 +451,7 @@ export default {
this.selectedIndex = "";
this.iCount = 0;
this.$refs["dataForm"].validate(valid => {
if (valid) {
@ -432,7 +472,11 @@ export default {
this.submitFunction(status);
} else {
for (let i = 0; i < this.codeArray.length; i++) {
// if (this.$isBlank(this.codeArray[i].batchNo)) {
// if (!this.codeArray[i].allowNoBatch) {
// return this.$message.error('');
// }
// }
if (this.$isBlank(this.codeArray[i].productDate) && this.$isBlank(this.codeArray[i].expireDate)) {
return this.$message.error('生产日期与失效日期不能全部为空');
}
@ -469,7 +513,6 @@ export default {
// if (!this.orderEditor) {
tQuery.subErpOrders = this.codeArray;
// }
console.log(tQuery);
insertStockOrderWeb(tQuery)
.then(response => {
this.loading = false;
@ -520,6 +563,11 @@ export default {
event.target.select();
}
if (this.$isBlank(event)) {
if (this.$isBlank(this.formData.corpName) || this.$isBlank(this.formData.billType)) {
this.$message.error("往来信息和单据类型不能为空!")
return;
}
this.code = "";
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
@ -533,16 +581,24 @@ export default {
}
this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData;
this.selectProductVisible = true;
let item = this.getActionItem(this.formData.billType);
console.log(item.mainAction + "----" + this.formData.noInvOut);
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true)//
{
if (item.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
this.invQueryData = {
locStorageCode: this.formData.locStorageCode,
};
this.selectInvProductVisible = true;
} else if (item.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
this.invQueryData = {
locStorageCode: this.formData.corpId,
};
this.selectInvProductVisible = true;
} else {
this.selectProductVisible = true;
}
return;
}
this.code = this.code.trim();
@ -564,7 +620,6 @@ export default {
stockOrderDetailQueryProduct(tQuery).then((response) => {
this.loading = false;
console.log(response)
if (response.code === 20000) {
if (response.data.getType === "1") {
this.loading = true;
@ -584,35 +639,6 @@ export default {
}).catch(() => {
this.loading = false;
});
// let tQuery2 = {
// id: response.data.getId
// };
// if (this.orderEditor) {
// tQuery2.orderId = this.formData.id;
// console.log(tQuery2)
// addStockOrderDetailFromCodeById(tQuery2).then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.closeDialogC2(response);
// } else {
// this.$message.error(response.message);
// }
// }).catch(() => {
// this.loading = false;
// });
// } else {
// getStockOrderDetailInstrumentById(tQuery2).then((response) => {
// this.loading = false;
// if (response.code === 20000) {
// this.closeDialogC2(response.data);
// } else {
// this.$message.error(response.message);
// }
// }).catch(() => {
// this.loading = false;
// });
// }
} else {
this.thisData = response.data;
this.thisData.code = this.code;
@ -621,6 +647,7 @@ export default {
if (this.orderEditor) {
this.thisData.orderId = this.formData.id
}
this.thisData.stockOrderLists = this.codeArray;
this.selectProductVisible = true;
}
} else {
@ -634,14 +661,14 @@ export default {
}
});
},
closeDialogC2(rData) {//012693548470801311200226172302271020022632100025
closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false;
this.thisData = {};
if (this.$isNotBlank(rData)) {
console.log(rData);
this.codeArray = [];
rData.forEach((obj, index) => {
if (this.codeArray.length === 0) {
@ -654,8 +681,6 @@ export default {
this.currentRow = this.codeArray[0];
this.selectedIndex = 0;
this.focusNext('iCount');
// this.closeConfirmFunction(true);
}
},
rowChange(val) {
@ -699,7 +724,6 @@ export default {
};
getBasicUnitMaintains2(tQuery)
.then((response) => {
console.log(response)
this.sLoading = false;
this.sOptions = response.data.list;
})
@ -790,36 +814,6 @@ export default {
});
}
},
saveCodeArray(index, row) {
if (this.$isBlank(row.batchNo)) {
return this.$message.error('批次号不能为空');
}
if (this.$isBlank(row.productDate)) {
return this.$message.error('生产日期不能为空');
}
if (this.$isBlank(row.expireDate)) {
return this.$message.error('失效日期不能为空');
}
this.$refs.multipleTable.setCurrentRow();
this.currentRow = {};
this.selectedIndex = "";
this.iCount = 0;
this.detailLoading = true;
// row.count = row.reCount;
let tQuery = row;
uploadStockOrderDetail(tQuery).then((response) => {
this.detailLoading = false;
if (response.code === 20000) {
this.$message.success("修改完成");
this.getStockOrderDetailList();
this.$refs.inputRef.focus();
} else {
this.$message.error(response.message);
}
});
},
// saveCodeArray(index, row) {
// if (this.$isBlank(row.batchNo)) {
// return this.$message.error('');
@ -949,7 +943,6 @@ export default {
this.loading = true;
stockOrderDetail(this.query) //
.then((response) => {
console.log(response)
this.codeArray = response.data.list || [];
this.total = response.data.total || 0;
this.loading = false;
@ -987,6 +980,9 @@ export default {
getLocalJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.curAction = this.getActionItem(this.formData.billType);
if (this.curAction != null) {
}
})
.catch(() => {
});
@ -1028,7 +1024,6 @@ export default {
}
},
findStorageMethod(query) {
console.log(query);
this.fromStorageOptions = [];
let cQuery = {
key: query,

@ -0,0 +1,266 @@
<template>
<div>
<el-form :inline="true" :model="filterQuery" class="query-form" size="mini">
<el-row>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.billNo" placeholder="单据号" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-input v-model="filterQuery.thirdBillNo" placeholder="第三方单据号" clearable></el-input>
</el-form-item>
<el-form-item class="query-form-item">
<el-date-picker
v-model="filterQuery.submitTime"
type="date"
placeholder="请选择提交时间"
:picker-options="pickerOptions">
</el-date-picker>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.status" placeholder="处理状态">
<el-option label="全部" value=""></el-option>
<el-option label="处理成功" value="2"></el-option>
<el-option label="处理失败" value="3"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button-group style="display:flex;">
<el-button type="primary" icon="el-icon-refresh" @click="onReset"></el-button>
<el-button type="primary" icon="search" @click="getList"></el-button>
</el-button-group>
</el-form-item>
</el-row>
</el-form>
<el-table
v-loading="loading"
:data="list"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="第三方单据号"
prop="billNo"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label="系统扫码单据号"
prop="thrBillNo"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="单据类型"
prop="billType"
show-overflow-tooltip
>
</el-table-column>
<el-table-column
label="单据日期"
prop="billDate"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="上传时间"
prop="submitTime"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="上传状态"
prop="status"
show-overflow-tooltip
>
<template slot-scope="scope">
<span>{{ getStatusInfo(scope.row.status) }}</span>
</template>
</el-table-column>
<el-table-column
label="结果信息"
prop="result"
show-overflow-tooltip
>
</el-table-column>
<el-table-column label="操作" fixed="right" width="160">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="showResultInfo(scope.row)"
>详情
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteLog(scope.row.id)"
>删除
</el-button
>
</template>
</el-table-column>
</el-table>
<el-pagination
:page-size="filterQuery.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
:current-page="filterQuery.page"
></el-pagination>
<el-dialog
title="结果详情"
width="35%"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="submitResultVisible"
>
<span v-text="resultInfo" style="white-space:pre-line;" class="resultInfo"></span>
</el-dialog>
</div>
</template>
<script>
import {stockOrderUploadLogList, deleteUploadLog} from "@/api/inout/stockOrderUploadLog";
export default {
data() {
return {
filterQuery: {
billNo: null,
thirdBillNo: null,
submitTime: null,
status: null,
fromType: 1,
page: 1,
limit: 20,
},
list: [],
total: 0,
statusMap: {
2: "提交成功",
3: "提交失败"
},
busTypes: [],
loading: false,
pickerOptions: {
disabledDate(time) {
return time.getTime() > Date.now();
}
},
submitResultVisible: false,
resultInfo: null //
};
},
methods: {
onReset() {
this.filterQuery = {
fromType: 1,
genKey: null,
status: null,
page: 1,
limit: 20,
thirdSysFk: null,
};
this.getList();
},
getList() {
this.loading = true;
stockOrderUploadLogList(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
}
}).catch((error) => {
this.loading = false;
this.list = [];
})
},
deleteLog(id) {
this.$confirm('是否确认删除提交记录?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params = {id: id};
deleteUploadLog(params).then((res) => {
if (res.code === 20000) {
this.$message.success("删除成功");
this.getList();
}
}).catch((error) => {
this.$message.error("删除失败");
})
}).catch(() => {
this.$message.info("已取消删除");
})
},
getStatusInfo(status) {
return this.statusMap[status];
},
getBusType() {
let query = {
enabled: true,
};
getLocalJoinByUser(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.filterQuery.billAction = this.busTypes[0].action;
})
.catch(() => {
});
},
showResultInfo(row) {
this.resultInfo = row.result;
this.submitResultVisible = true;
},
handleCurrentChange(val) {
this.filterQuery.page = val;
this.getList();
},
},
mounted() {
},
created() {
this.getList();
},
};
</script>
<style>
.itemTag {
float: left;
text-align: left;
margin-top: 10px;
width: 100px;
}
.text {
font-size: 13px;
font-family: "Microsoft YaHei";
}
.el-row {
display: flex;
flex-wrap: wrap;
}
.el-col {
border-radius: 4px;
flex-wrap: wrap;
}
.resultInfo {
font-size: medium;
font-family: "Microsoft YaHei";
line-height: 25px;
}
</style>

@ -136,6 +136,7 @@ export default {
thirdBillNo: null,
submitTime: null,
status: null,
fromType: 1,
page: 1,
limit: 20,
},
@ -160,7 +161,7 @@ export default {
methods: {
onReset() {
this.filterQuery = {
fromType: null,
fromType: 1,
genKey: null,
status: null,
page: 1,

@ -14,11 +14,7 @@
</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
@ -51,30 +47,12 @@
{{ (scope.row.inCount - scope.row.outCount) }}
</template>
</el-table-column>
<!-- <el-table-column label="操作" width="120" fixed="right">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="intentDetail(scope.row)"-->
<!-- >详情-->
<!-- </el-button-->
<!-- >-->
<!-- <el-button-->
<!-- type="text"-->
<!-- size="small"-->
<!-- @click.native.stop="deleteDialog(scope.row.id)"-->
<!-- >删除-->
<!-- </el-button-->
<!-- >-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</el-card>
<el-dialog
title="库存详情"
title="库存码详情"
:visible.sync="codeDetailVisible"
width="85%"
v-if="codeDetailVisible"
@ -131,7 +109,7 @@ export default {
relIdFk: null,
batchNo: null,
page: 1,
limit: 20,
limit: 10,
customerId: null,
supId: null,
unitFk: null,
@ -176,12 +154,13 @@ export default {
unitFk: null,
supId: null,
page: 1,
limit: 20,
limit: 10,
};
this.getList();
},
onSubmit() {
this.loading = true;
this.filterQuery.page = 1;
this.getList();
},
handleSizeChange(val) {
@ -205,7 +184,6 @@ export default {
this.filterQuery.customerId = store.getters.customerId;
filterProducts(this.filterQuery)
.then((response) => {
console.log(response)
this.showSup = response.data.showSup;
this.loading = false;
this.list = response.data.list || [];
@ -253,7 +231,6 @@ export default {
});
},
findMethod(query) {
console.log(query);
this.fromOptions = [];
let cQuery = {
key: query,

@ -408,6 +408,7 @@ export default {
},
getBusType() {
let query = {
thirdSys: ,
enabled: true,
corpType:1,
};

Loading…
Cancel
Save