Forráskód Böngészése

commit 管理代码提交

xkwg 4 éve
szülő
commit
e6eb9051b0

+ 37 - 0
public/proto/mtp.proto

@@ -1062,5 +1062,42 @@ message ContractOperateApplyInfo {
 	optional bytes AttachUrl = 4; // bytes 附件
 }
 
+// 机构出入库申请审核通过请求 0 18 10
+message AreaInOutApplyAuditPassReq {
+     optional MessageHead Header = 1; // MessageHead
+     optional uint64 InOutApplyID = 2; // uint64 操作申请ID(607+Unix秒时间戳(10位)+xxxxxx)
+     optional uint64 AuditID = 3; // uint64 操作用户ID
+     optional uint32 AuditSrc = 4; // uint32 操作来源-1:管理端2:终端
+     optional string Remark = 5; // string 备注
+     optional string ClientTicket = 6; // string 客户端流水号
+}
+// 机构出入库申请审核通过响应 0 18 11
+message AreaInOutApplyAuditPassRsp {
+     optional MessageHead Header = 1; // MessageHead 消息头
+     optional int32 RetCode = 2; // int32 返回码
+     optional string RetDesc = 3; // string 描述信息
+     optional uint64 InOutApplyID = 4; // uint64 操作申请ID(607+Unix秒时间戳(10位)+xxxxxx)
+     optional uint64 AuditID = 5; // uint64 操作用户ID
+     optional uint32 AuditSrc = 6; // uint32 操作来源-1:管理端2:终端
+     optional string ClientTicket = 7; // string 客户端流水号
+}
+
+// 机构出入库申请审核拒绝撤回请求 0 29 139
+message AuditERMCPAreaInOutStockApplyReq {
+     optional MessageHead Header = 1; // MessageHead
+     optional uint64 InOutApplyID = 2; // uint64 申请ID
+     optional uint64 AuditID = 3; // uint64 审核人
+     optional string AuditRemark = 4; // string 审核备注
+     optional string AuditTradeDate = 5; // string 审核交易日(yyyyMMdd)
+     optional int32 ApplyStatus = 6; // int32 审核状态:3-审核拒绝 5-已撤回
+}
+// 机构出入库申请审核拒绝撤回响应 0 29 140
+message AuditERMCPAreaInOutStockApplyRsp {
+     optional MessageHead Header = 1; // MessageHead 消息头
+     optional int32 RetCode = 2; // int32 返回码
+     optional string RetDesc = 3; // string 描述信息
+     optional uint64 InOutApplyID = 4; // uint64 申请ID
+}
+
 
 

+ 2 - 1
src/common/methods/table/interface.ts

@@ -38,7 +38,8 @@ export interface TableKey {
     table_pcweb_sales_all: string; // 销售_全部
     table_pcweb_sales_pointprice: string; // 销售_待点价
     table_pcweb_sales_settle: string; // 销售_履约交收
-    table_pcweb_stock_aduit: string; // 库存审核
+    table_pcweb_stock_aduit: string; // 库存审核-入库
+    table_pcweb_stock_aduit_out: string; //  库存审核-出库
     table_pcweb_stock_manage_applylog: string; // 库存管理-当前库存
     table_pcweb_stock_manage_current: string; // 库存管理-当前库存
     table_pcweb_userinfo: string; // 客户资料

+ 7 - 0
src/services/funcode/index.ts

@@ -98,4 +98,11 @@ export const funCode: Code = {
     // 信息 - 客户资料 - 审核
     UserInfoCheckMangeReq: 1900666,    /// 客户信息审核通过请求
     UserInfoCheckMangeRsp: 1900667,   /// 客户信息审核通过请求响应
+
+    // 库存审核 - 拒绝审核
+    AuditERMCPAreaInOutStockApplyReq: 1900683,   /// 机构出入库申请审核拒绝请求
+    AuditERMCPAreaInOutStockApplyRsp: 1900684,   /// 机构出入库申请审核拒绝响应
+    // 库存审核 - 审核通过
+    AreaInOutApplyAuditPassReq: 1179658,  /// 机构出入库申请审核通过请求(1179658)
+    AreaInOutApplyAuditPassRsp: 1179659,  /// 机构出入库申请审核通过响应(1179659)
 };

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

@@ -1,7 +1,13 @@
 import {buildProtoReq50, parseProtoRsp50} from "@/services/socket/protobuf/buildReq";
 import APP from "@/services";
 import {Callback} from "@/utils/websocket";
-import {WarehouseApplyReq, WarehouseStateChangeReq} from "@/services/proto/warehouse/interface";
+import {
+    AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq,
+    WarehouseApplyReq,
+    WarehouseStateChangeReq
+} from "@/services/proto/warehouse/interface";
+import {getSelectedAccountId} from "@/services/bus/account";
+import {getUUID} from "@/utils/qt/common";
 
 /**
  * 新增 / 修改 仓库信息请求  修改需要传仓库id
@@ -69,3 +75,69 @@ export const warehouseStateChangeReq = (param: WarehouseStateChangeReq): Promise
     });
 }
 
+/**
+ * 出入库审核 审核通过
+ * @param param
+ */
+export const inOutStockApplyReq = (param: AreaInOutApplyAuditPassReq): Promise<any> => {
+
+    param.ClientTicket = getUUID()
+    param.AuditSrc = 2
+
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'AreaInOutApplyAuditPassReq',
+            funCodeName: 'AreaInOutApplyAuditPassReq',
+            reqParams: param,
+            msgHeadParams: {
+                AccountID: getSelectedAccountId(),
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'AreaInOutApplyAuditPassRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}
+
+/**
+ * 出入库审核 审核拒绝 & 撤回
+ * @param param
+ */
+export const refuseStockApplyReq = (param: AuditERMCPAreaInOutStockApplyReq): Promise<any> => {
+
+    return new Promise((resolve, reject) => {
+        const params = {
+            protobufName: 'AuditERMCPAreaInOutStockApplyReq',
+            funCodeName: 'AuditERMCPAreaInOutStockApplyReq',
+            reqParams: param,
+            msgHeadParams: {
+                AccountID: getSelectedAccountId(),
+                MarketID: 18,
+                GoodsID: 0,
+            }
+        };
+        const package50 = buildProtoReq50(params);
+        APP.sendTradingServer(package50, undefined, {
+            onSuccess: (res) => {
+                const { isSuccess, result } = parseProtoRsp50(res, 'AuditERMCPAreaInOutStockApplyRsp');
+                if (isSuccess) {
+                    resolve(result);
+                } else {
+                    reject(result);
+                }
+            },
+            onFail: (err) => reject(err.message),
+        } as Callback);
+    });
+}

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

@@ -24,4 +24,38 @@ export interface WarehouseStateChangeReq {
 
 export interface Ermcp3AreaStockApply {
 
-}
+}
+
+
+// 机构出入库申请审核通过请求 0 18 10
+export interface AreaInOutApplyAuditPassReq {
+    InOutApplyID: number; // uint64 操作申请ID(607+Unix秒时间戳(10位)+xxxxxx)
+    AuditID: number; // uint64 操作用户ID
+    AuditSrc?: number; // uint32 操作来源-1:管理端2:终端
+    Remark: string; // string 备注
+    ClientTicket?: string; // string 客户端流水号
+}
+// 机构出入库申请审核通过响应 0 18 11
+export interface  AreaInOutApplyAuditPassRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    InOutApplyID: number; // uint64 操作申请ID(607+Unix秒时间戳(10位)+xxxxxx)
+    AuditID: number; // uint64 操作用户ID
+    AuditSrc: number; // uint32 操作来源-1:管理端2:终端
+    ClientTicket: string; // string 客户端流水号
+}
+
+// 机构出入库申请审核拒绝撤回请求 0 29 139
+export interface  AuditERMCPAreaInOutStockApplyReq {
+    InOutApplyID: number; // uint64 申请ID
+    AuditID: number; // uint64 审核人
+    AuditRemark: string; // string 审核备注
+    AuditTradeDate: string; // string 审核交易日(yyyyMMdd)
+    ApplyStatus: number; // int32 审核状态:3-审核拒绝 5-已撤回
+}
+// 机构出入库申请审核拒绝撤回响应 0 29 140
+export interface  AuditERMCPAreaInOutStockApplyRsp {
+    RetCode: number; // int32 返回码
+    RetDesc: string; // string 描述信息
+    InOutApplyID: number; // uint64 申请ID
+}

+ 217 - 9
src/views/manage/inventory-review/components/checkinAudit/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 款项审核-->
-  <a-modal class="inventory_review_checkin_audit custom-detail"
+  <a-modal class="add-custom custom-detail"
            title="款项审核"
            v-model:visible="visible"
            centered
@@ -8,12 +8,142 @@
            @cancel="cancel"
            width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading.loading"
-                @click="submit">关闭</a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="cancel">关闭
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="pass">审核通过
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="refuse">审核拒绝
+        </a-button>
     </template>
-
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <fieldset class="formFieldSet" v-if="isShowContractInfo(selectedRow.inouttype)">
+              <legend>合同基本信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="合同编号">
+                            <span class="white">{{
+                                    getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno)
+                                }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="定价类型">
+                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="销售方">
+                          <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="现货品种">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="采购方">
+                          <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同签署量">
+                          <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>登记信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="出库类型">
+                          <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="品类">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="品牌">
+                          <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="入库仓库">
+                          <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="入库数量">
+                            <span class="white">{{
+                                    formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid)
+                                }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="登记时间">
+                          <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="登记人">
+                          <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="状态">
+                          <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>审核信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核时间">
+                          <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="审核人">
+                          <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核意见">
+                          <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+      </a-form>
   </a-modal>
 </template>
 
@@ -24,17 +154,30 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/views/information/custom/setup';
 import { formatValue, formatTime } from '@/common/methods';
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
+import {Modal} from "ant-design-vue";
+import {AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
+import Long from "long";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import {LongType} from "@/services/socket/login/interface";
+import {passStockControl, refuseStockControl} from "@/views/manage/inventory-review/components/setup";
+import moment from "moment";
 
 export default defineComponent({
     name: 'inventory_review_checkin_audit',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3AreaStockApply>,
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('inventory_review_checkin_audit');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
@@ -43,7 +186,62 @@ export default defineComponent({
             setTimeout(() => {
                 loading.value = false;
                 cancel();
-            }, 2000);
+            }, 200);
+        }
+
+        // 审核通过
+        function pass() {
+            Modal.confirm({
+                title: '是否确认审核通过',
+                okText: '确认审核通过',
+                cancelText: '取消',
+                onOk() {
+                    const param: AreaInOutApplyAuditPassReq = {
+                        InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid),
+                        AuditID:  Long.fromString( (getLongTypeLoginID() as LongType).toString()),
+                        Remark: '',
+                    }
+                    passStockControl(param, loading)
+                        .then(res => {
+                            context.emit('refresh');
+                            cancel()
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        // 审核拒绝
+        function refuse(){
+            Modal.confirm({
+                title: '是否确认审核拒绝',
+                okText: '确认审核拒绝',
+                cancelText: '取消',
+                onOk() {
+                    const param: AuditERMCPAreaInOutStockApplyReq = {
+                        InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
+                        AuditID: Long.fromString( (getLongTypeLoginID() as LongType).toString()), // uint64 审核人
+                        AuditRemark: '', // string 审核备注
+                        AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
+                        ApplyStatus: 3, // int32 审核状态:3-审核拒绝 5-已撤回
+                    }
+                    refuseStockControl(param,  loading)
+                        .then(res => {
+                            context.emit('refresh');
+                            cancel()
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
         }
         return {
             visible,
@@ -53,6 +251,16 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
+
+            isShowContractInfo,
+            getContractTypeName,
+            getPriceTypeName,
+            InOutTypeName,
+            getGoodsUnit,
+            getApplyStatusName,
+
+            refuse,
+            pass,
         };
     },
 });

+ 183 - 8
src/views/manage/inventory-review/components/checkinCancel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 撤销款项登记-->
-  <a-modal class="inventory_review_checkin_cancel custom-detail"
+  <a-modal class="add-custom custom-detail"
            title="撤销款项登记"
            v-model:visible="visible"
            centered
@@ -8,12 +8,138 @@
            @cancel="cancel"
            width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading.loading"
-                @click="submit">关闭</a-button>
-    </template>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="submit">关闭
+        </a-button>
 
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="back">撤销
+        </a-button>
+    </template>
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <fieldset class="formFieldSet" v-if="isShowContractInfo(selectedRow.inouttype)">
+              <legend>合同基本信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="合同编号">
+                            <span class="white">{{
+                                    getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno)
+                                }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="定价类型">
+                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="销售方">
+                          <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="现货品种">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="采购方">
+                          <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同签署量">
+                          <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>登记信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="出库类型">
+                          <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="品类">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="品牌">
+                          <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="入库仓库">
+                          <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="入库数量">
+                            <span class="white">{{
+                                    formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid)
+                                }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="登记时间">
+                          <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="登记人">
+                          <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="状态">
+                          <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>审核信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核时间">
+                          <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="审核人">
+                          <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核意见">
+                          <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+      </a-form>
   </a-modal>
 </template>
 
@@ -24,17 +150,30 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/views/information/custom/setup';
 import { formatValue, formatTime } from '@/common/methods';
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
+import {Modal} from "ant-design-vue";
+import {AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
+import Long from "long";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import {LongType} from "@/services/socket/login/interface";
+import moment from "moment";
+import {refuseStockControl} from "@/views/manage/inventory-review/components/setup";
 
 export default defineComponent({
     name: 'inventory_review_checkin_cancel',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3AreaStockApply>,
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('inventory_review_checkin_cancel');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
@@ -45,6 +184,33 @@ export default defineComponent({
                 cancel();
             }, 2000);
         }
+        function back() {
+            Modal.confirm({
+                title: '是否确认撤销',
+                okText: '确认撤销',
+                cancelText: '取消',
+                onOk() {
+                    const param: AuditERMCPAreaInOutStockApplyReq = {
+                        InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
+                        AuditID: Long.fromString((getLongTypeLoginID() as LongType).toString()), // uint64 审核人
+                        AuditRemark: '', // string 审核备注
+                        AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
+                        ApplyStatus: 5, // int32 审核状态:3-审核拒绝 5-已撤回
+                    }
+                    refuseStockControl(param, loading)
+                        .then(res => {
+                            context.emit('refresh');
+                            cancel()
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
         return {
             visible,
             cancel,
@@ -53,6 +219,15 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
+
+            isShowContractInfo,
+            getContractTypeName,
+            getPriceTypeName,
+            InOutTypeName,
+            getGoodsUnit,
+            getApplyStatusName,
+
+            back,
         };
     },
 });

+ 159 - 23
src/views/manage/inventory-review/components/checkinDetail/index.vue

@@ -1,42 +1,169 @@
 <template>
-  <!-- 款项详情-->
-  <a-modal class="finance_review_funds_detail custom-detail"
-           title="款项详情"
-           v-model:visible="visible"
-           centered
-           :maskClosable="maskClosableFlag"
-           @cancel="cancel"
-           width="890px">
-    <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading.loading"
-                @click="submit">关闭</a-button>
-    </template>
-
-  </a-modal>
+    <!-- 款项详情-->
+    <a-modal class="add-custom custom-detail"
+             title="款项详情"
+             v-model:visible="visible"
+             centered
+             :maskClosable="maskClosableFlag"
+             @cancel="cancel"
+             width="890px">
+        <template #footer>
+            <a-button key="submit"
+                      type="primary"
+                      :loading="loading.loading"
+                      @click="submit">关闭
+            </a-button>
+        </template>
+        <a-form class="inlineForm"
+                :form="form"
+                @submit="handleSearch">
+            <fieldset class="formFieldSet" v-if="isShowContractInfo(selectedRow.inouttype)">
+                <legend>合同基本信息</legend>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="合同编号">
+                            <span class="white">{{
+                                    getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno)
+                                }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="定价类型">
+                            <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="销售方">
+                            <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="现货品种">
+                            <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="采购方">
+                            <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="合同签署量">
+                            <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </fieldset>
+            <fieldset class="formFieldSet">
+                <legend>登记信息</legend>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="出库类型">
+                            <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="品类">
+                            <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="品牌">
+                            <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="入库仓库">
+                            <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="入库数量">
+                            <span class="white">{{
+                                    formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid)
+                                }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="登记时间">
+                            <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="登记人">
+                            <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="状态">
+                            <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </fieldset>
+            <fieldset class="formFieldSet">
+                <legend>审核信息</legend>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="审核时间">
+                            <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+                        </a-form-item>
+                    </a-col>
+                    <a-col :span="12">
+                        <a-form-item label="审核人">
+                            <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="12">
+                        <a-form-item label="审核意见">
+                            <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </fieldset>
+        </a-form>
+    </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { getStatusName } from '@/views/information/custom/setup';
-import { formatValue, formatTime } from '@/common/methods';
+import {defineComponent, PropType, reactive, ref, watchEffect} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
+import {getStatusName} from '@/views/information/custom/setup';
+import {formatValue, formatTime} from '@/common/methods';
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
 
 export default defineComponent({
     name: 'finance_review_funds_detail',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3AreaStockApply>,
             default: {},
         },
     },
     setup(props) {
-        const { visible, cancel } = closeModal('detail');
+        const {visible, cancel} = closeModal('detail');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
+
         function submit() {
             loading.value = true;
             setTimeout(() => {
@@ -44,6 +171,7 @@ export default defineComponent({
                 cancel();
             }, 2000);
         }
+
         return {
             visible,
             cancel,
@@ -52,6 +180,14 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
+
+            isShowContractInfo,
+            getContractTypeName,
+            getPriceTypeName,
+            InOutTypeName,
+            getGoodsUnit,
+            getApplyStatusName,
+
         };
     },
 });

+ 214 - 11
src/views/manage/inventory-review/components/checkoutAudit/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 发票审核-->
-  <a-modal class="inventory_review_checkout_audit custom-detail"
+  <a-modal class="add-custom custom-detail"
            title="发票审核"
            v-model:visible="visible"
            centered
@@ -8,33 +8,170 @@
            @cancel="cancel"
            width="890px">
     <template #footer>
-      <a-button key="submit"
-                type="primary"
-                :loading="loading.loading"
-                @click="submit">关闭</a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="cancel">关闭
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="pass">审核通过
+        </a-button>
+        <a-button key="submit"
+                  type="primary"
+                  :loading="loading"
+                  @click="refuse">审核拒绝
+        </a-button>
     </template>
-
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <fieldset class="formFieldSet" v-if = "isShowContractInfo(selectedRow.inouttype)" >
+              <legend>合同基本信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="合同编号">
+                          <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="定价类型">
+                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="销售方">
+                          <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="现货品种">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="采购方">
+                          <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同签署量">
+                          <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>登记信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="出库类型">
+                          <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="品类">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="品牌">
+                          <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="入库仓库">
+                          <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="入库数量">
+                          <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="登记时间">
+                          <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="登记人">
+                          <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="状态">
+                          <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>审核信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核时间">
+                          <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="审核人">
+                          <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核意见">
+                          <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+      </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
 import { closeModal } from '@/common/setup/modal/index';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/views/information/custom/setup';
 import { formatValue, formatTime } from '@/common/methods';
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {Modal} from "ant-design-vue";
+import Long from "long";
+import {passStockControl, refuseStockControl} from "@/views/manage/inventory-review/components/setup";
+import {AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import moment from "moment";
+import {LongType} from "@/services/socket/login/interface";
 
 export default defineComponent({
     name: 'inventory_review_checkout_audit',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3AreaStockApply>,
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('inventory_review_checkout_audit');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
@@ -43,8 +180,64 @@ export default defineComponent({
             setTimeout(() => {
                 loading.value = false;
                 cancel();
-            }, 2000);
+            }, 200);
         }
+
+        // 审核通过
+        function pass() {
+            Modal.confirm({
+                title: '是否确认审核通过',
+                okText: '确认审核通过',
+                cancelText: '取消',
+                onOk() {
+                    const param: AreaInOutApplyAuditPassReq = {
+                        InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid),
+                        AuditID:  Long.fromString( (getLongTypeLoginID() as LongType).toString()),
+                        Remark: '',
+                    }
+                    passStockControl(param, loading)
+                        .then(res => {
+                            context.emit('refresh');
+                            cancel()
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+        // 审核拒绝
+        function refuse(){
+            Modal.confirm({
+                title: '是否确认审核拒绝',
+                okText: '确认审核拒绝',
+                cancelText: '取消',
+                onOk() {
+                    const param: AuditERMCPAreaInOutStockApplyReq = {
+                        InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
+                        AuditID: Long.fromString( (getLongTypeLoginID() as LongType).toString()), // uint64 审核人
+                        AuditRemark: '', // string 审核备注
+                        AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
+                        ApplyStatus: 3, // int32 审核状态:3-审核拒绝 5-已撤回
+                    }
+                    refuseStockControl(param,  loading)
+                        .then(res => {
+                            context.emit('refresh');
+                            cancel()
+                        })
+                        .catch(err => {
+
+                        })
+                },
+                onCancel() {
+                    console.log('Cancel');
+                },
+            });
+        }
+
         return {
             visible,
             cancel,
@@ -53,6 +246,16 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
+
+            isShowContractInfo,
+            getContractTypeName,
+            getPriceTypeName,
+            InOutTypeName,
+            getGoodsUnit,
+            getApplyStatusName,
+
+            pass,
+            refuse,
         };
     },
 });

+ 218 - 41
src/views/manage/inventory-review/components/checkoutCancel/index.vue

@@ -1,6 +1,6 @@
 <template>
   <!-- 撤销发票登记-->
-  <a-modal class="inventory_review_checkout_cancel custom-detail"
+  <a-modal class="add-custom custom-detail"
            title="撤销发票登记"
            v-model:visible="visible"
            centered
@@ -10,58 +10,235 @@
     <template #footer>
       <a-button key="submit"
                 type="primary"
-                :loading="loading.loading"
-                @click="submit">关闭</a-button>
-    </template>
+                :loading="loading"
+                @click="submit">关闭
+      </a-button>
 
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="back">撤销
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            :form="form"
+            @submit="handleSearch">
+      <fieldset class="formFieldSet" v-if="isShowContractInfo(selectedRow.inouttype)">
+        <legend>合同基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{
+                  getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno)
+                }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="定价类型">
+              <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="销售方">
+              <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="现货品种">
+              <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="采购方">
+              <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合同签署量">
+              <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>登记信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="出库类型">
+              <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="品类">
+              <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="品牌">
+              <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="入库仓库">
+              <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="入库数量">
+              <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="登记时间">
+              <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="登记人">
+              <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="状态">
+              <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>审核信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="审核时间">
+              <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="审核人">
+              <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="审核意见">
+              <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+    </a-form>
   </a-modal>
 </template>
 
 <script lang="ts">
-import { defineComponent, PropType, reactive, ref, watchEffect } from 'vue';
-import { closeModal } from '@/common/setup/modal/index';
-import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
-import { mergeObj } from '@/utils/objHandle';
-import { getStatusName } from '@/views/information/custom/setup';
-import { formatValue, formatTime } from '@/common/methods';
+import {defineComponent, PropType, reactive, ref, watchEffect} from 'vue';
+import {closeModal} from '@/common/setup/modal/index';
+import {QueryCustomInfoType} from '@/services/go/ermcp/customInfo/interface';
+import {mergeObj} from '@/utils/objHandle';
+import {getStatusName} from '@/views/information/custom/setup';
+import {formatValue, formatTime} from '@/common/methods';
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {Modal} from "ant-design-vue";
+import {ContractOperateApplyReq} from "@/services/proto/contract/interface";
+import Long from "long";
+import {financeControl} from "@/views/manage/finance-review/components/setup";
+import {AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
+import {getLongTypeLoginID} from "@/services/bus/login";
+import {LongType} from "@/services/socket/login/interface";
+import moment from "moment";
+import {refuseStockControl} from "@/views/manage/inventory-review/components/setup";
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getContractTypeName} from "@/views/information/spot-contract/setup";
+import {getPriceTypeName} from "@/views/business/purchase/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
 
 export default defineComponent({
-    name: 'inventory_review_checkout_cancel',
-    components: {},
-    props: {
-        selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
-            default: {},
-        },
-    },
-    setup(props) {
-        const { visible, cancel } = closeModal('inventory_review_checkout_cancel');
-        const loading = ref<boolean>(false);
-        const maskClosableFlag = ref<boolean>(false);
-        function submit() {
-            loading.value = true;
-            setTimeout(() => {
-                loading.value = false;
-                cancel();
-            }, 2000);
-        }
-        return {
-            visible,
-            cancel,
-            submit,
-            loading,
-            formatValue,
-            getStatusName,
-            maskClosableFlag,
-        };
+  name: 'inventory_review_checkout_cancel',
+  components: {},
+  props: {
+    selectedRow: {
+      type: Object as PropType<Ermcp3AreaStockApply>,
+      default: {},
     },
+  },
+  setup(props, context) {
+    const {visible, cancel} = closeModal('inventory_review_checkout_cancel');
+    const loading = ref<boolean>(false);
+    const maskClosableFlag = ref<boolean>(false);
+
+    function submit() {
+      loading.value = true;
+      setTimeout(() => {
+        loading.value = false;
+        cancel();
+      }, 2000);
+    }
+    function back(){
+      Modal.confirm({
+        title: '是否确认撤销',
+        okText: '确认撤销',
+        cancelText: '取消',
+        onOk() {
+          const param: AuditERMCPAreaInOutStockApplyReq = {
+            InOutApplyID: Long.fromString(props.selectedRow.inoutapplyid), // uint64 申请ID
+            AuditID: Long.fromString( (getLongTypeLoginID() as LongType).toString()), // uint64 审核人
+            AuditRemark: '', // string 审核备注
+            AuditTradeDate: moment().format('YYYYMMDD'), // string 审核交易日(yyyyMMdd)
+            ApplyStatus: 5, // int32 审核状态:3-审核拒绝 5-已撤回
+          }
+          refuseStockControl(param, loading)
+              .then(res => {
+                context.emit('refresh');
+                cancel()
+              })
+              .catch(err => {
+
+              })
+        },
+        onCancel() {
+          console.log('Cancel');
+        },
+      });
+    }
+
+    return {
+      visible,
+      cancel,
+      submit,
+      loading,
+      formatValue,
+      getStatusName,
+      maskClosableFlag,
+
+      isShowContractInfo,
+      getContractTypeName,
+      getPriceTypeName,
+      InOutTypeName,
+      getGoodsUnit,
+      getApplyStatusName,
+
+      back,
+    };
+  },
 });
 </script>
 
 <style lang="less">
 .inventory_review_checkout_cancel {
-    .ant-form.inlineForm {
-        margin-top: 20px;
-    }
+  .ant-form.inlineForm {
+    margin-top: 20px;
+  }
 }
 </style>;

+ 134 - 7
src/views/manage/inventory-review/components/checkoutDetail/index.vue

@@ -1,7 +1,7 @@
 <template>
   <!-- 发票登记详情-->
-  <a-modal class="finance_review_invoice_detail custom-detail"
-           title="发票登记详情"
+  <a-modal class="add-custom custom-detail"
+           title="出库登记详情"
            v-model:visible="visible"
            centered
            :maskClosable="maskClosableFlag"
@@ -10,10 +10,125 @@
     <template #footer>
       <a-button key="submit"
                 type="primary"
-                :loading="loading.loading"
+                :loading="loading"
                 @click="submit">关闭</a-button>
     </template>
-
+      <a-form class="inlineForm"
+              :form="form"
+              @submit="handleSearch">
+          <fieldset class="formFieldSet" v-if = "isShowContractInfo(selectedRow.inouttype)" >
+              <legend>合同基本信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="合同编号">
+                          <span class="white">{{ getContractTypeName(selectedRow.contracttype) + '/' + formatValue(selectedRow.contractno) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="定价类型">
+                          <span class="white">{{ getPriceTypeName(selectedRow.pricetype) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="销售方">
+                          <span class="white">{{ formatValue(selectedRow.sellusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="现货品种">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="采购方">
+                          <span class="white">{{ formatValue(selectedRow.buyusername) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="合同签署量">
+                          <span class="white">{{ formatValue(selectedRow.contractqty) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>登记信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="出库类型">
+                          <span class="white">{{ InOutTypeName(selectedRow.inouttype) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="品类">
+                          <span class="white">{{ formatValue(selectedRow.deliverygoodsname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="品牌">
+                          <span class="white">{{ formatValue(selectedRow.brandname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="入库仓库">
+                          <span class="white">{{ formatValue(selectedRow.warehousename) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="入库数量">
+                          <span class="white">{{ formatValue(selectedRow.qty) + getGoodsUnit(selectedRow.unitid) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="登记时间">
+                          <span class="white">{{ formatValue(selectedRow.applytime) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="登记人">
+                          <span class="white">{{ formatValue(selectedRow.applyname) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="状态">
+                          <span class="white">{{ getApplyStatusName(selectedRow.applystatus) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+          <fieldset class="formFieldSet">
+              <legend>审核信息</legend>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核时间">
+                          <span class="white">{{ formatValue(selectedRow.audittime) }}</span>
+                      </a-form-item>
+                  </a-col>
+                  <a-col :span="12">
+                      <a-form-item label="审核人">
+                          <span class="white">{{ formatValue(selectedRow.auditname) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+              <a-row :gutter="24">
+                  <a-col :span="12">
+                      <a-form-item label="审核意见">
+                          <span class="white">{{ formatValue(selectedRow.auditremark) }}</span>
+                      </a-form-item>
+                  </a-col>
+              </a-row>
+          </fieldset>
+      </a-form>
   </a-modal>
 </template>
 
@@ -24,17 +139,22 @@ import { QueryCustomInfoType } from '@/services/go/ermcp/customInfo/interface';
 import { mergeObj } from '@/utils/objHandle';
 import { getStatusName } from '@/views/information/custom/setup';
 import { formatValue, formatTime } from '@/common/methods';
+import {Ermcp3AreaStockApply} from "@/services/go/ermcp/inventory-review/interface";
+import {InOutTypeName, isShowContractInfo} from "@/views/manage/inventory-review/setup";
+import {getApplyStatusName} from "@/views/manage/business-review/setup";
+import {getGoodsUnit} from "@/views/information/goods/setup";
+import {getContractTypeName, getPriceTypeName} from "@/views/information/spot-contract/setup";
 
 export default defineComponent({
     name: 'finance_review_invoice_detail',
     components: {},
     props: {
         selectedRow: {
-            type: Object as PropType<QueryCustomInfoType>,
+            type: Object as PropType<Ermcp3AreaStockApply>,
             default: {},
         },
     },
-    setup(props) {
+    setup(props, context) {
         const { visible, cancel } = closeModal('detail');
         const loading = ref<boolean>(false);
         const maskClosableFlag = ref<boolean>(false);
@@ -42,8 +162,9 @@ export default defineComponent({
             loading.value = true;
             setTimeout(() => {
                 loading.value = false;
+                context.emit('refresh');
                 cancel();
-            }, 2000);
+            }, 200);
         }
         return {
             visible,
@@ -53,6 +174,12 @@ export default defineComponent({
             formatValue,
             getStatusName,
             maskClosableFlag,
+            InOutTypeName,
+            getApplyStatusName,
+            getGoodsUnit,
+            isShowContractInfo,
+            getContractTypeName,
+            getPriceTypeName,
         };
     },
 });

+ 30 - 0
src/views/manage/inventory-review/components/setup.ts

@@ -0,0 +1,30 @@
+import {Ref} from "vue";
+import {commonResultInfo, getRequestResultInfo} from "@/common/methods/request";
+import {AreaInOutApplyAuditPassReq, AuditERMCPAreaInOutStockApplyReq} from "@/services/proto/warehouse/interface";
+import {inventorySign} from "@/views/manage/inventory-review/setup";
+import {inOutStockApplyReq, refuseStockApplyReq} from "@/services/proto/warehouse";
+
+/**
+ * 管理 - 库存审核 - 通过
+ */
+export function passStockControl(req: AreaInOutApplyAuditPassReq, loading: Ref<boolean>): Promise<string> {
+    loading.value = true;
+    const sign = getRequestResultInfo(inventorySign, 2)  // 接口请求后的返回提示 这里统一进行管理
+    // 接口调用
+    const result = inOutStockApplyReq(req)
+    // 接口调用结果处理,提示成功或者失败信息,并关闭loading效果
+    return commonResultInfo(result, sign, loading)
+}
+
+/**
+ * 管理 - 库存审核 - 拒绝 && 撤回
+ * @param req.ApplyStatus  审核状态:3-审核拒绝 5-已撤回
+ */
+export function refuseStockControl(req: AuditERMCPAreaInOutStockApplyReq, loading: Ref<boolean>): Promise<string> {
+    loading.value = true;
+    const sign = getRequestResultInfo(inventorySign, req.ApplyStatus)  // 接口请求后的返回提示 这里统一进行管理
+    // 接口调用
+    const result = refuseStockApplyReq(req)
+    // 接口调用结果处理,提示成功或者失败信息,并关闭loading效果
+    return commonResultInfo(result, sign, loading)
+}

+ 7 - 3
src/views/manage/inventory-review/list/checkin/index.vue

@@ -40,11 +40,14 @@
             </a-table>
         </contextMenu>
         <!-- 审核-->
-        <CheckinAudit/>
+        <CheckinAudit :selectedRow="selectedRow"
+                      @refresh="queryTable"/>
         <!-- 撤销 -->
-        <CheckinCancel/>
+        <CheckinCancel :selectedRow="selectedRow"
+                       @refresh="queryTable"/>
         <!-- 详情 -->
-        <CheckinDetail/>
+        <CheckinDetail :selectedRow="selectedRow"
+                       @refresh="queryTable"/>
     </div>
 </template>
 
@@ -118,6 +121,7 @@ export default defineComponent({
             operateApplyTypeName,
             getPriceTypeName,
             InOutTypeName,
+            queryTable,
         };
     },
 });

+ 8 - 4
src/views/manage/inventory-review/list/checkout/index.vue

@@ -37,11 +37,14 @@
             </a-table>
         </contextMenu>
         <!-- 详情 -->
-        <CheckoutDetail/>
+        <CheckoutDetail :selectedRow="selectedRow"
+                        @refresh="queryTable"/>
         <!-- 审核 -->
-        <CheckoutAudit/>
+        <CheckoutAudit :selectedRow="selectedRow"
+                       @refresh="queryTable"/>
         <!-- 撤销 -->
-        <CheckoutCancel/>
+        <CheckoutCancel :selectedRow="selectedRow"
+                        @refresh="queryTable"/>
     </div>
 </template>
 
@@ -87,7 +90,7 @@ export default defineComponent({
             // 获取列表数据
             queryTable();
             // 注册表头信息 过滤
-            registerColumn('table_pcweb_stock_aduit', getFilterTableCB);
+            registerColumn('table_pcweb_stock_aduit_out', getFilterTableCB);
         });
 
         // 查询
@@ -113,6 +116,7 @@ export default defineComponent({
             operateApplyTypeName,
             getPriceTypeName,
             InOutTypeName,
+            queryTable,
         };
     },
 });

+ 18 - 1
src/views/manage/inventory-review/setup.ts

@@ -1,3 +1,5 @@
+import {ResultInfo} from "@/common/methods/request";
+
 /**
  * 仓库出入库
  * 出入库类型 - 5:采购入库 6:销售出库 7:生产入库 8:生产出库
@@ -19,4 +21,19 @@ export function InOutTypeName(type: number): string{
             break;
     }
     return result
-}
+}
+
+/**
+ * 是否显示合同信息
+ * @param type 出入库类型  生产类型没有和同 则不显示  销售和采购则需要显示
+ */
+export function isShowContractInfo(type: number): boolean{
+    return (type === 5 || type === 6)
+}
+
+// 提示
+export const inventorySign = new Map<number, ResultInfo>([
+    [2, ['审核通过成功', '审核失败:']],
+    [3, ['审核拒绝成功', '审核失败:']],
+    [5, ['撤销成功', '撤销失败:']],
+])