瀏覽代碼

仓库管理字段对接修改

sunlupeng 7 月之前
父節點
當前提交
860345e439

+ 1 - 1
src/api/goodsManage.js

@@ -27,7 +27,7 @@ export function goodsList(query) {
 
 export function listGoods(query) {
   return request({
-    url: '/product/list',
+    url: '/warehouse-info/info/product',
     method: 'get',
     params: query
   })

+ 4 - 4
src/views/stock/assembly/assemblyAdd.vue

@@ -178,7 +178,7 @@ export default {
     },
     mounted() {
         this.getAssembleProducList();
-        this.getStoreList();
+        this.getWarehouseList();
         this.getAllUserList();
     },
     methods: {
@@ -189,7 +189,7 @@ export default {
             }).catch(() => { });
         },
         /** 获取仓库列表数据 */
-        getStoreList() {
+        getWarehouseList() {
             warehouseList().then(response => {
                 this.warehouseList = response.data.data;
             }).catch(() => { });
@@ -219,7 +219,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 if(val=='inventoryEntryInfos'){
@@ -243,7 +243,7 @@ export default {
         submitForm() {
             this.$refs["dataForm"].validate((valid) => {
                 if (valid) {
-                    if (this.dataForm.inventoryEntryInfos.length == 0 || this.dataForm.inventoryOutInfos.length == 0) {
+                    if (this.dataForm.inventoryOutInfos.length == 0) {
                         this.$message.error('请选择商品/物料!')
                         return
                     } else {

+ 1 - 1
src/views/stock/breakage/breakageAdd.vue

@@ -198,7 +198,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 const inventoryOutInfos = Goods.map(item => {

+ 9 - 6
src/views/stock/disassembly/disassemblyAdd.vue

@@ -9,7 +9,7 @@
             </el-form-item>
             <el-form-item label="仓库" prop="warehouseId">
                 <el-select v-model="dataForm.warehouseId" clearable placeholder="请选择" style="width: 200px;"
-                    :disabled="type === 'detail'">
+                    :disabled="type === 'detail'" @change="handleChangeWarehouse">
                     <el-option :key="item.id" v-for="item in warehouseList" :label="item.warehouseName"
                         :value="item.id">
                     </el-option>
@@ -178,18 +178,21 @@ export default {
     },
     mounted() {
         this.getAssembleProducList();
-        this.getStoreList();
+        this.getWarehouseList();
         this.getAllUserList();
     },
     methods: {
+        handleChangeWarehouse(){
+            this.getAssembleProducList();
+        },
         /** 获取拆卸商品列表数据 */
         getAssembleProducList() {
-            listGoods().then(response => {
+            listGoods({warehouseId: this.dataForm.warehouseId}).then(response => {
                 this.assembleProducList = response.data.data;
             }).catch(() => { });
         },
         /** 获取仓库列表数据 */
-        getStoreList() {
+        getWarehouseList() {
             warehouseList().then(response => {
                 this.warehouseList = response.data.data;
             }).catch(() => { });
@@ -219,7 +222,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'1' }
                 })
                 if (!Goods.length) return
                 if(val=='inventoryEntryInfos'){
@@ -243,7 +246,7 @@ export default {
         submitForm() {
             this.$refs["dataForm"].validate((valid) => {
                 if (valid) {
-                    if (this.dataForm.inventoryEntryInfos.length == 0 || this.dataForm.inventoryOutInfos.length == 0) {
+                    if (this.dataForm.inventoryEntryInfos.length == 0) {
                         this.$message.error('请选择商品/物料!')
                         return
                     } else {

+ 1 - 1
src/views/stock/requisition/requisitionAdd.vue

@@ -223,7 +223,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 const inventoryEntryInfos = Goods.map(item => {

+ 1 - 1
src/views/stock/retrieval/retrievalAdd.vue

@@ -220,7 +220,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 const inventoryOutInfos = Goods.map(item => {

+ 2 - 2
src/views/stock/stockCount/stockCountAdd.vue

@@ -195,7 +195,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 if(val=='inventoryEntryInfos'){
@@ -219,7 +219,7 @@ export default {
         submitForm() {
             this.$refs["dataForm"].validate((valid) => {
                 if (valid) {
-                    if (this.dataForm.inventoryEntryInfos.length == 0 || this.dataForm.inventoryOutInfos.length == 0) {
+                    if (this.dataForm.inventoryEntryInfos.length == 0) {
                         this.$message.error('请选择商品/物料!')
                         return
                     } else {

+ 1 - 1
src/views/stock/swap/swapAdd.vue

@@ -263,7 +263,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'2' }
                 })
                 if (!Goods.length) return
                 if(val=='inventoryEntryInfos'){

+ 1 - 1
src/views/stock/warehousing/warehousingAdd.vue

@@ -212,7 +212,7 @@ export default {
                 const Goods = await this.$EnPickerGoods({
                     // goodsApi: '/warehouse-entry/info/inventory',
                     selectedIds: selectedIds,
-                    goodsApiParams: { warehouseId: this.dataForm.warehouseId }
+                    goodsApiParams: { warehouseId: this.dataForm.warehouseId, type:'1' }
                 })
                 if (!Goods.length) return
                 const inventoryEntryInfos = Goods.map(item => {