平和接口对接修改

purchase
anthonyywj2 3 years ago
parent f98303b77e
commit c5e9d69a61

@ -0,0 +1,28 @@
import axios from "../../utils/axios";
export function getAcceptOrder(query) {
return axios({
url: "/udiwms/stock/order/accept/getOrder",
method: "get",
params: query
});
}
export function acceptClear(query) {
return axios({
url: "/udiwms/stock/order/acceptClear",
method: "post",
data: query
});
}
export function acceptAddCode(query) {
return axios({
url: "/udiwms/stock/order/accept/addCode",
method: "post",
data: query
});
}

@ -160,7 +160,7 @@
</el-card>
<el-card class="el-card" v-if="addBussinessTypeBtnVisible">
<el-button type="primary" style="float: right; margin-bottom: 5px;"
<el-button type="primary" style="float: right; margin-bottom: 5px;"
@click="addBussinessType">添加单据类型
</el-button>
<el-table v-loading="busTypeLoading" :data="busTypeList" style="width: 100%" highlight-current-row="true">
@ -235,15 +235,29 @@
<div class="itemTag">
<span>第三方单据类型:&nbsp;</span>
</div>
<el-select style="width: 150%;" v-model="thirdBuyForm.thirdBuyName" placeholder="第三方单据类型"
clearable>
<el-select
v-model="thirdBuyForm.thirdBuyCode"
filterable
remote
style="width: 150%;"
clearable="true"
reserve-keyword
placeholder="请选择第三方单据类型"
:remote-method="remoteMethod"
:loading="loading">
<el-option
v-for="item in thirdBuyList"
:key="item.name"
v-for="item in thridBusFilter"
:key="item.action"
:label="item.name"
:value="item.name"
></el-option>
:value="item.action">
<span style="float: left;font-size: 13px">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px;margin-left: 10px">{{
item.remark
}}</span>
</el-option>
</el-select>
</div>
</el-col>
</el-row>
@ -473,6 +487,7 @@ export default {
remark: null
},
thirdBuyList: [], //,
thridBusFilter: [],
thirdSysDetailList: [],
selectInterfaceList: [],
currentRow: null
@ -638,7 +653,7 @@ export default {
this.currentCheckIndex = index;
this.formName = "edit";
this.getBussinessType();
this.getThirdBuyType();
this.remoteMethod();
this.bussinessTypeFormVisible = true;
this.thirdBuyForm = {
id: row.id,
@ -662,10 +677,10 @@ export default {
},
addBussinessType() {
this.formName = "add";
this.remoteMethod();
if (this.submitOrderVisible) {
this.bussinessTypeFormVisible = true;
this.getBussinessType();
this.getThirdBuyType();
this.thirdBuyForm = {
id: null,
code: null,
@ -679,7 +694,6 @@ export default {
};
} else if (this.getOrdersEditBtnVisible) {
this.editGeOrderParamVisible = true;
this.getThirdBuyType();
this.thirdBuyForm = {
id: null,
code: null,
@ -703,7 +717,7 @@ export default {
return;
}
if (this.submitOrderVisible) {
if (isBlank(this.thirdBuyForm.thirdBuyName)) {
if (isBlank(this.thirdBuyForm.thirdBuyCode)) {
this.$message.error("第三方单据类型不能为空!");
return;
}
@ -736,11 +750,13 @@ export default {
this.thirdBuyList.forEach(item => {
//
if (item.name === this.thirdBuyForm.thirdBuyName) {
this.thirdBuyForm.thirdBuyCode = item.action;
if (item.action === this.thirdBuyForm.thirdBuyCode) {
// this.thirdBuyForm.thirdBuyCode = item.code;
this.thirdBuyForm.thirdBuyName = item.name;
}
});
saveBusTypes(this.thirdBuyForm).then((res) => {
this.handleBustypeChange(this.submitOrderRow);
}).catch((error) => {
@ -772,14 +788,26 @@ export default {
});
});
},
getThirdBuyType() {
getThirdBuyType(keyword) {
let query = {
key: keyword,
thirdSys: this.thirdSysFk
}
getOriginBusType(query).then((res) => {
this.thirdBuyList = res.data.list;
});
},
remoteMethod(keyword) {
let query = {
key: keyword,
thirdSys: this.thirdSysFk
}
getOriginBusType(query).then((res) => {
this.thridBusFilter = res.data.list;
});
},
handleAddInterface(row) {
this.addInterfaceVisible = true;
if (this.thirdSysFk == null) {
@ -881,7 +909,7 @@ export default {
editGeOrderParam(index, row) {
this.formName = "edit";
this.editGeOrderParamVisible = true;
this.getThirdBuyType();
this.thirdBuyForm = {
id: row.id,
code: row.code,
@ -900,6 +928,7 @@ export default {
},
created() {
this.getList();
this.getThirdBuyType();
},
};
</script>

@ -407,7 +407,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -430,7 +430,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -844,7 +844,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -645,7 +645,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -428,7 +428,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -279,7 +279,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -392,7 +392,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -145,7 +145,7 @@
<el-col :span="7">
<el-form-item prop="type" style="margin-right: 20px;"
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
<el-checkbox v-model="formData.noInvOut">
<el-checkbox v-model="formData.noInvOut">
</el-checkbox>
</el-form-item>
</el-col>

@ -256,7 +256,7 @@
<el-col :span="7">
<el-form-item prop="type" style="margin-right: 20px;"
v-if="!(curAction.mainAction=='WareHouseIn' && curAction.corpType == 0)">
<el-checkbox v-model="formData.noInvOut" :disabled="codeArray.length>0">
<el-checkbox v-model="formData.noInvOut" :disabled="codeArray.length>0">
</el-checkbox>
</el-form-item>
</el-col>

@ -356,7 +356,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -486,6 +486,8 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
const formJson = {
site_id: "",
@ -532,6 +534,7 @@ export default {
"10":"手动补单"
},
busTypes: [],
enableDept: false,
//
unitquery: {key: "", page: 1, limit: 20},
unitlist: [],
@ -1157,6 +1160,13 @@ export default {
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
},
};
</script>

@ -80,7 +80,7 @@
<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="exportOrders"></el-button>-->
<!-- <el-button type="primary" icon="search" @click="exportOrders"></el-button>-->
</el-button-group>
</el-form-item>
</el-row>
@ -404,6 +404,7 @@ import {formatDate} from "../../utils/date";
import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
const formJson = {
site_id: "",
@ -447,7 +448,7 @@ export default {
"6": "缺量补录单据",
"7": "UDI供应商平台",
"8": "平衡补录单据",
"10":"手动补单"
"10": "手动补单"
},
//
unitquery: {key: "", page: 1, limit: 20},
@ -961,6 +962,13 @@ export default {
let start = new Date();
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
this.actDateRange = [start, end];
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
}
,
}

@ -103,7 +103,7 @@
</el-table-column>
<el-table-column label="当前分库" prop="subInvName" width="120">
</el-table-column>
<el-table-column label="所属科室" prop="deptName" width="120">
<el-table-column label="所属科室" prop="deptName" width="120" v-if="enableDept">>
</el-table-column>
@ -279,6 +279,7 @@ import {filterAllByUser} from "@/api/basic/invWarehouse";
import {getLocalJoinByUser} from "@/api/basic/busLocalType";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
const formJson = {
site_id: "",
@ -340,6 +341,7 @@ export default {
add: "新增",
edit: "编辑",
},
enableDept:false,
fromTypeMap: {
"1": "UDIMS平台",
"2": "网页新增",
@ -349,7 +351,7 @@ export default {
"6": "缺量补录单据",
"7": "UDI供应商平台",
"8": "平衡补录单据",
"10":"手动补单"
"10": "手动补单"
},
deleteData: {
id: "",
@ -721,6 +723,13 @@ export default {
let query = this.$route.query;
this.filterQuery = Object.assign(this.filterQuery, query);
this.filterQuery.limit = parseInt(this.filterQuery.limit);
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
},
};

@ -211,6 +211,7 @@ import {getBasicUnitMaintains} from "../../api/basic/basicUnitMaintain"
import {getBussinessType} from "../../api/basic/bussinessType";
import draggable from "vuedraggable";
import codeDetail from "./IOFinishCode";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
const formJson = {
site_id: "",
@ -250,6 +251,7 @@ export default {
},
list: [],
adId: [],
enableDept: false,
adSelectList: [],
adList: {},
adListNoDataText: "无数据",
@ -494,6 +496,13 @@ export default {
//
this.getList();
this.getBusType();
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
},
};
</script>

@ -0,0 +1,478 @@
<template>
<div>
<el-card>
<el-form :model="formData" ref="dataForm">
<el-button-group style="display: flex;margin: 0px 0 10px 80%; height: 35px">
<el-button
type="primary"
@click.native="finishAccept()"
>完成验收
</el-button
>
<el-button
type="primary"
@click.native="renewAccept()"
>重新验收
</el-button
>
</el-button-group>
<el-row :gutter="20">
<el-col :span="3">
<div class="ao-text">
<span>单据号</span>
</div>
</el-col>
<el-col :span="8">
<el-input v-model="formData.billNo" auto-complete="off"
disabled
></el-input>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>单据时间</span>
</div>
</el-col>
<el-col :span="8">
<el-input v-model="formData.billdate" auto-complete="off"
disabled
></el-input>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 6px">
<el-col :span="3">
<div class="ao-text">
<span>单据类型</span>
</div>
</el-col>
<el-col :span="8">
<el-input v-model="formData.billTypeName" auto-complete="off"
disabled
></el-input>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="8">
<el-input v-model="formData.invName" auto-complete="off"
disabled
></el-input>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 6px">
<el-col :span="3">
<div class="ao-text">
<span>往来信息</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item class="query-form-item" prop="fromCorp"
>
<el-input v-model="formData.corpName" auto-complete="off"
disabled
></el-input>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>当前分库</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="invWarehouseCode">
<el-input v-model="formData.subInvName" auto-complete="off"
disabled
></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20" style="margin-top: 12px">
<el-col :span="2">
<div class="ao-text">
<el-link
target="_blank">{{ scanText }}
</el-link>
</div>
</el-col>
<el-col :span="16">
<el-form-item prop="code">
<el-input
id="inputer"
placeholder="请输入UDI码"
@focus="getInputFocus($event)"
@keypress.enter.native="enterKey($event)"
ref='inputRef'
style="ime-mode:disabled"
type="tel"
v-model="udiCode"
></el-input>
</el-form-item>
</el-col>
<el-col :span="2">
<el-button
type="primary"
size="small"
@click.native.stop="addCode()"
style="height: 31px; margin-left: 20px"
>添加
</el-button
>
</el-col>
</el-row>
</el-form>
</el-card>
<el-card>
<el-table v-loading="detailLoading"
:data="detailList"
:row-style="rowStyle"
style="width: 100%">
<el-table-column type="index" label="序号" width="50"></el-table-column>
<el-table-column label="产品通用名" width="160" prop="productName"></el-table-column>
<el-table-column label="包装规格" width="160" prop="spec"></el-table-column>
<el-table-column label="批次号" width="100" prop="batchNo"></el-table-column>
<el-table-column label="注册/备案凭证号" width="150" prop="zczbhhzbapzbh"></el-table-column>
<el-table-column label="生产日期" width="120" prop="productDate"></el-table-column>
<el-table-column label="失效日期" width="120" prop="expireDate"></el-table-column>
<el-table-column label="单据数量" width="100" prop="count"></el-table-column>
<el-table-column label="验收数量" width="100" prop="acceptCount"></el-table-column>
<el-table-column label="价格" width="120" prop="price"></el-table-column>
<!-- <el-table-column label="序列号" width="120" prop="serialNo"></el-table-column>-->
<el-table-column label="销售清单号(第二票)" width="180" prop="secSalesListNo">
</el-table-column>
<el-table-column label="销售发票号(第一票)" width="180" prop="firstSalesInvNo">
</el-table-column>
<el-table-column label="销售发票号(第二票)" width="180" prop="secSalesInvNo">
</el-table-column>
<el-table-column label="发票日期" width="150" prop="invoiceDate">
</el-table-column>
</el-table>
<el-pagination
:page-size="query.limit"
@current-change="handleCurrentChange"
layout="prev, pager, next"
:total="total"
>
</el-pagination>
</el-card>
</div>
</template>
<script>
import A from "@/plugin/KeyScaner";
import {stockOrderDetail, updateStatus} from "@/api/warehouse/stockOrder";
import {getAcceptOrder, acceptClear, acceptAddCode} from "@/api/warehouse/acceptOrder";
import {enterCodeWeb} from "@/api/warehouse/order";
export default {
name: "acceptOrder",
props: {
closeDialog: {
type: Function,
required: true,
},
orderQuery: {
type: Object,
required: true,
},
},
data() {
return {
formData: {},
loading: false,
detailLoading: false,
udiCode: null,
sictomText: "",
originCode: "",
checkSuccess: false,
detailList: [],
total: 0,
query: {
code: "",
corpOrderId: "",
page: 1,
limit: 10,
},
}
},
components: {},
methods: {
rowStyle({row, rowIndex}) {
let rowBackground = {};
if (row.reCount != row.acceptCount) {
rowBackground.color = '#f60303';
}
return rowBackground;
},
handleCurrentChange(val) {
this.query.page = val;
this.getCodeList();
},
enterKey(event) {
this.checkSuccess = true;
let tQuery = {
originCode: this.originCode,
code: this.udiCode.trim(),
}
enterCodeWeb(tQuery).then((response) => {
if (response.code === 20000) {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
this.udiCode = response.data;
this.addCode();
} else {
if (response.code == 502) {
this.checkSuccess = false;
this.udiCode = response.data;
this.originCode = this.udiCode;
} else if (response.code == 501) {
this.checkSuccess = false;
this.$message.error(response.message);
} else if (response.code == 503) {
this.checkSuccess = false;
this.udiCode = response.data;
this.$confirm(response.message, "提示", {
type: "warning",
})
.then(() => {
this.udiCode = response.data;
this.addCode();
})
.catch(() => {
this.udiCode = this.originCode;
});
} else if (response.code == 508) {
this.originCode = "";
this.udiCode = "01" + response.data.nameCode;
this.originCode = this.udiCode;
} else {
this.$alert(response.message, '提示', {
confirmButtonText: '确定',
type: 'warning',
closeOnClickModal: true,
callback: action => {
this.$refs.inputRef.focus();
this.$refs.inputRef.select();
}
});
}
}
this.loading = false;
});
},
addCode() {
if (this.$isBlank(this.udiCode)) {
this.$message.error("UDI码不能为空");
}
let postQuery = {
billNo: this.orderQuery.billNo,
orderDetailEntities: this.detailList,
code: this.udiCode,
}
acceptAddCode(postQuery)
.then((response) => {
if (response.code == 20000) {
this.detailLoading = false;
this.detailList = response.data.orderDetailEntities || [];
if (response.data.finishAccept) {
this.$confirm("校验完成,是否立即完成验收?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.finishAccept();
})
.catch(() => {
});
}
} else {
this.$message.error(response.message);
}
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
getInputFocus(event) {
event.currentTarget.select();
},
finishAccept() {
this.$confirm('是否确定完成验收此单据?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let query = {
stockOrderId: this.orderQuery.billNo,
};
updateStatus(query)
.then((response) => {
if (response.code == 20000) {
this.$message.success("验收成功!");
this.closeDialog();
} else {
this.$message.error(response.message);
}
})
.catch(() => {
});
}).catch(() => {
// this.$message.info('退');
});
},
renewAccept() {
let query = {
billNo: this.orderQuery.billNo,
}
acceptClear(query)
.then((response) => {
this.detailLoading = false;
this.detailList = response.data.orderDetailEntities || [];
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
},
getOrderDetail() {
this.detailLoading = true;
let query = {
billNo: this.orderQuery.billNo,
}
getAcceptOrder(query)
.then((response) => {
this.detailLoading = false;
this.detailList = response.data.orderDetailEntities || [];
if (response.data.exitAccept) {
this.$confirm("检测到上一次验收操作未完成, 是否继续上一次验收?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
})
.catch(() => {
this.renewAccept();
});
}
})
.catch(() => {
this.detailLoading = false;
this.detailList = [];
});
}
},
mounted() {
document.body.ondrop = function (event) {
event.preventDefault();
event.stopPropagation();
};
var that = this;
var inputer = document.getElementById("inputer");
window.sc = new A.KeyScaner(inputer);//DOM
sc.onInput = function (text) {
if (text.includes("delete")) {
that.vailQuery.code = "";
return;
}
if (that.sitcomScan) {
let tempTxt = text;
let str = tempTxt.replace(/[\r]/g, "");
that.sictomText = that.sictomText + str;
that.vailQuery.code = that.sictomText;
} else {
that.vailQuery.code = text;
}
};
inputer.focus();
},
created() {
this.formData = this.orderQuery;
this.getOrderDetail()
},
}
</script>
<style scoped>
.ao-text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
}
#inputer {
width: 100%;
min-height: 30px;
background-color: white;
border: #d0d0d0;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
#inputer:focus {
width: 100%;
min-height: 30px;
background-color: white;
border: #0080FF;
border-style: solid;
border-width: 0.1px;
color: #4a4a4a;
}
</style>

@ -198,6 +198,7 @@
title="单号详情"
:visible.sync="codeDetailVisible"
width="80%"
append-to-body
v-if="codeDetailVisible"
>
<codeDetail

@ -378,7 +378,7 @@
<el-col :span="12" class="el-col">
<div class="text item">
<div class="itemTag">
<span>计量单位/包装级别:&nbsp;</span>
<span>包装单位/包装级别:&nbsp;</span>
</div>
<el-input

@ -197,6 +197,8 @@ import {
} from "../../../api/auth/authAdmin";
import {findConfig} from "@/api/thrsys/spsSyncStatus";
import {isBlank} from "@/utils/strUtil";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
const formJson = {
id: "",
@ -244,6 +246,7 @@ export default {
add: "新增",
edit: "编辑"
},
enableDept: false,
configParms: {},
formLoading: false,
formVisible: false,
@ -486,6 +489,17 @@ export default {
this.getSyncConfig();
//
this.getRoleList();
//
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
this.enableDept = true;
}
}
})
}
};
</script>

Loading…
Cancel
Save