1.添加上传单据页面和对应的接口js文件

prod
x_z 2 years ago
parent 5fc6189140
commit 5348c5fa02

@ -464,4 +464,19 @@ export function rollUnReceivebackOrder(params) {
});
}
export function getUploadOrderList(params) {
return axios({
url: "/udiwms/inout/order/upload/filter",
method: "get",
params: params
});
}
export function submitOrderToThrSys(params) {
return axios({
url: "/udiwms/inout/order/submitToThrSys",
method: "get",
params: params
});
}

@ -330,8 +330,8 @@
<script>
import {
deleteByOrderId, deleteInvByBillNo,
getOrderList, rollbackOrder, rollUnReceivebackOrder
deleteInvByBillNo,
getOrderList, rollbackOrder
} from "../../api/inout/order";
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse";

@ -12,13 +12,16 @@
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.billType" placeholder="请选择单据类型" style="width: 90%">
<el-form-item class="query-form-item" label="所属仓库:">
<el-select v-model="filterQuery.invCode" placeholder="请选择所属仓库" clearable="true"
style="width: 90%"
@change="invChange"
>
<el-option
v-for="item in busTypes"
v-for="item in invList"
:key="item.name"
:label="item.name"
:value="item.action">
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
@ -26,14 +29,14 @@
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="单据状态:">
<el-select v-model="filterQuery.orderStatus" placeholder="请选择单据状态" style="width: 90%">
<el-form-item class="query-form-item" label="单据类型:">
<el-select v-model="filterQuery.billType" placeholder="请选择单据类型" style="width: 90%">
<el-option
v-for="item in orderStatusList"
:key="item.label"
:label="item.label"
:value="item.value">
<span style="float: left">{{ item.label }}</span>
v-for="item in busTypes"
:key="item.name"
:label="item.name"
:value="item.action">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</el-form-item>
@ -52,23 +55,11 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<el-form-item class="query-form-item" label="往来单位:">
<el-input
v-model="filterQuery.corpName"
placeholder="请输入往来单位"
style="width: 90%"
clearable="true"
></el-input>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item class="query-form-item" label="往来单位:">
<el-form-item class="query-form-item" label="单据日期:">
<el-date-picker
:picker-options="pickerOptions"
v-model="actDateRange"
@ -102,12 +93,237 @@
</el-button-group>
</div>
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border
@current-change="handleSelectionChange">
<el-table-column type="selection" width="55"></el-table-column>
<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="corpOrderId" show-overflow-tooltip></el-table-column>
<el-table-column label="来源" prop="fromType">
<template slot-scope="scope">
<span>{{ fromTypeMap[scope.row.fromType] }}</span>
</template>
</el-table-column>
<el-table-column label="往来单位" prop="fromCorpName" width="220">
</el-table-column>
<el-table-column label="当前部门" prop="deptName" width="120">
</el-table-column>
<el-table-column label="当前仓库" prop="invName" width="120">
</el-table-column>
<el-table-column label="所属科室" prop="deptName" width="120" v-if="enableDept">
</el-table-column>
<el-table-column label="创建时间" prop="createTime" show-overflow-tooltip>
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="提交状态" prop="exportStatus" width="100">
<template slot-scope="scope">
<el-tag :type="(scope.row.status ===-1 ) | statusFilterType">{{
exportStatusMap[scope.row.exportStatus]
}}
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="submitOrder(scope.row)"
>提交
</el-button
>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:limit.sync="filterQuery.limit"
:page.sync="filterQuery.page"
@pagination="getList"
></pagination>
</el-card>
<el-tabs type="border-card" style="margin: 15px">
<!--单据业务详情-->
<el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-单据详情</span>
<el-form :inline="true" :model="bizQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="产品名称:">
<el-input
v-model="bizQuery.productName"
placeholder="请输入产品名称"
clearable
>
</el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onBizReset"
>重置
</el-button>
<el-button type="primary" @click="onBizSubmit"
icon="el-icon-search"
>查询
</el-button>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="bizDetailLoading" :data="bizDetailList" style="width: 100%" border
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="产品通用名称"
prop="coName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="规格型号"
prop="spec"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="批次号"
prop="batchNo"
show-overflow-tooltip
></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="reCount"
></el-table-column>
<el-table-column
label="价格"
prop="price"
></el-table-column>
<el-table-column
label="生产厂家"
prop="manufacturer"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="注册/备案凭证号"
prop="certCode"
show-overflow-tooltip
></el-table-column>
</el-table>
<pagination
v-show="bizTotal>0"
:total="bizTotal"
:page.sync="bizQuery.page"
:limit.sync="bizQuery.limit"
@pagination="getBizDetailList"
/>
</el-tab-pane>
<!--单据扫码明细-->
<el-tab-pane>
<span slot="label">单据 {{ currentRow.billNo }}-扫码明细</span>
<el-form :inline="true" :model="resultQuery" class="query-form" size="mini">
<el-form-item class="query-form-item" label="产品名称:">
<el-input
v-model="resultQuery.code"
placeholder="请输入UDI码"
clearable
>
</el-input>
</el-form-item>
<el-form-item>
<el-button-group>
<el-button
type="primary"
icon="el-icon-refresh"
@click="onResultReset"
>重置
</el-button>
<el-button type="primary" @click="onResultSubmit"
icon="el-icon-search"
>查询
</el-button
>
</el-button-group>
</el-form-item>
</el-form>
<el-table v-loading="resultDetailLoading" :data="resultDetailList" style="width: 100%" border
row-key="id"
>
<el-table-column label="序号" type="index"></el-table-column>
<el-table-column
label="UDI码"
prop="code"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="生产日期"
prop="produceDate"
width="120"
></el-table-column>
<el-table-column
label="失效日期"
prop="expireDate"
width="120"
></el-table-column>
<el-table-column
label="批次号"
prop="batchNo"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="序列号"
prop="serialNo"
></el-table-column>
<el-table-column
label="供应商"
prop="supName"
show-overflow-tooltip
></el-table-column>
<el-table-column
label="扫码数量"
prop="reCount"
></el-table-column>
<el-table-column
label="实际数量"
prop="reCount"
></el-table-column>
</el-table>
<pagination
v-show="resultTotal>0"
:total="resultTotal"
:page.sync="resultQuery.page"
:limit.sync="resultQuery.limit"
@pagination="getResultDetailList"
/>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import {getLocalJoinByUser} from "@/api/basic/busType";
import {getInvListByUser} from "@/api/system/invWarehouse";
import {getResultDetailList} from "@/api/inout/orderDetailResult";
import {getCodeList} from "@/api/inout/code";
import {getUploadOrderList, submitOrderToThrSys} from "@/api/inout/order";
const formJson = {
@ -124,16 +340,16 @@ export default {
filterQuery: {
billType: null,
corpName: null,
invCode: null,
invCode: this.$store.getters.locInvCode,
startTime: null,
endTime: null,
billNo: null,
orderStatus: null,
submitStatus: null,
page: 1,
limit: 10
},
showSearch: true,
invList: [],
busTypes: [],
orderStatusList: [
{
@ -198,7 +414,52 @@ export default {
},
},
],
}
},
fromTypeMap: {
"1": "UDIMS平台",
"2": "网页新增",
"3": "pda即时校验",
"4": "pda未校验",
"5": "pc端扫码精灵",
"6": "缺量补录单据",
"7": "UDI供应商平台",
"8": "平衡补录单据",
"10": "手动补单",
"11": "仓库盘点",
"12": "采购计划",
"13": "领用单据",
"14": "第三方系统单据",
},
exportStatusMap: {
null: "未提交",
0: "未提交",
1: "已提交",
2: "提交失败"
},
loading: false,
list: [],
total: 0,
currentRow: {
billNo: ""
},
bizQuery: {
orderIdFk: null,
productName: null,
page: 1,
limit: 10
},
bizDetailLoading: false,
bizDetailList: [],
bizTotal: 0,
resultQuery: {
orderIdFk: null,
code: null,
page: 1,
limit: 10
},
resultDetailLoading: false,
resultDetailList: [],
resultTotal: 0
};
},
components: {},
@ -207,9 +468,178 @@ export default {
this.showSearch = !this.showSearch;
},
onReset() {
this.filterQuery = {
billType: null,
corpName: null,
invCode: this.$store.getters.locInvCode,
startTime: null,
endTime: null,
billNo: null,
submitStatus: null,
page: 1,
limit: 10
};
this.getList();
},
onSubmit() {
this.filterQuery.page = 1;
if (this.actDateRange !== null) {
this.filterQuery.startTime = this.actDateRange[0];
this.filterQuery.endTime = this.actDateRange[1];
} else {
this.filterQuery.startTime = null;
this.filterQuery.endTime = null;
}
this.getList();
},
getList() {
this.loading = true;
this.clearDetailTable();
getUploadOrderList(this.filterQuery).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.list = res.data.list || [];
this.total = res.data.total || 0;
} else {
this.list = [];
this.total = 0;
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
this.list = [];
this.total = 0;
})
},
clearDetailTable() {
this.currentRow.billNo = "";
this.bizDetailList = [];
this.bizTotal = 0;
this.resultDetailList = [];
this.resultTotal = 0;
this.bizQuery.page = 1;
this.resultQuery.page = 1;
},
handleSelectionChange(row) {
this.currentRow.billNo = row.billNo;
this.getBizDetailList();
this.getResultDetailList();
},
submitOrder(row) {
if (row.exportStatus == 1) {
this.$confirm("单据已经提交,是否重复提交?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
}).then(() => {
this.uploadOrder(row);
});
} else {
this.$confirm("确定手动上传单据?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
center: true
}).then(() => {
this.uploadOrder(row);
}).catch(() => {
})
}
},
uploadOrder(row) {
this.loading = true;
this.clearDetailTable();
let params = {billNo: row.billNo};
submitOrderToThrSys(params).then((res) => {
this.loading = false;
if (res.code === 20000) {
this.$message.success("上传成功");
this.getList();
} else {
this.$message.error(res.message);
}
}).catch((error) => {
this.loading = false;
this.$message.error(error.message);
})
},
onBizReset() {
this.bizQuery.productName = null;
this.onBizSubmit();
},
onBizSubmit() {
this.bizQuery.page = 1;
this.getBizDetailList();
},
getBizDetailList() {
this.bizQuery.orderIdFk = this.currentRow.billNo;
this.bizDetailLoading = true;
getResultDetailList(this.bizQuery).then((res) => {
this.bizDetailLoading = false;
if (res.code === 20000) {
this.bizDetailList = res.data.list || [];
this.bizTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.bizDetailList = [];
this.bizTotal = 0;
}
}).catch((error) => {
this.bizDetailLoading = false;
this.$message.error(error.message);
this.bizDetailList = [];
this.bizTotal = 0;
})
},
onResultReset() {
this.resultQuery.code = null;
this.onResultSubmit();
},
onResultSubmit() {
this.resultQuery.page = 1;
this.getResultDetailList();
},
getResultDetailList() {
this.resultDetailLoading = true;
this.resultQuery.orderIdFk = this.currentRow.billNo;
getCodeList(this.resultQuery).then((res) => {
this.resultDetailLoading = false;
if (res.code === 20000) {
this.resultDetailList = res.data.list || [];
this.resultTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.resultDetailList = [];
this.resultTotal = 0;
}
}).catch((error) => {
this.resultDetailLoading = false;
this.$message.error(error.message);
this.resultDetailList = [];
this.resultTotal = 0;
})
},
getInvList() {
getInvListByUser().then((res) => {
this.invList = res.data || [];
this.getBusType();
})
},
invChange() {
this.filterQuery.billType = null;
this.getBusType();
},
getBusType() {
let params = {
code: this.filterQuery.invCode,
enabled: true
};
getLocalJoinByUser(params).then((res) => {
this.busTypes = res.data.list || [];
this.onSubmit();
});
},
},
filters: {
statusFilterType(status) {
@ -227,6 +657,7 @@ export default {
};
},
created() {
this.getInvList();
},
};
</script>

Loading…
Cancel
Save