Pārlūkot izejas kodu

Merge branch 'master' of http://47.101.159.18:3000/Muchinfo/MTP2.0_WEB

huangbin 4 gadi atpakaļ
vecāks
revīzija
7558cf97a0

+ 1 - 0
src/services/proto/warehouse/index.ts

@@ -58,5 +58,6 @@ export const ermcpInOutStockApplyReq = (param: ERMCPAreaInOutStockApplyReq): Pro
     param.UserID = getUserId()
     param.ApplySrc = 2
     param.ApplyId = Number(getLongTypeLoginID())
+    debugger
     return protoMiddleware<ERMCPAreaInOutStockApplyReq>(param, 'ERMCPAreaInOutStockApplyReq', 'ERMCPAreaInOutStockApplyRsp', 2)
 }

+ 1 - 1
src/services/proto/warehouse/interface.ts

@@ -71,7 +71,7 @@ export interface ERMCPAreaInOutStockApplyReq {
     SpotGoodsModelID?: number; // uint64 现货型号ID
     SpotGoodsBrandID: number; // uint64 现货品牌ID
     DeliveryGoodsID: number; // uint64 现货品种ID
-    SpotContractID: number; // uint64 关联现货合同ID [1:采购入库 2:销售出库 ](1,2状态必填)
+    SpotContractID?: number; // uint64 关联现货合同ID [1:采购入库 2:销售出库 ](1,2状态必填)
     WarehouseInfo: number; // uint64 现货仓库ID
     Qty: number; // double 数量
     ApplySrc?: number; // int32 申请来源 - 1:管理端 2:终端

+ 18 - 5
src/views/search/inventory/components/add/index.vue

@@ -96,7 +96,7 @@
               <a-select-option v-for="option in wareHouseList"
                                :key="option.autoid"
                                :value="option.autoid">
-                {{option.warehousename}}
+                {{option.warehousecode}}
               </a-select-option>
             </a-select>
           </a-form-item>
@@ -124,6 +124,8 @@ import { handleDeliveryGoods, handleFormState, handleWarehouseList, handleWareho
 import { validateAction } from '@/common/setup/form';
 import { FormState } from './interface';
 import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import {ermcpInOutStockApplyReq} from "@/services/proto/warehouse";
+import {ERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
 
 export default defineComponent({
     name: 'add-spot-contract',
@@ -143,10 +145,21 @@ export default defineComponent({
         const loading = ref<boolean>(false);
         function submit() {
             validateAction<FormState>(formRef, formState).then((param) => {
-                // requestResultLoadingAndInfo(QueryAddUserInfoApply, reqParam, loading, OperateType === 1 ? ['保存草稿成功', '保存草稿失败:'] : ['新增客户资料成功', '新增客户资料失败:']).then(() => {
-                //     closeAction();
-                //     context.emit('refresh');
-                // });
+                let reqParam: ERMCPAreaInOutStockApplyReq = {
+                    InOutType: param.InOutType, // int32 出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
+                    WRStandardID: param.WRStandardID as number, // uint64 现货商品ID
+                    // SpotGoodsModelID: param.S; // uint64 现货型号ID
+                    SpotGoodsBrandID: param.SpotGoodsBrandID as number, // uint64 现货品牌ID
+                    DeliveryGoodsID: param.DeliveryGoodsID as number, // uint64 现货品种ID
+                    // SpotContractID: param.SpotContractID, // uint64 关联现货合同ID [1:采购入库 2:销售出库 ](1,2状态必填)
+                    WarehouseInfo: param.WarehouseInfo as number, // uint64 现货仓库ID
+                    Qty: Number(param.Qty), // double 数量
+                    ApplyRemark: "", // string 申请备注
+                }
+                requestResultLoadingAndInfo(ermcpInOutStockApplyReq, reqParam, loading, ['出入库登记成功', '出入库登记失败:'] ).then(() => {
+                    closeAction();
+                    context.emit('refresh');
+                });
             })
         }
         function closeAction() {

+ 4 - 4
src/views/search/inventory/components/add/setup.ts

@@ -13,7 +13,7 @@ export function handleFormState() {
     const formRef = ref();
     function initFormData(): FormState {
         return {
-            InOutType: 3, // int32 出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
+            InOutType: 7, // int32 出入库类型 - 1:采购入库 2:销售出库 3:生产入库 4:生产出库
             WRStandardID: undefined, // uint64 现货商品ID
             SpotGoodsBrandID: undefined, // uint64 现货品牌ID
             DeliveryGoodsID: undefined, // uint64 现货品种ID
@@ -35,8 +35,8 @@ export function handleFormState() {
 // 仓库类别
 export function handleWarehouseType(formState: UnwrapRef<FormState>) {
     const warehouseType = [
-        { name: '生产入库', key: 3 },
-        { name: '生产出库', key: 4 },
+        { name: '生产入库', key: 7 },
+        { name: '生产出库', key: 8 },
     ]
     /**
      * 
@@ -44,7 +44,7 @@ export function handleWarehouseType(formState: UnwrapRef<FormState>) {
      * @return true: 入库; false:出库
      */
     function isIn(): boolean {
-        return formState.InOutType === 3
+        return formState.InOutType === 7
     }
     function inOrOut() {
         return isIn() ? '入库' : '出库'