去除仓库功能

zhairh
zhengmingliang 3 years ago committed by 郑明梁
parent 0bd1b0316a
commit 3010f2ad31

@ -16,6 +16,13 @@ export function filterSubByInv(query) {
params: query
});
}
export function filterSub(query) {
return axios({
url: "/spms/sub/inv/warehouse/filterSub",
method: "get",
params: query
});
}

@ -1,36 +1,15 @@
<template>
<div>
<el-form :model="inputQuery" :rules="formRules" ref="dataForm">
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>委托仓库:&nbsp;</span>
</div>
<el-select v-model="inputQuery.curInv" placeholder="当前仓库" @change="invChange" clearable>
<el-option
v-for="item in storageList"
:key="item.code"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>当前分库:&nbsp;</span>
</div>
<el-select v-model="inputQuery.invWarehouseCode" placeholder="当前分库"
@change="subInvChange"
@change="entrustInvChange"
filterable
clearable>
<el-option
v-for="item in subInvList"
@ -38,6 +17,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
@ -73,27 +53,6 @@
</el-row>
<el-row :gutter="20" class="el-row" type="flex">
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
<span>接受委托仓库:&nbsp;</span>
</div>
<el-select v-model="inputQuery.entrustInv" placeholder="接受委托仓库" @change="entrustInvChange"
clearable>
<el-option
v-for="item in entrustStorageList"
:key="item.code"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
</el-option>
</el-select>
</div>
</el-col>
<el-col :span="10" class="el-col">
<div class="text item">
<div class="itemTag">
@ -101,6 +60,7 @@
</div>
<el-select v-model="inputQuery.entrustSubInv" placeholder="接受委托分库"
@change="entrustSubInvChange"
filterable
clearable>
<el-option
v-for="item in entrustSubInvList"
@ -108,6 +68,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
@ -173,7 +134,7 @@ import {
import {filterAll, filterNext, warehouseBussinessTypeList, warehouseUserList} from "@/api/basic/invWarehouse";
import {getBasicUnitMaintains} from "@/api/basic/basicUnitMaintain";
import {filterNoUseBusType} from "@/api/basic/EntrustRece";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
import {filterSubByInv,filterSub} from "@/api/basic/invSubWarehouse";
export default {
@ -268,12 +229,13 @@ export default {
findEntrustSubInvByInv() {
this.entrustSubInvList = [];
let query = {
pcode: this.inputQuery.entrustInv,
filter: 2,
code: this.inputQuery.invWarehouseCode,
};
filterSubByInv(query)
filterSub(query)
.then((response) => {
this.entrustSubInvList = response.data || [];
this.entrustSubInvChange();
@ -295,6 +257,7 @@ export default {
});
},
getOrderType() {
let query = {
locSubInvCode: this.inputQuery.invWarehouseCode
}

@ -168,7 +168,7 @@
<el-button
type="text"
size="small" :disabled="!configParms.basicInv"
@click.native.stop="selsectBussinessType(scope.row)"
@click.native.stop="addBussinessType(scope.row)"
>管理单据类型
</el-button
>
@ -332,6 +332,7 @@
<el-table-column label="单据类型编码" prop="action" fixed></el-table-column>
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
</el-table>
<el-pagination
:page-size="bussinessTypeQuery.limit"
@current-change="getBussinessType"
@ -340,6 +341,7 @@
:current-page="bussinessTypeQuery.page"
>
</el-pagination>
<div slot="footer" class="dialog-footer">
<el-button @click.native="bussinessTypeFormVisible = !bussinessTypeFormVisible"
>取消
@ -353,53 +355,6 @@
</div>
</el-dialog>
<!--添加单据类型弹窗---->
<!--添加单据类型弹窗-->
<el-dialog
title="仓库关联单据类型"
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="userBussinessTypeFormVisible"
>
<el-row type="flex" justify="end">
<el-button-group style="display: flex;margin-bottom: 15px; margin-right: 50px">
<el-button
type="primary"
@click.native="addBussinessType()"
:loading="loading"
>选入
</el-button
>
</el-button-group>
</el-row>
<el-table v-loading="loading" :data="userBussinessTypeList" ref="typeList"
style="width: 100%">
<el-table-column label="单据类型编码" prop="action" fixed></el-table-column>
<el-table-column label="单据类型名称" prop="name" fixed></el-table-column>
<el-table-column label="操作" fixed="right">
<template slot-scope="scope">
<el-button
type="text"
size="small"
:disabled="!configParms.basicInv"
@click.native.stop="delWarehouseBussinessType(scope.row.id)"
>移除
</el-button
>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click.native="userBussinessTypeFormVisible = !userBussinessTypeFormVisible"
>取消
</el-button
>
</div>
</el-dialog>
<!--表单界面-->
<el-dialog
:title="formMap[formName]"
@ -782,7 +737,7 @@ import {
warehouseUserList, saveWarehouseBussinessType,
saveWarehouseUser, updateDirector, disableWarehouse,
deleteWarehouseBussinessType,
bindThrWarehouse, unbindThrWarehouse, filterThridSubByInv, getThrsysDetail,delWarehouseBussinessType
bindThrWarehouse, unbindThrWarehouse, filterThridSubByInv, getThrsysDetail
} from "../../api/basic/invWarehouse";
import {
filterSubAll, saveSubWarehouse, deleteSubWarehouse,
@ -880,8 +835,6 @@ export default {
selectUserList: [],
selectBussinessTypeList: [],
bussinessTypeFormVisible: false,
userBussinessTypeList:[],
userBussinessTypeFormVisible:false,
thrWarehouseData: [],
thrSubWarehouseData: [],
currentId: null,
@ -934,8 +887,7 @@ export default {
bussinessTypeQuery: {
enabled: true,
page: 1,
limit: 10,
ids:""
limit: 10
},
bussinessTypeTotal: 0,
curSeleUser: null,
@ -1174,34 +1126,7 @@ export default {
});
}
},
//
handleUserSubDel(row){
if (row.id) {
this.$confirm("确认移除单据吗?", "提示", {
type: "warning",
})
.then(() => {
this.deleteLoading = true;
let para = {id: row.id};
deleteSubWarehouse(para)
.then((response) => {
this.deleteLoading = false;
if (response.code !== 20000) {
this.$message.error(response.message);
return false;
}
this.$message.success("删除成功");
this.loadSubData(row.parentId);
})
.catch(() => {
this.deleteLoading = false;
});
})
.catch(() => {
this.$message.info("取消删除");
});
}
},
handleSubDel(row) {
if (row.id) {
@ -1447,15 +1372,10 @@ export default {
})
});
},
getBussinessType(val,obj) {
getBussinessType(val) {
if (val != null) {
this.bussinessTypeQuery.page = val;
}
if(obj!=undefined){
var action=obj.toString();
this.bussinessTypeQuery.ids=action;
}
this.bussinessTypeQuery.code=this.busQuery.code;
getJoinBussinessType(this.bussinessTypeQuery).then((res) => {
this.selectBussinessTypeList = [];
@ -1533,46 +1453,17 @@ export default {
});
}
},
// addBussinessType(row) {
// this.currentCode = row.code;
// this.currentRow = row;
// this.loadLinkData(row);
// if (this.currentCode == null || this.currentCode == '') {
// this.$message.error('');
// } else if (this.currentCode != row.code) {
// this.$message.error("")
// } else {
// this.bussinessTypeFormVisible = true;
// this.bussinessTypeQuery.page = 1;
// this.getBussinessType();
// }
// },
addBussinessType(row) {
var action=[];
for(var i=0;i<this.userBussinessTypeList.length;i++){
action.push(this.userBussinessTypeList[i].action);
}
this.currentCode = row.code;
this.currentRow = row;
this.loadLinkData(row);
if (this.currentCode != row.code) {
this.$message.error("请先选择当前分库!")
} else {
this.bussinessTypeFormVisible = true;
this.bussinessTypeQuery.page = 1;
this.getBussinessType(1,action);
},
selsectBussinessType(row){
// if(row==null || row==undefined){
// this.$message.info("");
// return;
// }
var busQuery = {
code: row.code,
page: 1,
limit: 10000
this.getBussinessType();
}
warehouseBussinessTypeList(busQuery).then((res) => {
this.userBussinessTypeList = res.data.list;
}).catch((error) => {
this.$message.error("单据类型数据加载失败")
});
this.userBussinessTypeFormVisible = true;
},
addBussinessTypeData() {
// if (this.selectBussinessTypeList.length == 0) {
@ -1584,6 +1475,7 @@ export default {
bussinessTypes: JSON.stringify(this.selectBussinessTypeList)
};
saveWarehouseBussinessType(query).then((res) => {
if (res.code == 20000) {
this.$message.success("修改成功!");
//
@ -1599,9 +1491,6 @@ export default {
this.bussinessTypeData = [];
this.busTotal = 0;
});
this.selectWhouseBussinessType();
} else {
this.$message.error(res.message);
}
@ -1611,17 +1500,6 @@ export default {
});
// }
},
selectWhouseBussinessType(){
var busQuery = {
code: this.currentCode,
page: 1,
limit: 100000
}
warehouseBussinessTypeList(busQuery).then((res) => {
this.userBussinessTypeList = res.data.list || [];
}).catch((error) => {
});
},
updateDirector(row) {
row.director = !row.director;
updateDirector(row).then((res) => {
@ -1650,21 +1528,14 @@ export default {
deleteWarehouseBussinessType(params).then((res) => {
if (res.code == 20000) {
this.$message.success("已移除");
this.bussinessTypeData = [];
this.selectWhouseBussinessType();
  var busQuerys = {
                        code: this.currentCode,
                        page: 1,
                        limit: 10
                    }
            warehouseBussinessTypeList(busQuerys).then((res) => {
                    this.bussinessTypeData = res.data.list;
                }).catch((error) => {
                    this.$message.error("单据类型数据加载失败")
                });
for (let i = 0; i < this.bussinessTypeData.length; i++) {
if (this.bussinessTypeData[i].id == id) {
this.bussinessTypeData.splice(i, 1);
return;
}
}
} else {
this.$message.error(res.message);
this.$message.error("移除失败");
}
}).catch((error) => {
this.$message.error("移除失败");

@ -205,30 +205,6 @@
v-if="selInvVisible"
>
<el-form :model="userInfo">
<el-row :gutter="20">
<el-col :span="4">
<div class="ao-text">
<span>仓库</span>
</div>
</el-col>
<el-col :span="16">
<el-form-item prop="locStorageCode">
<el-select v-model="userInfo.locInvCode" placeholder="仓库信息" clearable
@change="locCHange"
>
<el-option
v-for="item in storageList"
: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-row>
<el-row :gutter="20">
<el-col :span="4">
<div class="ao-text">
@ -237,15 +213,15 @@
</el-col>
<el-col :span="16">
<el-form-item prop="locInvCode">
<el-select v-model="userInfo.locSubInvCode" placeholder="分库信息" clearable
<el-select v-model="userInfo.locSubInvCode" filterable placeholder="分库信息" clearable
>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -253,7 +229,7 @@
</el-row>
<div style="margin-top: 8px ; color: #F71616;">
<span>提示进入系统前请选择您默认所在仓库与分库&nbsp;</span>
<span>提示进入系统前请选择您默认所在分库&nbsp;</span>
</div>
<div style='text-align: center; margin-bottom: 10px;margin-top: 18px ;'>
<el-button type="primary" @click="submitInv" style="width: 150px">提交</el-button>
@ -449,14 +425,12 @@ export default {
findSubInvByInv() {
this.subInvList = [];
let query = {
pcode: this.userInfo.locInvCode
};
filterSubByInv(query)
filterSubByInv()
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.userInfo.locSubInvCode = this.subInvList[0].code;
this.userInfo.locSubInvCode = this.subInvList[subInvList.length].code;
}
})
.catch(() => {
@ -476,7 +450,7 @@ export default {
}
if (this.$isBlank(this.userInfo.locInvCode) || this.$isBlank(this.userInfo.locSubInvCode)) {
if (this.$isBlank(this.userInfo.locSubInvCode)) {
this.selInvVisible = true;
} else {
this.$store.commit(types.RECEIVE_LOCINVCODE, this.userInfo.locInvCode);
@ -505,11 +479,6 @@ export default {
},
submitInv() {
if (this.$isBlank(this.userInfo.locInvCode)) {
this.$message.error("仓库不能为空!");
return;
}
if (this.$isBlank(this.userInfo.locSubInvCode)) {
this.$message.error("分库不能为空!");
return;
@ -586,6 +555,7 @@ export default {
// this.getStorage();
// this.findSubInvByInv();
this.getUserInfo();
this.locCHange();
bus.$on("collapse-content", (msg) => {
this.collapse = msg;
});

@ -368,9 +368,7 @@ export default {
thirdSysFk: [
{required: true, message: "请选择第三方系统", trigger: "blur"}
],
advanceType: [
{required: true, message: "请选择仓库类型", trigger: "blur"}
]
},
pidData: {},
deleteLoading: false,

@ -56,42 +56,28 @@
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
<span>业务类型</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" style="width: 50%;" placeholder="当前仓库信息"
@change="locInChange"
clearable>
<el-option
v-for="item in storageList"
:key="item.name"
:label="item.name"
: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-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型"
@change="actionChange" clearable>
<el-option
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
v-for="item in busTypes"
:key="item.thirdAction"
:label="item.thirdName"
:value="item.thirdAction">
<span style="float: left">{{ item.thirdName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>往来信息</span>
<span>往来单位</span>
</div>
</el-col>
<el-col :span="7">
@ -100,10 +86,9 @@
v-model="formData.corpName"
filterable
remote
style="width: 50%"
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
placeholder="请输入往来单位"
:remote-method="findStorageMethod"
:loading="loading"
@change="storageChange"
@ -119,58 +104,35 @@
}}</span>
</el-option>
</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-col>
</el-row>
<el-row :gutter="20" style="margin-top: -10px">
<el-col :span="3">
<div class="ao-text">
<span>领用类型</span>
<span>当前分库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择领用类型" style="width: 100%"
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
clearable>
<el-option
v-for="item in busTypes"
:key="item.originAction"
:label="item.originName"
:value="item.originAction">
<span style="float: left">{{ item.originName }}</span>
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3">
<div class="ao-text">
<span>备注</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="remark">
<el-input v-model="formData.remark" auto-complete="off"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-card>
@ -294,6 +256,20 @@
</el-card>
</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
title="库存产品录入"
@ -308,7 +284,6 @@
:closeDialog="closeDialogC2"
:data="thisData"
:invQueryData="invQueryData"
:type="1"
></dialogInvProduct>
</el-dialog>
</div>
@ -337,8 +312,8 @@ import {getBussinessType} from "../../api/basic/bussinessType";
import {getLocalBusType, getLocalJoinBusType, getLocalJoinByUser} from "../../api/basic/busLocalType";
import {filterAll, filterAllByLoc, filterAllByUser} from "@/api/basic/invWarehouse";
import dialogInvProduct from "../inventory/DialogInvProduct"
import {getBusChange} from "@/api/basic/busTypeChange";
import {inserThrOrderWeb, updateReceive} from "@/api/thrsys/thrOrderReceive";
import {getOriginJoinBusType} from "@/api/basic/busOriginType";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
@ -357,10 +332,6 @@ export default {
type: Function,
required: true,
},
editType: {
type: Object,
required: true,
},
},
data() {
return {
@ -406,7 +377,6 @@ export default {
subInvList: [],
fromOptions: [],
fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0,
loading: false,
index: null,
@ -428,6 +398,10 @@ export default {
1: "预入库",
2: "普通采购",
},
curAction: {
corpType: 0,
genUnit: false,
},
orderEditor: true,
iCount: 0,
sOptions: [],
@ -437,11 +411,11 @@ export default {
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
selectInvProductVisible: false,
thisData: {},
storageList: [],
invQueryData: {},
type: 1,
};
},
@ -475,7 +449,7 @@ export default {
}
if (status === '2') {
if (status === '0') {
for (let i = 0; i < this.codeArray.length; i++) {
if (this.$isBlank(this.codeArray[i].count) || this.codeArray[i].count == "0") {
return this.$message.error('单据数量不能为0');
@ -518,11 +492,8 @@ export default {
console.log(row);
this.formData.corpId = row.code;
this.formData.corpName = row.name;
this.findSubStorageMethod();
},
//
getStorage() {
getStorage(event) {
this.storageList = [];
filterAllByUser()
.then((response) => {
@ -533,23 +504,6 @@ 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) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].action === action) {
@ -557,9 +511,7 @@ export default {
}
}
},
//
findStorageMethod() {
findStorageMethod(query) {
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@ -579,22 +531,6 @@ export default {
.catch(() => {
});
},
//
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.corpId,
filter: 2,
};
filterSubByInv(cQuery)
.then((response) => {
this.fromSubStorageOptions = response.data || [];
})
.catch(() => {
});
},
submitFunction(status) {
let tMessage = status === '501' ? '保存' : '提交';
this.loading = true;
@ -602,7 +538,10 @@ export default {
tQuery.editStatus = status;
tQuery.subErpOrders = this.codeArray;
tQuery.thirdPartyDate = 2;
if (this.editType === "add") {
// tQuery.billType = this.formData.bi;
console.log(tQuery);
inserThrOrderWeb(tQuery)
.then(response => {
this.loading = false;
@ -616,23 +555,6 @@ export default {
.catch(() => {
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) {
@ -658,20 +580,25 @@ export default {
if (this.orderEditor) {
this.thisData.orderId = this.formData.id
}
this.curAction = this.getActionItem(this.formData.billType);
this.thisData.stockOrderLists = this.codeArray;
this.thisData.formData = this.formData;
this.thisData.formData.thirdSysFk = this.curAction.thirdSys;
this.thisData.billType = this.curAction.localAction;
this.invQueryData = {
locStorageCode: this.formData.locStorageCode,
};
this.selectInvProductVisible = true;
return;
}
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.selectInvProductVisible = false;
this.thisData = {};
@ -920,12 +847,13 @@ export default {
},
getBusType() {
let query = {
enable: false,
type: 1,
enabled: true,
corpType: 1,
};
getBusChange(query)
getOriginJoinBusType(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.curAction = this.busTypes[0];
})
.catch(() => {
});
@ -936,6 +864,42 @@ export default {
this.formData.corpId = 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) {
for (let i = 0; i < this.busTypes.length; i++) {
if (this.busTypes[i].thirdAction === action) {
@ -943,15 +907,38 @@ export default {
}
}
},
actionChange(item) {
console.log(item);
this.curAction = this.getActionItem(item);
this.locInChange();
this.findMethod();
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.$forceUpdate();
this.getBusType(item);
this.findStorageMethod();
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(() => {
});
}
},
@ -991,10 +978,8 @@ export default {
this.getBusType();
this.getStorage();
this.findSubInvs();
this.findStorageMethod();
this.findSubInvByInv();
this.findSubStorageMethod();
// this.findSubInvByInv();
this.codeArray = [];
this.closeConfirmFunction(false);
},

@ -66,19 +66,21 @@
<el-col :span="3">
<div class="ao-text">
<span>当前</span>
<span>当前</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locCHange">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" @change="findSubStorageMethod"
>
<el-option
v-for="item in storageList"
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -120,26 +122,6 @@
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1">
<el-select
v-model="formData.fromCorp"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
:remote-method="findStorageMethod"
:loading="loading"
@change="storageChange"
>
<el-option
v-for="item in fromStorageOptions"
:key="item.value"
:label="item.code"
:value="item">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
>
@ -149,7 +131,7 @@
: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>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
</el-option>
</el-select>
@ -164,26 +146,7 @@
</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-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
>
<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-col>
</el-row>
</el-form>
@ -383,7 +346,7 @@ export default {
},
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.fromCorpId,
code: this.formData.invWarehouseCode,
filter: 2,
};
filterSubByInv(cQuery)
@ -508,6 +471,7 @@ export default {
this.formData.corpOrderId = parseTime(date, '{y}{m}{d}{h}{i}{s}') + Math.ceil(Math.random() * 89 + 10);
}
this.getBusType();
this.findSubInvByInv(this.formData.locStorageCode);
this.getStorage();
this.getStockOrderDetailList(this.curRow.id);
}

@ -24,19 +24,7 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item class="query-form-item">
<el-select v-model="filterQuery.locStorageCode" placeholder="请选择当前仓库" clearable="true"
@change="invChangetwo"
size="mini">
<el-option
v-for="item in storageList"
: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 class="query-form-item">
<el-select v-model="filterQuery.invWarehouseCode" placeholder="请选择当前分库" clearable="true"
size="mini">
@ -46,6 +34,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>

@ -560,12 +560,7 @@ export default {
this.filterQuery.endTime = null;
}
if (!isBlank(this.filterQuery.invWarehouseCode)) {
if (isBlank(this.filterQuery.locStorageCode)) {
this.$message.warning("请选择仓库!");
return;
}
}
this.getList();
},
handleSizeChange(val) {

@ -70,20 +70,21 @@
<el-col :span="2">
<div class="ao-text">
<span>当前</span>
<span>当前</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locCHange"
:disabled="corpOrderIdDisabled">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
:disabled="corpOrderIdDisabled" @change="findSubStorageMethod" filterable>
<el-option
v-for="item in storageList"
v-for="item in subInvList"
:key="item.name"
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -130,30 +131,11 @@
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1"
>
<el-select
v-model="formData.fromCorp"
filterable
remote
clearable="true"
reserve-keyword
placeholder="请输入仓库信息"
:remote-method="findStorageMethod"
:loading="loading" :disabled="corpOrderIdDisabled"
@change="storageChange"
>
<el-option
v-for="item in fromStorageOptions"
:key="item.value"
:label="item.code"
:value="item">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
</el-option>
</el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
:disabled="corpOrderIdDisabled"
:disabled="corpOrderIdDisabled" filterable
>
<el-option
v-for="item in fromSubStorageOptions"
@ -161,7 +143,7 @@
: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>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
<!--<span style="float: right; color: #8492a6; font-size: 13px">{{ item.action }}</span>-->
</el-option>
</el-select>
@ -178,26 +160,7 @@
</el-col>
<el-col :span="2">
<div class="ao-text">
<span>当前分库</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
:disabled="corpOrderIdDisabled" @change="subStorageChange">
<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-col>
</el-row>
<el-row :gutter="20" v-if="enableDept">
@ -611,10 +574,7 @@ export default {
this.$message.error('未选择扫码单据类型');
return
}
if (this.formData.locStorageCode == null || this.formData.locStorageCode == '') {
this.$message.error('当前仓库不能为空');
return;
}
if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') {
this.$message.error('当前分库不能为空');
@ -723,10 +683,7 @@ export default {
this.$message.warning("请选择单据类型!");
return;
}
if (this.$isBlank(this.formData.locStorageCode)) {
this.$message.error('当前仓库不能为空');
return;
}
if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') {
this.$message.error('当前分库不能为空');
return;
@ -973,6 +930,7 @@ export default {
this.getBusType();
},
findMethod(query) {
this.fromOptions = [];
let cQuery = {
key: query,
@ -1026,6 +984,7 @@ export default {
findStorageMethod() {
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@ -1042,11 +1001,12 @@ export default {
findSubStorageMethod(val) {
let cQuery = {
pcode: this.formData.fromCorpId,
code: this.formData.invWarehouseCode,
filter: 2,
};
filterSubByInv(cQuery)
.then((response) => {
this.fromSubStorageOptions = response.data || [];
if (val == 1) {
@ -1059,14 +1019,14 @@ export default {
findSubInvByInv(invCode) {
this.subInvList = [];
let query = {
pcode: invCode
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
this.fromSubStorageOptions = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
this.getBusType();
@ -1222,6 +1182,7 @@ export default {
},
created() {
this.formData.code = '';
this.formData.actDate = new Date();
this.codeArray = [];
@ -1240,7 +1201,6 @@ export default {
this.formData.preCheck = this.idQuery.preCheck;
this.actionEnable = true;
this.getCodeList();
this.findSubStorageMethod(1);
} else {
this.corpOrderIdDisabled = false;
@ -1263,7 +1223,7 @@ export default {
}
}
this.findSubInvByInv(this.formData.locStorageCode);
// this.findSubStorageMethod();
this.findSubStorageMethod();
this.getBusType();
//

@ -84,28 +84,7 @@
</el-row>
<el-row :gutter="20">
<el-col :span="2">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="8">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable
@change="locCHange"
:disabled="corpOrderIdDisabled">
<el-option
v-for="item in storageList"
: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="2">
<div class="ao-text">
@ -125,6 +104,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -466,10 +446,7 @@ export default {
this.$message.error('未选择扫码单据类型');
return
}
if (this.formData.locStorageCode == null || this.formData.locStorageCode == '') {
this.$message.error('当前仓库不能为空');
return;
}
if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') {
this.$message.error('当前分库不能为空');
return;
@ -600,10 +577,7 @@ export default {
this.$message.warning("请选择单据类型!");
return;
}
if (this.$isBlank(this.formData.locStorageCode)) {
this.$message.error('当前仓库不能为空');
return;
}
if (this.formData.invWarehouseCode == null || this.formData.invWarehouseCode == '') {
this.$message.error('当前分库不能为空');
return;

@ -116,39 +116,19 @@
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1">
<el-select
v-model="formData.corpName"
filterable
remote
clearable="true" :disabled="codeArray.length>0"
reserve-keyword
placeholder="请输入仓库信息"
:remote-method="findStorageMethod"
:loading="loading"
@change="storageChange"
>
<el-option
v-for="item in fromStorageOptions"
:key="item.value"
:label="item.code"
:value="item">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{
item.code
}}</span>
</el-option>
</el-select>
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" clearable="true"
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" filterable clearable="true"
:disabled="codeArray.length>0"
>
<el-option
v-for="item in fromSubStorageOptions"
:key="item.code"
filterable
:label="item.name" :disabled="codeArray.length>0"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.code }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
@ -164,28 +144,6 @@
</el-row>
<el-row :gutter="20" style="margin-top: 5px">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
:disabled="codeArray.length>0"
clearable>
<el-option
v-for="item in storageList"
: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="3">
<div class="ao-text">
@ -195,7 +153,7 @@
<el-col :span="7">
<el-form-item prop="invWarehouseCode">
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息"
<el-select v-model="formData.invWarehouseCode" filterable placeholder="当前分库信息"
:disabled="codeArray.length>0"
@change="subStorageChange"
clearable>
@ -205,6 +163,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>
@ -665,7 +624,7 @@ export default {
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
this.findSubInvs();
})
.catch(() => {
});
@ -716,7 +675,7 @@ export default {
findSubStorageMethod() {
let cQuery = {
pcode: this.formData.corpId,
code: this.formData.invWarehouseCode,
filter: 2,
};
filterSubByInv(cQuery)
@ -734,6 +693,7 @@ export default {
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
@ -813,8 +773,8 @@ export default {
this.$message.error("往来信息和单据类型不能为空!")
return;
}
if (this.$isBlank(this.formData.locStorageCode) || this.$isBlank(this.formData.invWarehouseCode)) {
this.$message.error("当前仓库和当前分库不能为空!");
if (this.$isBlank(this.formData.invWarehouseCode)) {
this.$message.error("当前分库不能为空!");
return;
}
this.code = "";
@ -1288,12 +1248,13 @@ export default {
locInChange() {
this.$forceUpdate();
// this.getBusType();
this.invChange();
// this.invChange();
this.findStorageMethod();
},
subStorageChange() {
this.getBusType();
this.findSubStorageMethod();
},
invChange() {
/*if (this.$isNotBlank(this.formData.invWarehouseCode))
@ -1308,6 +1269,7 @@ export default {
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;

@ -89,28 +89,6 @@
</el-row>
<el-row :gutter="20" style="margin-top: -10px;">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息"
@change="invChange"
disabled>
<el-option
v-for="item in storageList"
: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="3">
<div class="ao-text">
@ -129,6 +107,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>

@ -100,29 +100,6 @@
<el-row :gutter="20" style="margin-top: 5px">
<el-col :span="3">
<div class="ao-text">
<span>当前仓库</span>
</div>
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" clearable
:disabled="codeArray.length>0"
@change="invChange">
<el-option
v-for="item in storageList"
: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="3">
<div class="ao-text">
<span>当前分库</span>
@ -141,6 +118,7 @@
:label="item.name"
:value="item.code">
<span style="float: left">{{ item.name }}</span>
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.warehouseName }}</span>
</el-option>
</el-select>
</el-form-item>

Loading…
Cancel
Save