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