@@ -170,15 +163,12 @@
- 允许无库存出库
+ 允许无库存出库
+
-
-
-
-
@@ -360,6 +350,7 @@ import dialogInvProduct from "../inventory/DialogInvProduct"
import {getOriginJoinBusType} from "@/api/basic/busOriginType";
import {inserThrOrderWeb} from "@/api/thrsys/thrOrderReceive";
import {getThrOrderDetails} from "@/api/thrsys/thrOrder";
+import {filterSubByInv} from "@/api/basic/invSubWarehouse";
export default {
name: "idQuery",
@@ -385,7 +376,18 @@ export default {
page: 1,
limit: 10,
},
- formData: {noInvOut: false, locStorageCode: null},
+ formData: {
+ noInvOut: false,
+ locStorageCode: null,
+ invWarehouseCode: null,
+ fromSubInvCode: null,
+ billNo: null,
+ billdate: "",
+ billType: "",
+ type: null,
+ corpName: "",
+ corpId: "",
+ },
formRules: {
corpName: [
{required: true, message: "请输入供应商", trigger: "blur"}
@@ -404,6 +406,7 @@ export default {
// ],
},
codeArray: [],
+ subInvList: [],
fromOptions: [],
fromStorageOptions: [],
total: 0,
@@ -533,6 +536,7 @@ export default {
filterAllByUser()
.then((response) => {
this.storageList = response.data || [];
+ this.findSubInvs();
})
.catch(() => {
});
@@ -546,7 +550,6 @@ export default {
}
},
findStorageMethod(query) {
- console.log(query);
if (this.formData.locStorageCode == null)
return;
this.fromStorageOptions = [];
@@ -624,22 +627,6 @@ export default {
};
this.selectInvProductVisible = true;
- // this.thisData.formData.billType = this.curAction.localAction;
- // if (this.curAction.mainAction == 'WareHouseOut' && this.formData.noInvOut != true) {
- //
- // } else if (this.curAction.mainAction == "WareHouseIn" && this.curAction.corpType == 1 && this.formData.noInvOut != true) {
- //
- // this.invQueryData = {
- // locStorageCode: this.formData.corpId,
- //
- // };
- // console.log("his.invQueryData " + this.invQueryData.locStorageCode);
- // this.selectInvProductVisible = true;
- // } else {
- // this.selectProductVisible = true;
- // }
-
-
return;
}
@@ -893,23 +880,7 @@ export default {
intentBack() {
this.$router.go(-1);
},
- generateBillNo() {
- let tQuery = {
- action: this.formData.billType
- }
- // this.loading = true;
- generateBillNoInt(tQuery)
- .then((response) => {
- this.loading = false;
- if (response.code === 20000) {
- this.formData.billNo = response.data;
- this.formData.billdate = new Date();
- } else {
- this.closeDialog(true);
- }
- });
- },
- getBusType(invCode) {
+ getBusType() {
let query = {
enabled: true,
corpType: 1,
@@ -974,19 +945,36 @@ export default {
actionChange(item) {
console.log(item);
this.curAction = this.getActionItem(item);
- // this.formData.locStorageCode = this.curAction.storageCode;
- console.log(this.curAction.corpType + "---" + "-----" + this.curAction.action);
+ this.locInChange();
this.findMethod();
- // }
},
locInChange(item) {
- console.log(item);
+ if (this.formData.invWarehouseCode != null) {
+ this.formData.invWarehouseCode = "";
+ }
this.formData.locStorageCode = item;
this.$forceUpdate();
this.getBusType(item);
this.findStorageMethod();
+ },
+ 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(() => {
+ });
}
+
+
},
filters: {},
mounted() {
@@ -996,11 +984,7 @@ export default {
};
},
created() {
- this.getBusType("NOCODE");
- this.getStorage();
- this.formData = {};
- this.codeArray = [];
- this.closeConfirmFunction(false);
+
if (this.$isNotBlank(this.idQuery.id)) {
this.query.limit = 100;
this.query.orderIdFk = this.idQuery.id;
@@ -1010,15 +994,28 @@ export default {
this.getStockOrderDetailList();
} else {
this.formData = {
+ billNo: null,
billdate: "",
customerId: store.getters.customerId,
billType: "",
type: "2",
+ corpName: "",
+ corpId: "",
+ noInvOut: "",
+ locStorageCode: "",
+ invWarehouseCode: "",
};
this.iCount = 0;
this.orderEditor = false;
- this.generateBillNo();
+ // this.generateBillNo();
}
+
+ this.getBusType();
+ this.getStorage();
+ this.findSubInvByInv();
+ this.findSubStorageMethod();
+ this.codeArray = [];
+ this.closeConfirmFunction(false);
},
};