From d388e2f1463211e58a5ffc3f0fe972684f5cc148 Mon Sep 17 00:00:00 2001 From: xh-pan1 Date: Sat, 15 Apr 2023 04:47:13 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=A9=E6=B5=81=E6=96=B9?= =?UTF-8?q?=E6=A1=88=E4=B8=BA=E6=A0=B9=E6=8D=AE=E4=BB=93=E5=BA=93=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/system/logistics/Edit.vue | 26 ++++++++++++++++++++++++++ src/views/system/logistics/index.vue | 1 + 2 files changed, 27 insertions(+) diff --git a/src/views/system/logistics/Edit.vue b/src/views/system/logistics/Edit.vue index faed673..fd600fe 100644 --- a/src/views/system/logistics/Edit.vue +++ b/src/views/system/logistics/Edit.vue @@ -19,6 +19,20 @@ onblur="value=value.replace(/(^\s*)|(\s*$)/g, '')" /> + + + + + 按件数 @@ -145,6 +159,7 @@ // import Setting from "@/api/Setting"; import { logisticsGetById, logisticsAdd, logisticsUpdate } from '@/api/shopSys' import areaJSON from '@/assets/area' +import { storehouseGetAll } from '@/api/shopSys' export default { props: { @@ -168,6 +183,7 @@ export default { }, params: { logisticsName: '', + storehouseId: 0, chargeType: 1, charges: [ { @@ -179,6 +195,7 @@ export default { } ] }, + storehouseList: [], selectArea: [], areaVisible: false, areaList: [], @@ -228,8 +245,15 @@ export default { } }, created() { + this.getStorehouseList(); }, methods: { + // 获取商品分组 + async getStorehouseList() { + const res = await storehouseGetAll({ page: 1, pageSize: 100 + }) + this.storehouseList = res.data.list + }, // 初始化地区 initArea() { const { province_list, city_list } = areaJSON @@ -431,6 +455,8 @@ export default { async onSubmit() { if (this.params.logisticsName === '') { this.$message.error('请输入方案名称') + } else if (this.params.storehouseId === null ||this.params.storehouseId === '' || this.params.storehouseId === 0) { + this.$message.error('请选择仓库') } else if (this.type === 'add') { this.add() } else if (this.type === 'edit') { diff --git a/src/views/system/logistics/index.vue b/src/views/system/logistics/index.vue index c9f268d..18cd218 100644 --- a/src/views/system/logistics/index.vue +++ b/src/views/system/logistics/index.vue @@ -30,6 +30,7 @@ +