diff --git a/src/views/basic/BussinessType.vue b/src/views/basic/BussinessType.vue index 520bd24..e285e9c 100644 --- a/src/views/basic/BussinessType.vue +++ b/src/views/basic/BussinessType.vue @@ -1,139 +1,139 @@ diff --git a/src/views/basic/BussinessTypeModify.vue b/src/views/basic/BussinessTypeModify.vue index 299fbac..0206eb6 100644 --- a/src/views/basic/BussinessTypeModify.vue +++ b/src/views/basic/BussinessTypeModify.vue @@ -93,6 +93,44 @@ + + +
+
+ 往来信息类型:  +
+ + + + + + + +
+
+ +
+
+ 默认仓库:  +
+ + + {{ item.name }} + + +
+
+
+ +
@@ -133,18 +171,18 @@ 启用单据类型
- -
- 标记为内部单据 -
-
- -
- 允许手动输入客户信息 - -
-
+ + + + + + + + + + + + @@ -164,13 +202,13 @@
- 手持终端未校验单据 + 手持终端未校验单据
- 手持终端已校验单据 + 手持终端已校验单据
@@ -271,6 +309,7 @@ import {getOriginBusType} from "../../api/basic/busOriginType"; import { getLocalBusType, } from "../../api/basic/busLocalType"; +import {filterAll} from "@/api/basic/invWarehouse"; export default { name: "inputQuery", @@ -286,11 +325,23 @@ export default { filterQuery: { enabled: true, isBuType: true, + isFilterBind: true, }, thirdSys: [], localTypes: [], originTypes: [], value: "", + options: [{ + value: '0', + label: '供应商信息' + }, { + value: '1', + label: '仓库信息' + }, { + value: '2', + label: '客户信息' + }], + storageList: [], } }, methods: { @@ -318,15 +369,20 @@ export default { this.localTypes = []; }); }, - - getLoca() { - + getStorage() { + this.storageList = []; + filterAll() + .then((response) => { + this.storageList = response.data || []; + }) + .catch(() => { + }); }, }, created() { this.getList(); - this.getLoca(); + this.getStorage(); }, }; diff --git a/src/views/business/stockOrderNewDistribution.vue b/src/views/business/stockOrderNewDistribution.vue index a38f2f9..7bd3805 100644 --- a/src/views/business/stockOrderNewDistribution.vue +++ b/src/views/business/stockOrderNewDistribution.vue @@ -69,8 +69,8 @@
- + {{ item.name }} - - - - - - - - - - - - - - - - - - - - - - - + v-if="curAction.corpType ==1"> - + --> - + - {{ item.name }} + :key="item.localAction" + :label="item.localName" + :value="item.localAction"> + {{ item.localName }}
- +
@@ -196,21 +172,21 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + @@ -273,21 +249,21 @@ > - -
- 数量: -
-
- - - - - - + + + + + + + + + + + + + + + @@ -301,7 +277,7 @@ @@ -318,40 +294,75 @@ placeholder="请输入批次号" style="width: 80%"> - + - + - + - - + + + + + + + + + @@ -447,7 +458,7 @@ import { uploadStockOrderDetail, copyStockOrderDetail, stockOrderDetailQueryProduct, - addStockOrderDetailFromCodeById, getStockOrderDetailInstrumentById, stockOrderDetail2 + getStockOrderDetailInstrumentById, stockOrderDetail2 } from "../../api/inout/stockOrder"; import draggable from "vuedraggable"; import {saveAs} from "file-saver"; @@ -456,7 +467,7 @@ import store from "../../store"; import stockOrderNewSelectProduct from "./stockOrderNewSelectProduct"; import {getBasicUnitMaintains, getBasicUnitMaintains2} from "../../api/basic/basicUnitMaintain"; import {getBussinessType} from "../../api/basic/bussinessType"; -import {getLocalBusType,getLocalJoinBusType} from "../../api/basic/busLocalType"; +import {getLocalBusType, getLocalJoinBusType} from "../../api/basic/busLocalType"; import {filterAll} from "@/api/basic/invWarehouse"; export default { @@ -483,8 +494,6 @@ export default { page: 1, limit: 10, }, - fromOptions: [], - fromStorageOptions: [], formData: {}, formRules: { corpName: [ @@ -496,11 +505,16 @@ export default { billType: [ {required: true, message: "请选择业务类型", trigger: "blur"} ], - type: [ - {required: true, message: "请选择采购类型", trigger: "blur"} + locStorageCode: [ + {required: true, message: "请选择当前仓库", trigger: "blur"} ], + // type: [ + // {required: true, message: "请选择采购类型", trigger: "blur"} + // ], }, codeArray: [], + fromOptions: [], + fromStorageOptions: [], total: 0, loading: false, index: null, @@ -508,7 +522,6 @@ export default { formVisible: false, deleteLoading: false, orderNo: null, - statusMap: { 101: "未处理", 102: "已处理", @@ -523,6 +536,10 @@ export default { 1: "预入库", 2: "普通采购", }, + curAction: { + corpType: 0, + genUnit: false, + }, orderEditor: true, iCount: 0, sOptions: [], @@ -534,10 +551,7 @@ export default { selectedIndex: "", selectProductVisible: false, thisData: {}, - curAction: { - corpType: 0, - genUnit: false, - }, + storageList: [], }; }, components: { @@ -559,17 +573,22 @@ export default { this.$message.warning('未添加产品'); return; } - for (let i = 0; i < this.codeArray.length; i++) { - if (this.$isBlank(this.codeArray[i].batchNo)) { - return this.$message.error('批次号不能为空'); - } - if (this.$isBlank(this.codeArray[i].productDate)) { - return this.$message.error('生产日期不能为空'); - } - if (this.$isBlank(this.codeArray[i].expireDate)) { - return this.$message.error('失效日期不能为空'); + + if (status === '3') { + for (let i = 0; i < this.codeArray.length; i++) { + if (this.$isBlank(this.codeArray[i].batchNo)) { + return this.$message.error('批次号不能为空'); + } + if (this.$isBlank(this.codeArray[i].productDate)) { + return this.$message.error('生产日期不能为空'); + } + if (this.$isBlank(this.codeArray[i].expireDate)) { + return this.$message.error('失效日期不能为空'); + } } } + + if (status === '501') { this.submitFunction(status); } else { @@ -577,7 +596,13 @@ export default { if (status == "1") { this.submitFunction(status); } else { - this.$confirm("是否提交订单?", "提示", { + let tip = "是否确定提交订单?"; + if (status == "2") { + tip = "是否确定提交单据为未配货?"; + } else if (status == "3") { + tip = "是否确定提交单据为已配货?"; + } + this.$confirm(tip, "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", @@ -593,6 +618,45 @@ export default { } }); }, + storageChange(row) { + console.log(row); + this.formData.fromCorpId = row.code; + this.formData.fromCorp = row.name; + }, + getStorage(event) { + // let query = { + // advanceType: this.getActionName(event), + // }; + this.storageList = []; + filterAll() + .then((response) => { + this.storageList = response.data || []; + // this.formData.locStorageCode = this.storageList[0]; + }) + .catch(() => { + }); + }, + + getActionName(action) { + for (let i = 0; i < this.busTypes.length; i++) { + if (this.busTypes[i].action === action) { + return this.busTypes[i].advanceType; + } + } + }, + findStorageMethod(query) { + console.log(query); + this.fromStorageOptions = []; + let cQuery = { + key: query, + }; + filterAll(cQuery) + .then((response) => { + this.fromStorageOptions = response.data || []; + }) + .catch(() => { + }); + }, submitFunction(status) { let tMessage = status === '501' ? '保存' : '提交'; this.loading = true; @@ -668,6 +732,7 @@ export default { if (this.orderEditor) { this.thisData.orderId = this.formData.id } + this.thisData.stockOrderLists = this.codeArray; this.selectProductVisible = true; return; } @@ -747,6 +812,7 @@ export default { if (this.orderEditor) { this.thisData.orderId = this.formData.id } + this.thisData.stockOrderLists = this.codeArray; this.selectProductVisible = true; } } else { @@ -762,24 +828,34 @@ export default { }, - closeDialogC2(rData) {//012693548470801311200226172302271020022632100025 + closeDialogC2(rData) { this.selectProductVisible = false; this.thisData = {}; if (this.$isNotBlank(rData)) { console.log(rData) + // for (let i = 0; i < this.codeArray.length; i++) { + // let obj = this.codeArray[i]; + // if (obj.batchNo == rData[0].batchNo) { + // obj.count = parseInt(obj.count) + parseInt(this.iCount); + // return; + // } + // } + this.codeArray = []; rData.forEach((obj, index) => { - if (this.codeArray.length === 0) { - this.codeArray.push(obj); - } else { - this.codeArray.unshift(obj); - } + // this.codeArray.push(obj); + this.codeArray.unshift(obj); + // if (this.codeArray.length === 0) { + // this.codeArray.push(obj); + // } else { + // this.codeArray.unshift(obj); + // } }); + console.log(this.codeArray); this.$refs.multipleTable.setCurrentRow(this.codeArray[0]); this.currentRow = this.codeArray[0]; this.selectedIndex = 0; this.focusNext('iCount'); - this.closeConfirmFunction(true); } // if (this.orderEditor) { @@ -859,43 +935,6 @@ export default { focusNextToTable(nextRef) { this.$refs[nextRef][0].focus() }, - remoteMethod(query) { - if (query !== '') { - this.sLoading = true; - let tQuery = { - key: query, - page: 1, - limit: 20, - }; - getBasicUnitMaintains2(tQuery) - .then((response) => { - console.log(response) - this.sLoading = false; - this.sOptions = response.data.list; - }) - .catch(() => { - this.sLoading = false; - this.sOptions = []; - }); - } else { - this.sOptions = []; - } - }, - findMethod(query) { - console.log(query); - this.fromOptions = []; - let cQuery = { - key: query, - }; - getBasicUnitMaintains(cQuery) - .then((response) => { - this.loading = false; - this.fromOptions = response.data.page.list || []; - }) - .catch(() => { - this.loading = false; - }); - }, // 刷新表单 resetForm() { if (this.$refs["dataForm"]) { @@ -906,11 +945,6 @@ export default { this.getList(); } }, - unitChange(row) { - console.log(row); - this.formData.corpId = row.erpId; - this.formData.corpName = row.name; - }, addCode() { this.code = this.code.trim(); if (this.$isBlank(this.code)) { @@ -1148,45 +1182,46 @@ export default { getLocalJoinBusType(query) .then((response) => { this.busTypes = response.data.list || []; + // this.getStorage(this.formData.billType); }) .catch(() => { }); }, - findStorageMethod(query) { + selectOne(event) { + + this.formData.corpName = event.name; + this.formData.corpId = event.erpId; + this.formData.unitIdFk = event.erpId; + // console.log("this.inputQuery.companyId" + item); + console.log("this.inputQuery.companyId" + event.erpId); + }, + findMethod(query) { console.log(query); - this.fromStorageOptions = []; + this.fromOptions = []; let cQuery = { key: query, }; - filterAll(cQuery) - .then((response) => { - this.fromStorageOptions = response.data || []; - }) - .catch(() => { - }); - }, - getStorage() { - this.storageList = []; - filterAll() + getBasicUnitMaintains(cQuery) .then((response) => { - this.storageList = response.data || []; - this.fromStorageOptions = response.data || []; + this.loading = false; + this.fromOptions = response.data.page.list || []; }) .catch(() => { + this.loading = false; }); }, getActionItem(action) { for (let i = 0; i < this.busTypes.length; i++) { - if (this.busTypes[i].action === action) { + if (this.busTypes[i].localAction === action) { return this.busTypes[i]; } } }, actionChange(item) { this.curAction = this.getActionItem(item); - console.log(this.curAction.corpType+"---"+this.curAction.genUnit+"-----"+ this.curAction.action) + this.formData.locStorageCode = this.curAction.storageCode; + console.log(this.curAction.corpType + "---" + this.curAction.genUnit + "-----" + this.curAction.action) }, - }, filters: {}, mounted() { @@ -1197,7 +1232,7 @@ export default { }, created() { this.getBusType(); - this.getStorage(this.formData.billType); + this.getStorage(); this.formData = {}; this.codeArray = []; this.closeConfirmFunction(false); @@ -1211,7 +1246,7 @@ export default { } else { this.formData = { billdate: "", - corpName: store.getters.companyName, + // corpName: store.getters.companyName, customerId: store.getters.customerId, // billType: "deliveryNote", billType: "", diff --git a/src/views/business/stockOrderNewSelectProduct.vue b/src/views/business/stockOrderNewSelectProduct.vue index a8a4d5b..f98954d 100644 --- a/src/views/business/stockOrderNewSelectProduct.vue +++ b/src/views/business/stockOrderNewSelectProduct.vue @@ -269,7 +269,8 @@ this.loading = true; let tQuery = { - ids: ids + ids: ids, + stockOrderLists: this.data.stockOrderLists, }; getStockOrderDetailInstrumentById(tQuery).then((response) => { this.loading = false; @@ -317,7 +318,9 @@ }, }, created() { + if (this.$isNotBlank(this.data)) { + console.log(this.data.stockOrderLists); this.listQuery.nameCode = this.data.udi; this.orderEditor = this.data.orderEditor; this.orderId = this.data.orderId; diff --git a/src/views/inout/IOAddOrder.vue b/src/views/inout/IOAddOrder.vue index 3b5b02d..0a0bde7 100644 --- a/src/views/inout/IOAddOrder.vue +++ b/src/views/inout/IOAddOrder.vue @@ -58,7 +58,7 @@ + v-if="curAction.corpType ==0"> + v-if="curAction.corpType ==1"> + :value="item"> {{ item.name }} {{ item.code }} - +