修改bug已经去除采购管理的仓库

featFunction
郑明梁 3 years ago
parent d4b8d52622
commit a0e2060caa

@ -1,6 +1,6 @@
{
"BASE_URL": "http://192.168.0.109:9906",
"SERVER_IP": "http://192.168.0.109:9906",
"BASE_URL": "http://192.168.0.41:9996",
"SERVER_IP": "http://192.168.0.41:9996",
"hosp_name": "福建省XX市医院"
}

@ -216,7 +216,8 @@ export default {
findSubInvByInv() {
this.subInvList = [];
let query = {
pcode: this.inputQuery.curInv
pcode: this.inputQuery.curInv,
filter:3
};
filterSubByInv(query)
.then((response) => {

@ -394,22 +394,7 @@ export default {
this.company = response.data;
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
if (response.code == 20000) {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.userInfo.locInvCode = this.storageList[0].code;
}
this.findSubInvByInv();
}
})
.catch(() => {
});
},
locCHange() {
@ -421,8 +406,10 @@ export default {
findSubInvByInv() {
this.subInvList = [];
filterSubByInv()
let query = {
filter:3
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
@ -455,7 +442,7 @@ export default {
this.$store.commit(types.RECEIVE_LOCSUBINVNAME, this.locSubInvName);
}
this.getStorage();
}
})
.catch(() => {
@ -546,6 +533,7 @@ export default {
},
},
created() {
this.getBreadcrumb();
this.getCompanyData();
// this.getStorage();

@ -62,18 +62,7 @@
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息" @change="locInChange"
style="width: 50%"
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%"
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" @change="setWarehouseName" style="width: 100%"
clearable>
<el-option
v-for="item in subInvList"
@ -81,6 +70,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>
@ -291,9 +281,7 @@ export default {
if(this.formData.billDate=="" || this.formData.billDate==null){
return this.$message.error("单据日期不能为空!");
}
if(this.formData.locStorageCode=="" || this.formData.locStorageCode==null){
return this.$message.error("仓库不能为空!");
}
if(this.formData.invWarehouseCode=="" || this.formData.invWarehouseCode==null){
return this.$message.error("分库不能为空!");
}
@ -385,6 +373,9 @@ export default {
this.getList();
}
},
setWarehouseName(obj){
this.formData.locStorageCode= this.subInvList.find(item => item.code == obj).parentId;
},
deleteCodeArray(index, row) {
this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
confirmButtonText: "确定",
@ -441,26 +432,10 @@ export default {
this.total = 0;
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.formData.locStorageCode = this.storageList[0].code;
}
this.findSubInvs();
})
.catch(() => {
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -472,13 +447,7 @@ export default {
.catch(() => {
});
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.findSubInvs();
},
},
filters: {},
mounted() {
@ -508,7 +477,7 @@ export default {
};
this.orderEditor = false;
}
this.getStorage();
this.findSubInvs();
this.codeArray = [];
},
};

@ -62,18 +62,8 @@
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="采购仓库信息" @change="locInChange"
style="width: 50%" :disabled="true"
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%"
<el-select v-model="formData.invWarehouseCode" placeholder="采购分库信息" style="width: 100%"
:disabled="true" clearable>
<el-option
v-for="item in subInvList"

@ -83,18 +83,8 @@
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="采购仓库信息" @change="locInChange"
style="width: 50%"
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%"
<el-select v-model="formData.invWarehouseCode" auto-complete="" @change="setLocStorageCode" filterable placeholder="采购分库信息" style="width: 100%"
clearable>
<el-option
v-for="item in subInvList"
@ -102,6 +92,8 @@
: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>
@ -319,9 +311,7 @@ export default {
if(this.formData.billType=="" || this.formData.billType==null){
return this.$message.error("采购类型不能为空!");
}
if(this.formData.locStorageCode=="" || this.formData.locStorageCode==null){
return this.$message.error("采购仓库不能为空!");
}
if(this.formData.invWarehouseCode=="" || this.formData.invWarehouseCode==null){
return this.$message.error("采购分库不能为空!");
}
@ -374,6 +364,10 @@ export default {
this.thisData.stockOrderLists = this.codeArray;
this.selectProductVisible = true;
},
setLocStorageCode(obj){
debugger
 this.formData.locStorageCode= this.subInvList.find(item => item.code == obj).parentId;
},
closeDialogC2(rData) {
this.selectProductVisible = false;
this.thisData = {};
@ -465,26 +459,10 @@ export default {
this.total = 0;
});
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
if (this.storageList != null && this.storageList.length == 1) {
this.formData.locStorageCode = this.storageList[0].code;
}
this.findSubInvs();
})
.catch(() => {
});
},
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -496,13 +474,6 @@ export default {
.catch(() => {
});
},
locInChange(item) {
if (this.formData.invWarehouseCode != null) {
this.formData.invWarehouseCode = "";
}
this.formData.locStorageCode = item;
this.findSubInvs();
},
getBusType() {
let query = {
enable: false,
@ -544,7 +515,7 @@ export default {
};
this.orderEditor = false;
}
this.getStorage();
this.findSubInvs();
this.getBusType();
this.codeArray = [];
},

@ -61,20 +61,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="locStorageCode">
<el-select v-model="formData.locStorageCode" placeholder="当前仓库信息"
:disabled="true"
style="width: 50%"
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%"
<el-select v-model="formData.invWarehouseCode" placeholder="当前分库信息" style="width: 100%"
:disabled="true"
clearable>
<el-option
@ -83,9 +70,10 @@
: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>
@ -97,18 +85,7 @@
<el-col :span="7">
<el-form-item prop="targetInv">
<el-select v-model="formData.targetInv" placeholder="当前仓库信息" @change="locInChange"
style="width: 50%"
clearable>
<el-option
v-for="item in targetInvList"
: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.targetSubInv" placeholder="当前分库信息" style="width: 50%"
<el-select v-model="formData.targetSubInv" placeholder="当前分库信息" @change="setTargetInv" style="width: 100%"
clearable>
<el-option
v-for="item in targetSubInvList"
@ -116,6 +93,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>
@ -438,6 +416,9 @@ export default {
});
},
setTargetInv(obj){
 this.formData.targetInv= this.targetSubInvList.find(item => item.code == obj).parentId;
},
getStockOrderDetailList() {
this.loading = true;
listApplyDetail(this.query) //
@ -455,15 +436,7 @@ export default {
},
getStorage() {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
findSubInvs() {
this.subInvList = [];
let query = {
@ -472,7 +445,7 @@ export default {
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
if (this.subInvList != null && this.subInvList.length == 1) {getStorage
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
@ -498,7 +471,7 @@ export default {
findTargetSubInvs() {
this.targetSubInvList = [];
let query = {
pcode: this.formData.targetInv
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -512,13 +485,7 @@ export default {
},
locInChange(item) {
if (this.formData.targetSubInv != null) {
this.formData.targetSubInv = "";
}
this.formData.targetInv = item;
this.findTargetSubInvs();
},
getBusType() {
let query = {
@ -561,8 +528,8 @@ export default {
};
this.orderEditor = false;
}
this.getStorage();
this.findSubInvs();
this.findTargetSubInvs();
this.getTargetStorage();
this.codeArray = [];
this.getBusType();

@ -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,54 +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>
@ -290,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="库存产品录入"
@ -304,14 +284,13 @@
:closeDialog="closeDialogC2"
:data="thisData"
:invQueryData="invQueryData"
:type="1"
></dialogInvProduct>
</el-dialog>
</div>
</template>
</template>
<script>
import {
<script>
import {
stockOrderDetail,
submitStockOrder,
stockOrderGenerateBillNo,
@ -322,23 +301,23 @@ import {
uploadStockOrderDetail,
stockOrderDetailQueryProduct,
getStockOrderDetailInstrumentById, stockOrderDetail2, generateBillNoInt
} from "../../api/warehouse/stockOrder";
import draggable from "vuedraggable";
import {saveAs} from "file-saver";
import {parseTime} from "../../filtres";
import store from "../../store";
import stockOrderNewSelectProduct from "../warehouse/stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
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 {getThrOrderDetails, delThrOrders, delOrderDetail} from "@/api/thrsys/thrOrder";
import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default {
} from "../../api/warehouse/stockOrder";
import draggable from "vuedraggable";
import {saveAs} from "file-saver";
import {parseTime} from "../../filtres";
import store from "../../store";
import stockOrderNewSelectProduct from "../warehouse/stockOrderNewSelectProduct";
import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain";
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 {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";
export default {
name: "idQuery",
props: {
closeDialog: {
@ -353,10 +332,6 @@ export default {
type: Function,
required: true,
},
editType: {
type: Object,
required: true,
},
},
data() {
return {
@ -388,9 +363,7 @@ export default {
billType: [
{required: true, message: "请选择业务类型", trigger: "blur"}
],
locStorageCode: [
{required: true, message: "请选择当前仓库", trigger: "blur"}
],
invWarehouseCode: [
{required: true, message: "请选择当前分库", trigger: "blur"}
],
@ -402,7 +375,6 @@ export default {
subInvList: [],
fromOptions: [],
fromStorageOptions: [],
fromSubStorageOptions: [],
total: 0,
loading: false,
index: null,
@ -424,6 +396,10 @@ export default {
1: "预入库",
2: "普通采购",
},
curAction: {
corpType: 0,
genUnit: false,
},
orderEditor: true,
iCount: 0,
sOptions: [],
@ -433,11 +409,12 @@ export default {
busTypes: [],
currentRow: {},
selectedIndex: "",
selectProductVisible: false,
selectInvProductVisible: false,
thisData: {},
storageList: [],
invQueryData: {},
type: 1,
};
},
components: {
@ -470,7 +447,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');
@ -513,11 +490,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) => {
@ -528,23 +502,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) {
@ -552,9 +509,7 @@ export default {
}
}
},
//
findStorageMethod() {
findStorageMethod(query) {
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@ -574,22 +529,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;
@ -597,7 +536,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;
@ -611,23 +553,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) {
@ -653,20 +578,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 = {};
@ -915,12 +845,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(() => {
});
@ -931,6 +862,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) {
@ -938,15 +905,39 @@ 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,
filter:3
};
filterSubByInv(query)
.then((response) => {
this.subInvList = response.data || [];
if (this.subInvList != null && this.subInvList.length == 1) {
this.formData.invWarehouseCode = this.subInvList[0].code;
}
})
.catch(() => {
});
}
},
@ -986,27 +977,26 @@ export default {
this.getBusType();
this.getStorage();
this.findSubInvs();
this.findStorageMethod();
this.findSubInvByInv();
this.findSubStorageMethod();
// this.findSubInvByInv();
this.codeArray = [];
this.closeConfirmFunction(false);
},
};
</script>
<style>
};
</script>
<style>
.ao-text {
.ao-text {
width: 100%;
font-size: 13px;
font-family: "Microsoft YaHei";
float: right;
text-align: right;
margin-top: 10px;
}
}
</style>
</style>

@ -104,7 +104,8 @@ export default {
findSubInvByInv() {
this.subInvList = [];
let query = {
pcode: this.userInfo.locInvCode
pcode: this.userInfo.locInvCode,
filter:3
};
filterSubByInv(query)
.then((response) => {

@ -320,7 +320,8 @@ export default {
findSubInvByInv(invCode) {
this.subInvList = [];
let query = {
pcode: invCode
pcode: invCode,
filter:3
};
filterSubByInv(query)
.then((response) => {

@ -1000,6 +1000,7 @@ export default {
},
findSubStorageMethod(val) {
this. getBusType() ;
let cQuery = {
code: this.formData.invWarehouseCode,
filter: 2,
@ -1018,11 +1019,11 @@ export default {
},
findSubInvByInv(invCode) {
findSubInvByInv() {
this.subInvList = [];
let query = {
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -1222,7 +1223,7 @@ export default {
this.findStorageMethod();
}
}
this.findSubInvByInv(this.formData.locStorageCode);
this.findSubInvByInv();
this.findSubStorageMethod();
this.getBusType();

@ -764,7 +764,7 @@ export default {
this.formData.vailInv = this.curAction.vailInv;
this.formData.codeFillCheck = this.curAction.codeFillCheck;
}
this.getStorage(this.formData.billType);
})
.catch(() => {
});
@ -773,7 +773,7 @@ export default {
findSubInvByInv(invCode) {
this.subInvList = [];
let query = {
pcode: invCode
filter:3
};
filterSubByInv(query)
.then((response) => {

@ -116,9 +116,7 @@
</el-form-item>
<el-form-item class="query-form-item" prop="fromCorp"
v-if="curAction.corpType ==1">
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" filterable clearable="true"
<el-select v-model="formData.fromSubInvCode" placeholder="请选择分库" @change="setCorpName" filterable clearable="true"
:disabled="codeArray.length>0"
>
<el-option
@ -619,16 +617,7 @@ export default {
this.findSubStorageMethod();
},
getStorage(event) {
this.storageList = [];
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
})
.catch(() => {
});
},
getActionName(action) {
for (let i = 0; i < this.busTypes.length; i++) {
@ -687,9 +676,11 @@ export default {
},
findSubInvByInv(invCode) {
this.subInvList = [];
let query = {
pcode: invCode
pcode: invCode,
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -769,8 +760,16 @@ export default {
}
if (this.$isBlank(event)) {
if (this.$isBlank(this.formData.corpName) || this.$isBlank(this.formData.billType)) {
this.$message.error("往来信息和单据类型不能为空!")
if ( this.$isBlank(this.formData.billType)) {
this.$message.error("单据类型不能为空!")
return;
}
if(this.curAction.corpType==1 && this.$isBlank(this.formData.fromSubInvCode)){
this.$message.error("往来单位不能不能为空!")
return;
}
if(this.curAction.corpType!=1 && this.$isBlank(this.formData.corpName)){
this.$message.error("往来单位不能不能为空!")
return;
}
if (this.$isBlank(this.formData.invWarehouseCode)) {
@ -1079,6 +1078,10 @@ export default {
});
},
setCorpName(code){
this.formData.corpId=code
this.formData.corpName= this.fromSubStorageOptions.find(item => item.code == code).name
},
copyDetail(row) {
this.$confirm("是否复制该记录?", "提示", {
confirmButtonText: "确定",
@ -1265,7 +1268,7 @@ export default {
findSubInvs() {
this.subInvList = [];
let query = {
pcode: this.formData.locStorageCode
filter:3
};
filterSubByInv(query)
.then((response) => {
@ -1318,7 +1321,6 @@ export default {
}
this.findMethod();
this.getBusType();
this.getStorage();
this.findSubInvByInv();
this.findSubStorageMethod();
this.codeArray = [];

@ -62,7 +62,7 @@
</el-col>
<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.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>
@ -546,7 +546,7 @@ export default {
}
if (this.$isBlank(event)) {
if (this.$isBlank(this.formData.corpName) || this.$isBlank(this.formData.billType)) {
if (this.$isBlank(this.formData.corpName) && this.$isBlank(this.formData.fromSubInvName ==null) || this.$isBlank(this.formData.billType)) {
this.$message.error("往来信息和单据类型不能为空!")
return;
}

@ -72,7 +72,7 @@
</el-col>
<el-col :span="7">
<el-form-item prop="billType">
<el-select v-model="formData.billType" placeholder="请选择业务类型" @change="getStorage"
<el-select v-model="formData.billType" placeholder="请选择业务类型"
:disabled="codeArray.length>0"
clearable>
<el-option
@ -905,15 +905,18 @@ export default {
},
getBusType() {
if(this.$isBlank(this.query.orderIdFk)){
this.formData.billType=null;
}
let query = {
enabled: true,
invWarehouseCode: this.formData.invWarehouseCode
};
getLocalJoinByUser(query)
.then((response) => {
this.busTypes = response.data.list || [];
this.getStorage(this.formData.billType);
})
.catch(() => {
});
@ -1002,6 +1005,7 @@ export default {
}
if(this.formData.invWarehouseCode!=null){
this.getBusType();
}

Loading…
Cancel
Save