拆零出库新增,退回,查询修改

20240912_adapter_z
anthonywj 8 months ago
parent ded37366ae
commit 3cc2940116

File diff suppressed because it is too large Load Diff

@ -3,126 +3,6 @@
<el-card class="el-card">
<el-form v-if="queryList && queryList.length > 0 && showSearch" :model="filterQuery" class="query-form"
size="mini" label-width="100px">
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单号:">-->
<!-- <el-input v-model="filterQuery.billNo" placeholder="单号"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="出入库类型:">-->
<!-- <el-select v-model="filterQuery.mainAction" placeholder="请选择出入库类型" style="width: 90%">-->
<!-- <el-option label="全部" value=""></el-option>-->
<!-- <el-option label="入库" value="WareHouseIn"></el-option>-->
<!-- <el-option label="出库" value="WareHouseOut"></el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="单据类型:">-->
<!-- <el-select v-model="filterQuery.action" placeholder="请选择单据类型"-->
<!-- style="width: 90%"-->
<!-- clearable>-->
<!-- <el-option-->
<!-- 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>-->
<!-- </el-col>-->
<!-- &lt;!&ndash; <el-col :span="8">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-form-item class="query-form-item" label="采购仓库:">&ndash;&gt;-->
<!-- &lt;!&ndash; <el-select v-model="filterQuery.deptCode" placeholder="请选择采购仓库" clearable="true"&ndash;&gt;-->
<!-- &lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!-- &lt;!&ndash; >&ndash;&gt;-->
<!-- &lt;!&ndash; <el-option&ndash;&gt;-->
<!-- &lt;!&ndash; v-for="item in deptList"&ndash;&gt;-->
<!-- &lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!-- &lt;!&ndash; :value="item.code">&ndash;&gt;-->
<!-- &lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-option>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-select>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- &lt;!&ndash; </el-col>&ndash;&gt;-->
<!-- </el-row>-->
<!-- <el-row>-->
<!-- <el-col :span="8">-->
<!-- <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 invList"-->
<!-- :key="item.name"-->
<!-- :label="item.name"-->
<!-- :value="item.code">-->
<!-- <span style="float: left">{{ item.name }}</span>-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!--&lt;!&ndash; <el-form-item label="往来单位:">&ndash;&gt;-->
<!--&lt;!&ndash; <el-select&ndash;&gt;-->
<!--&lt;!&ndash; v-model="filterQuery.keyWords"&ndash;&gt;-->
<!--&lt;!&ndash; style="width: 90%"&ndash;&gt;-->
<!--&lt;!&ndash; filterable&ndash;&gt;-->
<!--&lt;!&ndash; remote&ndash;&gt;-->
<!--&lt;!&ndash; clearable="true"&ndash;&gt;-->
<!--&lt;!&ndash; reserve-keyword&ndash;&gt;-->
<!--&lt;!&ndash; placeholder="请选择往来单位"&ndash;&gt;-->
<!--&lt;!&ndash; :remote-method="findMethod"&ndash;&gt;-->
<!--&lt;!&ndash; :loading="loading"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <el-option&ndash;&gt;-->
<!--&lt;!&ndash; v-for="item in fromOptions"&ndash;&gt;-->
<!--&lt;!&ndash; :key="item.name"&ndash;&gt;-->
<!--&lt;!&ndash; :label="item.name"&ndash;&gt;-->
<!--&lt;!&ndash; :value="item.erpId"&ndash;&gt;-->
<!--&lt;!&ndash; >&ndash;&gt;-->
<!--&lt;!&ndash; <span style="float: left">{{ item.name }}</span>&ndash;&gt;-->
<!--&lt;!&ndash; </el-option>&ndash;&gt;-->
<!--&lt;!&ndash; </el-select>&ndash;&gt;-->
<!--&lt;!&ndash; </el-form-item>&ndash;&gt;-->
<!-- <el-form-item class="query-form-item" label="往来单位:">-->
<!-- <el-input v-model="filterQuery.keyWords" placeholder="请选择往来单位"-->
<!-- style="width: 90%"-->
<!-- clearable="true"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- <el-col :span="8">-->
<!-- <el-form-item class="query-form-item" label="创建时间:">-->
<!-- <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="结束日期"-->
<!-- style="width: 90%"-->
<!-- >-->
<!-- </el-date-picker>-->
<!-- </el-form-item>-->
<!-- </el-col>-->
<!-- </el-row>-->
<el-row style=" display:flex; flex-wrap: wrap; ">
<template v-for="(item, index) in queryList">
<el-form-item v-if="item.columnType == 'input' && executeEval(row,item.expression,true)"
@ -136,7 +16,8 @@
clearable
></el-input>
</el-form-item>
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)" class="query-form-item"
<el-form-item v-if="item.columnType == 'select' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select v-model="filterQuery[item.columnName]"
:placeholder="item.columnDesc"
@ -150,7 +31,8 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)" class="query-form-item"
<el-form-item v-if="item.columnType == 'selectServer' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-select
v-model="filterQuery[item.columnName]"
@ -169,7 +51,8 @@
/>
</el-select>
</el-form-item>
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)" class="query-form-item"
<el-form-item v-if="item.columnType == 'datePicker' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-date-picker
:picker-options="pickerOptions"
@ -182,7 +65,8 @@
end-placeholder="结束日期"
></el-date-picker>
</el-form-item>
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)" class="query-form-item"
<el-form-item v-if="item.columnType == 'date' && executeEval(row,item.expression,true)"
class="query-form-item"
:label="item.columnDesc+`:`">
<el-date-picker
v-model="filterQuery[item.columnName]"
@ -216,8 +100,29 @@
<el-divider style="margin: 15px"></el-divider>
<el-table v-loading="loading" :data="list" style="width: 100%" highlight-current-row
border :default-sort="defaultSort"
:row-style="{ height: '32px' }"
@row-click="(row) => executeFuc(row,'0',tableObj.handleChangeFuc)"
@sort-change="handleSortChange"
>
<el-table-column label="操作" width="100" fixed="right" v-if="splitType!='search'">
<template slot-scope="scope">
<el-button
type="text"
size="small"
@click.native.stop="editOrder(scope.row)"
>编辑
</el-button
>
<el-button
type="text"
size="small"
@click.native.stop="deleteDialog(scope.row)"
>删除
</el-button
>
</template>
</el-table-column>
<template v-for="(item, index) in tableHeader">
<el-table-column
v-if="item.columnType == 'id' && executeEval(row,item.expression,true)"
@ -358,9 +263,9 @@
import {
deleteByOrderId,
getOrderList, submitCodes
} from "../../api/inout/order";
import addOrder from "./DialogCreateOrder";
import errOrder from "./IoCreateErrorOrder";
} from "@/api/inout/order";
import addOrder from "@/views/inout/DialogCreateOrder";
import errOrder from "@/views/inout/IoCreateErrorOrder";
import {getInvListByUser, getInvListByUserOptimize} from "@/api/system/invWarehouse";
import {getLocalJoinByUser, getLocalJoinByUserOptimize} from "@/api/basic/busType";
import {selectSysParamByKey} from "@/api/param/systemParamConfig";
@ -368,20 +273,49 @@ import {getCorrespondence} from "@/api/basic/basicUnitMaintain";
import {
getHead, executeFuc
} from "@/utils/customConfig";
import {getDeptListByUserOptimize} from "@/api/auth/authDept";
import {convertDate} from "@/utils/date";
import {isBlank} from "@/utils/strUtil";
import {getBizDetailList} from "@/api/inout/orderDetailBiz";
import {getCodeList} from "@/api/inout/code";
export default {
name: "IoCreateScanOrder",
name: "IoSplitScanCode",
data() {
return {
//---------------------
tableObj: [],
queryList: [],
tableHeader: [],
fromList: [],
tableObj2: [],
queryList2: [],
tableHeader2: [],
fromList2: [],
tableObj4: [],
queryList4: [],
tableHeader4: [],
fromList4: [],
convertDateFun: convertDate,
defaultSort: {prop: 'createTime', order: 'desc'},
options: {
getInvList: [],
getDeptList: [],
getBusType: [],
},
//---------------------end
total: 0,
radioCheck: false,
currentRow: {},
showSearch: true,
titleMap: {
add: "新增单据",
edit: "编辑单据",
},
title: "add",
filterQuery: {
id: "",
billNo: null,
@ -394,6 +328,7 @@ export default {
endTime: null,
keyWords: null,
invCode: this.$store.getters.locInvCode,
vueType: null,
},
fromOptions: [],
checkStatus: {
@ -414,15 +349,6 @@ export default {
list: [],
addOrderVisible: false,
errOrderVisible: false,
total: 0,
tableHeader: [],
queryList: [],
fromList: [],
options: {
getInvList: [],
getDeptList: [],
getBusType: [],
},
loading: false,
index: null,
formName: null,
@ -432,7 +358,7 @@ export default {
edit: "编辑",
},
enableDept: false,
splitBusType:"SC72197936495755",
splitBusType: "SC72197936495755",
fromTypeMap: {
"1": "UDIMS平台",
"2": "网页新增",
@ -489,20 +415,50 @@ export default {
],
},
viewType: 2,
bizQuery: {
productName: null,
orderIdFk: null,
page: 1,
limit: 10
},
bizTotal: 0,
bizDetailLoading: false,
bizDetailList: [],
codeQuery: {
orderIdFk: null,
page: 1,
limit: 10
},
codeTotal: 0,
codeDetailLoading: false,
codeDetailList: [],
resultQuery: {
orderId: null,
code: null,
page: 1,
limit: 10
},
resultTotal: 0,
resultDetailLoading: false,
resultDetailList: [],
stockChangeVisible: false,
curRow: null,
//out:;return:退;search:
splitType: null,
};
},
components: {
addOrder, errOrder
},
methods: {
onReset() {
this.filterQuery = {
...this.filterQuery,
id: "",
billNo: null,
mainAction: null,
action: null,
statusType: "scan_code",
statusType: null,
page: 1,
limit: 10,
startTime: null,
@ -545,10 +501,10 @@ export default {
this.addOrderVisible = true;
},
editOrder(_this, row) {
_this.idQuery = row;
_this.title = "edit";
_this.addOrderVisible = true;
editOrder(row) {
this.idQuery = row;
this.title = "edit";
this.addOrderVisible = true;
},
closeDialog() {
@ -566,8 +522,6 @@ export default {
this.filterQuery.orderBy = column.prop;
this.getList();
},
//
getList() {
this.loading = true;
@ -612,14 +566,14 @@ export default {
.catch(() => {
});
},
deleteDialog(_this, rowId) {
_this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
deleteDialog(row) {
this.$confirm("此操作将永久删除该订单, 是否继续?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
_this.deleteOrders(rowId.billNo);
this.deleteOrders(row.billNo);
})
.catch(() => {
});
@ -697,7 +651,98 @@ export default {
return eval(expression);
}
return defaultRet;
}
},
handleSelectionChange(_this, val) {
_this.currentRow = val;
_this.getOrderDetails();
},
getOrderDetails() {
this.bizQuery.page = 1;
this.codeQuery.page = 1;
this.resultQuery.page = 1;
this.getBizDetailList();
this.getCodeList();
},
onBizReset() {
this.bizQuery = {
productName: null,
orderIdFk: null,
page: 1,
limit: 10
};
if (!isBlank(this.currentRow.billNo)) {
this.getBizDetailList();
}
},
onBizSubmit() {
this.bizQuery.page = 1;
this.getBizDetailList();
},
getBizDetailList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!")
return;
}
this.bizDetailLoading = true;
this.bizQuery.page = null;
this.bizQuery.limit = null;
this.bizQuery.orderIdFk = this.currentRow.billNo;
getBizDetailList(this.bizQuery).then((res) => {
this.bizDetailLoading = false;
if (res.code === 20000) {
this.codeDetailList = res.data.list || [];
this.bizTotal = res.data.total || 0;
} else {
this.$message.error(res.message);
this.codeDetailList = [];
this.bizTotal = 0;
}
}).catch((error) => {
this.bizDetailLoading = false;
this.$message.error(error.message);
this.bizDetailList = [];
this.bizTotal = 0;
})
},
onCodeReset() {
this.codeQuery = {
orderIdFk: null,
page: 1,
limit: 10
};
this.getCodeList();
},
onCodeSubmit() {
this.codeQuery.page = 1;
this.getCodeList();
},
getCodeList() {
if (isBlank(this.currentRow.billNo)) {
this.$message.error("请先选择需要查询的单据!")
return;
}
this.resultQuery.orderId = this.currentRow.billNo;
this.resultDetailLoading = true;
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;
});
},
},
mounted() {
document.body.ondrop = function (event) {
@ -708,7 +753,20 @@ export default {
created() {
this.getInvList(this);
this.getBusType(this);
getHead("IoSplitCodeOrder", "1").then((re) => {
this.splitType = this.$route.query.splitType;
if (this.splitType == "search") {
this.filterQuery.vueType = "splitOrder";
this.filterQuery.statusType = 'split_finish';
} else if (this.splitType == "out") {
this.filterQuery.action = 'SC72197936495755';
this.filterQuery.statusType = 'scan_code';
} else if (this.splitType == "return") {
this.filterQuery.action = 'SC72249388338364';
this.filterQuery.statusType = 'scan_code';
}
getHead("IoSplitOrderSearch", "1").then((re) => {
//
this.tableObj = re.data;
this.tableHeader = re.data.tableList;
@ -716,6 +774,23 @@ export default {
this.fromList = re.data.fromList;
this.getList();
});
getHead("IoSplitOrderSearch-djxq", "1").then((re) => {
//
this.tableObj2 = re.data;
this.tableHeader2 = re.data.tableList;
this.queryList2 = re.data.queryList;
this.fromList2 = re.data.fromList;
});
getHead("IoSplitOrderSearch-smxq", "1").then((re) => {
//
this.tableObj4 = re.data;
this.tableHeader4 = re.data.tableList;
this.queryList4 = re.data.queryList;
this.fromList4 = re.data.fromList;
});
selectSysParamByKey({paramKey: "muti_inv_mode"}).then((res) => {
if (res.code === 20000) {
if (res.data.paramValue === "0") {
@ -734,6 +809,7 @@ export default {
flex-wrap: wrap;
width: 100%;
}
.query-form-item {
margin-right: 5px;
margin-bottom: 6px;
Loading…
Cancel
Save