Quellcode durchsuchen

Merge remote-tracking branch 'origin/master'

yu.jie vor 4 Jahren
Ursprung
Commit
087d088791

+ 1 - 1
src/services/go/ermcp/warehouse-info/index.ts

@@ -35,7 +35,7 @@ export function QueryAreaStock(userid: number): Promise<Ermcp3AreaStock[]> {
  * @param spotcontractid 合同ID
  * @constructor
  */
-export function QueryAreaStockApply(spotcontractid: number): Promise<Ermcp3AreaStockApplySum[]> {
+export function QueryAreaStockApply(spotcontractid: string): Promise<Ermcp3AreaStockApplySum[]> {
     return commonSearch_go('/Ermcp3/QueryAreaStockApplySum', { spotcontractid }).catch((err) => {
         throw new Error(`查询已登记出入库信息(入库登记/已入库信息): ${err.message}`);
     });

+ 1 - 2
src/views/business/purchase/components/storage/index.vue

@@ -166,8 +166,7 @@ export default defineComponent({
         const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
         watchEffect(() => {
             if (visible.value) {
-                const id = Long.fromString(props.selectedRow.spotcontractid);
-                QueryAreaStockApply(Number(props.selectedRow.spotcontractid))
+                QueryAreaStockApply(props.selectedRow.spotcontractid)
                     .then((res) => {
                         DGList.value = res.filter((e) => e.inouttype === 1);
                     })

+ 176 - 176
src/views/business/sell/components/invoice/index.vue

@@ -1,187 +1,187 @@
 <template>
-    <!-- 发票登记-->
-    <a-modal class="commonModal paddingDialog invoice"
-             :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
-             v-model:visible="visible"
-             centered
-             @cancel="cancel"
-             width="890px">
-        <template #footer>
-            <a-button key="submit"
-                      class="cancelBtn"
-                      @click="cancel">取消
-            </a-button>
-            <a-button key="submit"
-                      type="primary"
-                      :loading="loading"
-                      @click="submit">发票登记
-            </a-button>
-        </template>
-        <fieldset class="formFieldSet">
-            <legend>合同基本信息</legend>
-            <a-form class="inlineForm">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="合同编号">
-                            <span class="white">{{ 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.accountname) }}</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-form>
-        </fieldset>
-        <fieldset class="formFieldSet">
-            <legend>已登记信息</legend>
-            <a-form class="inlineForm">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="贷款总额">
-                            <span
-                                class="white">{{ formatValue(selectedRow.loanamount) + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="保证金">
-                            <span class="white">{{ formatValue(selectedRow.margin) + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="其他费用">
-                            <span class="white">{{ selectedRow.reckonotheramount + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="合计总额">
-                            <span class="white">{{ selectedRow.totalamount + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="已支付额 ">
-                            <span class="white">{{ selectedRow.payamount + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="已收票额">
-                            <span class="white">{{ selectedRow.invoiceamount + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="24">
-                        <a-form-item label="预收票额">
-                            <span class="white">{{ selectedRow.preinvoiceamount + selectedRow.currencyname }}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </fieldset>
-        <fieldset class="formFieldSet">
-            <legend>本次发票信息</legend>
-            <a-form class="inlineForm"
-                    ref="formRef"
-                    :model="formState"
-                    :rules="rules">
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="收票金额"
-                                     class="relative mb40"
-                                     name="InvoiceAmount">
-                            <a-input-number v-model:value="formState.InvoiceAmount" class="dialogInput"
-                                            style="width: 200px"
-                                            suffix="元"
-                                            placeholder="请输入收票金额"/>
-                            <div class="tip">
-                                <div>应收票额:{{ selectedRow.invoiceamount }} {{ selectedRow.currencyname }}</div>
-                                <div><a class="blue fr">全部登记</a></div>
-                            </div>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="发票附件" class="mb40">
-                            <div class="upload">
-                                <a-upload action="">
-                                    <a-button class="uploadBtn">上传</a-button>
-                                </a-upload>
-                                <div class="look">查看附件</div>
-                            </div>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </a-form>
-        </fieldset>
-    </a-modal>
+  <!-- 发票登记-->
+  <a-modal class="commonModal paddingDialog invoice"
+           :title="selectedRow.contracttype===1? '采购合同-发票登记': '销售合同-发票登记'"
+           v-model:visible="visible"
+           centered
+           @cancel="cancel"
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">发票登记
+      </a-button>
+    </template>
+    <fieldset class="formFieldSet">
+      <legend>合同基本信息</legend>
+      <a-form class="inlineForm">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{ 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.accountname) }}</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-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>已登记信息</legend>
+      <a-form class="inlineForm">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="贷款总额">
+              <span class="white">{{ formatValue(selectedRow.loanamount) + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="保证金">
+              <span class="white">{{ formatValue(selectedRow.margin) + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="其他费用">
+              <span class="white">{{ selectedRow.reckonotheramount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="合计总额">
+              <span class="white">{{ selectedRow.totalamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已支付额 ">
+              <span class="white">{{ selectedRow.payamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="已收票额">
+              <span class="white">{{ selectedRow.invoiceamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-item label="预收票额">
+              <span class="white">{{ selectedRow.preinvoiceamount + selectedRow.currencyname }}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+    <fieldset class="formFieldSet">
+      <legend>本次发票信息</legend>
+      <a-form class="inlineForm"
+              ref="formRef"
+              :model="formState"
+              :rules="rules">
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="收票金额"
+                         class="relative mb40"
+                         name="InvoiceAmount">
+              <a-input-number v-model:value="formState.InvoiceAmount"
+                              class="dialogInput"
+                              style="width: 200px"
+                              suffix="元"
+                              placeholder="请输入收票金额" />
+              <div class="tip">
+                <div>应收票额:{{ selectedRow.invoiceamount }} {{ selectedRow.currencyname }}</div>
+                <div><a class="blue fr">全部登记</a></div>
+              </div>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="发票附件"
+                         class="mb40">
+              <div class="upload">
+                <a-upload action="">
+                  <a-button class="uploadBtn">上传</a-button>
+                </a-upload>
+                <div class="look">查看附件</div>
+              </div>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </a-form>
+    </fieldset>
+  </a-modal>
 </template>
 
 <script lang="ts">
-    import {defineComponent, PropType, ref, unref} from 'vue';
-    import {closeModal} from '@/common/setup/modal/index';
-    import {Ermcp3SellBuyContract} from "@/services/go/ermcp/purchase/interface";
-    import {getPriceTypeName} from "@/views/business/purchase/setup";
-    import {formatValue} from "@/common/methods";
-    import {handleForm} from "@/views/business/purchase/components/invoice/setup";
-    import {InvoiceReq} from "@/services/proto/contract/interface";
-    import {invoiceReq} from "@/views/business/purchase/components/setup";
+import { defineComponent, PropType, ref, unref } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { getPriceTypeName } from '@/views/business/purchase/setup';
+import { formatValue } from '@/common/methods';
+import { handleForm } from '@/views/business/purchase/components/invoice/setup';
+import { InvoiceReq } from '@/services/proto/contract/interface';
+import { invoiceReq } from '@/views/business/purchase/components/setup';
 
-    export default defineComponent({
-        name: 'sell_pending_invoice',
-        components: {},
-        props: {
-            selectedRow: {
-                type: Object as PropType<Ermcp3SellBuyContract>,
-                default: {},
-            },
+export default defineComponent({
+    name: 'sell_pending_invoice',
+    components: {},
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3SellBuyContract>,
+            default: {},
         },
-        setup(props, context) {
-            const {visible, cancel} = closeModal('purchase_pending_invoice');
-            const loading = ref<boolean>(false);
-            const {rules, formState, formRef} = handleForm();
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('sell_pending_invoice');
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleForm();
 
-            function submit() {
-                console.log(props.selectedRow)
-                const wrapEl = unref(formRef);
-                wrapEl.validate().then(() => {
-                    loading.value = true;
-                    const params: InvoiceReq = {
-                        InvoiceAmount: formState.InvoiceAmount!,
-                    };
-                    // 发出发票登记
-                    invoiceReq(props.selectedRow.spotcontractid, params, loading)
-                        .then(() => {
-                            cancel();
-                            context.emit('refresh');
-                        })
-                        .catch((err) => {
-                        });
-                });
-            }
+        function submit() {
+            console.log(props.selectedRow);
+            const wrapEl = unref(formRef);
+            wrapEl.validate().then(() => {
+                loading.value = true;
+                const params: InvoiceReq = {
+                    InvoiceAmount: formState.InvoiceAmount!,
+                };
+                // 发出发票登记
+                invoiceReq(props.selectedRow.spotcontractid, params, loading)
+                    .then(() => {
+                        cancel();
+                        context.emit('refresh');
+                    })
+                    .catch((err) => {});
+            });
+        }
 
-            return {
-                visible,
-                cancel,
-                submit,
-                loading,
-                formRef,
-                formState,
-                formatValue,
-                rules,
-                getPriceTypeName,
-            };
-        },
-    });
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+            formRef,
+            formState,
+            formatValue,
+            rules,
+            getPriceTypeName,
+        };
+    },
+});
 </script>
 
 <style lang="less">

+ 204 - 205
src/views/business/sell/components/storage/index.vue

@@ -1,62 +1,62 @@
 <template>
-    <!-- 出库登记-->
-    <a-modal class="commonModal"
-             title="出库登记"
-             v-model:visible="visible"
-             @cancel="cancel"
-             centered
-             width="890px">
-        <template #footer>
-            <a-button key="submit"
-                      class="cancelBtn"
-                      @click="cancel">取消
-            </a-button>
-            <a-button key="submit"
-                      type="primary"
-                      :loading="loading"
-                      @click="submit">入库登记
-            </a-button>
-        </template>
-        <a-form class="inlineForm"
-                ref="formRef"
-                :model="formState"
-                :rules="rules">
-            <fieldset class="formFieldSet">
-                <legend>合同基本信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12">
-                        <a-form-item label="合同编号">
-                            <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
-                            <span class="white">{{ formatValue(selectedRow.accountname) }}</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-col :span="12">
-                        <a-form-item label="合同签署量">
-                            <span class="white">{{formatValue(selectedRow.qty)}}</span>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-            <fieldset class="formFieldSet">
-                <legend>已登记信息</legend>
-                <a-row :gutter="24">
-                    <a-col :span="12"
-                           v-for="(item, i) in DGList"
-                           :key="i">
-                        <a-form-item label="已入库量">
-                            <span class="white">{{item.wrstandardname}} + {{item.brandname}}</span>
-                        </a-form-item>
-                    </a-col>
-                    <!-- <a-col :span="12">
+  <!-- 出库登记-->
+  <a-modal class="commonModal"
+           title="出库登记"
+           v-model:visible="visible"
+           @cancel="cancel"
+           centered
+           width="890px">
+    <template #footer>
+      <a-button key="submit"
+                class="cancelBtn"
+                @click="cancel">取消
+      </a-button>
+      <a-button key="submit"
+                type="primary"
+                :loading="loading"
+                @click="submit">入库登记
+      </a-button>
+    </template>
+    <a-form class="inlineForm"
+            ref="formRef"
+            :model="formState"
+            :rules="rules">
+      <fieldset class="formFieldSet">
+        <legend>合同基本信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="合同编号">
+              <span class="white">{{ formatValue(selectedRow.contractno) }}</span>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item :label="selectedRow.contracttype===1? '采购方': '销售方'">
+              <span class="white">{{ formatValue(selectedRow.accountname) }}</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-col :span="12">
+            <a-form-item label="合同签署量">
+              <span class="white">{{formatValue(selectedRow.qty)}}</span>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>已登记信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12"
+                 v-for="(item, i) in DGList"
+                 :key="i">
+            <a-form-item label="已入库量">
+              <span class="white">{{item.wrstandardname}} + {{item.brandname}}</span>
+            </a-form-item>
+          </a-col>
+          <!-- <a-col :span="12">
                       <a-form-item label="已入库量2">
                         <span class="white">品类2+品牌2(66吨)</span>
                       </a-form-item>
@@ -71,161 +71,160 @@
                         <span class="white">品类4+品牌4(5吨)</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="品类">
-                            <a-select class="inlineFormSelect"
-                                      style="width: 200px"
-                                      placeholder="请选择品类"
-                                      v-model:value="selectedRow.wrstandardid"
-                                      readonly>
-                                <a-select-option v-for="option in gmlist"
-                                                 :key="option.wrstandardid"
-                                                 :value="option.wrstandardid">{{option.wrstandardname}}
-                                </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="品牌"
-                                     name="SpotGoodsBrandID">
-                            <a-select class="inlineFormSelect"
-                                      style="width: 200px"
-                                      placeholder="请选择品牌"
-                                      v-model:value="formState.SpotGoodsBrandID">
-                                <a-select-option v-for="option in gblist"
-                                                 :key="option.brandid"
-                                                 :value="option.brandid">{{option.brandname}}
-                                </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="入库仓库"
-                                     name="WarehouseInfo">
-                            <a-select class="inlineFormSelect"
-                                      style="width: 200px"
-                                      placeholder="请选择入库仓库"
-                                      v-model:value="formState.WarehouseInfo">
-                                <a-select-option v-for="option in wareHouseList"
-                                                 :key="option.autoid"
-                                                 :value="option.autoid">{{option.warehousename}}
-                                </a-select-option>
-                            </a-select>
-                        </a-form-item>
-                    </a-col>
-                    <a-col :span="12">
-                        <a-form-item label="入库数量"
-                                     name="Qty">
-                            <a-input-number class="dialogInput"
-                                            style="width: 200px"
-                                            suffix="单位"
-                                            placeholder="请输入入库数量"
-                                            v-model:value="formState.Qty">
-                            </a-input-number>
-                        </a-form-item>
-                    </a-col>
-                </a-row>
-            </fieldset>
-        </a-form>
-    </a-modal>
+        </a-row>
+      </fieldset>
+      <fieldset class="formFieldSet">
+        <legend>本次入库信息</legend>
+        <a-row :gutter="24">
+          <a-col :span="12">
+            <a-form-item label="品类">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择品类"
+                        v-model:value="selectedRow.wrstandardid"
+                        readonly>
+                <a-select-option v-for="option in gmlist"
+                                 :key="option.wrstandardid"
+                                 :value="option.wrstandardid">{{option.wrstandardname}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="品牌"
+                         name="SpotGoodsBrandID">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择品牌"
+                        v-model:value="formState.SpotGoodsBrandID">
+                <a-select-option v-for="option in gblist"
+                                 :key="option.brandid"
+                                 :value="option.brandid">{{option.brandname}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="入库仓库"
+                         name="WarehouseInfo">
+              <a-select class="inlineFormSelect"
+                        style="width: 200px"
+                        placeholder="请选择入库仓库"
+                        v-model:value="formState.WarehouseInfo">
+                <a-select-option v-for="option in wareHouseList"
+                                 :key="option.autoid"
+                                 :value="option.autoid">{{option.warehousename}}
+                </a-select-option>
+              </a-select>
+            </a-form-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-item label="入库数量"
+                         name="Qty">
+              <a-input-number class="dialogInput"
+                              style="width: 200px"
+                              suffix="单位"
+                              placeholder="请输入入库数量"
+                              v-model:value="formState.Qty">
+              </a-input-number>
+            </a-form-item>
+          </a-col>
+        </a-row>
+      </fieldset>
+    </a-form>
+  </a-modal>
 </template>
 
 <script lang="ts">
-    import { defineComponent, PropType, ref, unref, watchEffect } from 'vue';
-    import { closeModal } from '@/common/setup/modal/index';
-    import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
-    import { ERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
-    import { QueryAreaStockApply, QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
-    import * as Long from 'long';
-    import { formatValue } from '@/common/methods';
-    import { handleForm } from './setup';
-    import APP from '@/services';
-    import { initData } from '@/common/methods';
-    import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
-    import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-    import { message } from 'ant-design-vue';
-    import { Ermcp3AreaStockApplySum } from '@/services/go/ermcp/warehouse-info/interface';
-    import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
+import { defineComponent, PropType, ref, unref, watchEffect } from 'vue';
+import { closeModal } from '@/common/setup/modal/index';
+import { Ermcp3SellBuyContract } from '@/services/go/ermcp/purchase/interface';
+import { ERMCPAreaInOutStockApplyReq } from '@/services/proto/warehouse/interface';
+import { QueryAreaStockApply, QueryWareHouse } from '@/services/go/ermcp/warehouse-info/index';
+import * as Long from 'long';
+import { formatValue } from '@/common/methods';
+import { handleForm } from './setup';
+import APP from '@/services';
+import { initData } from '@/common/methods';
+import { ErmcpWareHouseInfo } from '@/views/information/warehouse-info/list';
+import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
+import { message } from 'ant-design-vue';
+import { Ermcp3AreaStockApplySum } from '@/services/go/ermcp/warehouse-info/interface';
+import { ermcpInOutStockApplyReq } from '@/services/proto/warehouse';
 
-    export default defineComponent({
-        name: 'sell_pending_storage',
-        components: {},
-        props: {
-            selectedRow: {
-                type: Object as PropType<Ermcp3SellBuyContract>,
-                default: {},
-            },
+export default defineComponent({
+    name: 'sell_pending_storage',
+    components: {},
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3SellBuyContract>,
+            default: {},
         },
-        setup(props, context) {
-            const { visible, cancel } = closeModal('purchase_pending_storage');
-            const { rules, formState, formRef } = handleForm();
-            const loading = ref<boolean>(false);
-            const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
-            const gblist = ref<[]>([]);
-            const gmlist = ref<[]>([]);
-            const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
-            watchEffect(() => {
-                if (visible.value) {
-                    const id = Long.fromString(props.selectedRow.spotcontractid);
-                    QueryAreaStockApply(Number(props.selectedRow.spotcontractid))
-                        .then((res) => {
-                            DGList.value = res.filter((e) => e.inouttype === 1);
-                        })
-                        .catch((err) => message.error(err));
-                }
-            });
-            initData(() => {
-                const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.deliverygoodsid === props.selectedRow.deliverygoodsid);
-                gblist.value = deliverygoods && deliverygoods.gblist;
-                gmlist.value = deliverygoods && deliverygoods.gmlist;
-                // 查询仓库信息
-                QueryWareHouse('1').then((res) => {
-                    wareHouseList.value = res;
-                });
+    },
+    setup(props, context) {
+        const { visible, cancel } = closeModal('sell_pending_storage');
+        const { rules, formState, formRef } = handleForm();
+        const loading = ref<boolean>(false);
+        const wareHouseList = ref<ErmcpWareHouseInfo[]>([]);
+        const gblist = ref<[]>([]);
+        const gmlist = ref<[]>([]);
+        const DGList = ref<Ermcp3AreaStockApplySum[]>([]);
+        watchEffect(() => {
+            if (visible.value) {
+                QueryAreaStockApply(props.selectedRow.spotcontractid)
+                    .then((res) => {
+                        DGList.value = res.filter((e) => e.inouttype === 1);
+                    })
+                    .catch((err) => message.error(err));
+            }
+        });
+        initData(() => {
+            const deliverygoods = APP.get('DeliveryGoodsList').find((x: any) => x.deliverygoodsid === props.selectedRow.deliverygoodsid);
+            gblist.value = deliverygoods && deliverygoods.gblist;
+            gmlist.value = deliverygoods && deliverygoods.gmlist;
+            // 查询仓库信息
+            QueryWareHouse('1').then((res) => {
+                wareHouseList.value = res;
             });
+        });
 
-            function submit() {
-                console.log(props.selectedRow);
-                console.log(wareHouseList);
-                const wrapEl = unref(formRef);
-                wrapEl.validate().then(() => {
-                    const params: ERMCPAreaInOutStockApplyReq = {
-                        InOutType: 5, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
-                        WRStandardID: props.selectedRow.wrstandardid, //品类ID
-                        SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
-                        DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
-                        SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
-                        WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
-                        Qty: formState.Qty || 0, // double 数量t
-                        ApplyRemark: '', // string 申请备注
-                    };
-                    requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['入库登记成功', '入库登记失败:']).then(() => {
-                        context.emit('refresh');
-                        cancel();
-                    });
+        function submit() {
+            console.log(props.selectedRow);
+            console.log(wareHouseList);
+            const wrapEl = unref(formRef);
+            wrapEl.validate().then(() => {
+                const params: ERMCPAreaInOutStockApplyReq = {
+                    InOutType: 5, //  5:采购入库 6:销售出库 7:生产入库 8:生产出库
+                    WRStandardID: props.selectedRow.wrstandardid, //品类ID
+                    SpotGoodsBrandID: formState.SpotGoodsBrandID || 0, //现货品牌ID(DGFactoryItem表的ID)
+                    DeliveryGoodsID: props.selectedRow.deliverygoodsid, //现货商品ID
+                    SpotContractID: Long.fromString(props.selectedRow.spotcontractid), //合同ID
+                    WarehouseInfo: formState.WarehouseInfo || 0, // uint64 现货仓库ID
+                    Qty: formState.Qty || 0, // double 数量t
+                    ApplyRemark: '', // string 申请备注
+                };
+                requestResultLoadingAndInfo(ermcpInOutStockApplyReq, params, loading, ['入库登记成功', '入库登记失败:']).then(() => {
+                    context.emit('refresh');
+                    cancel();
                 });
-            }
-            return {
-                visible,
-                cancel,
-                submit,
-                loading,
-                formatValue,
-                rules,
-                formState,
-                formRef,
-                wareHouseList,
-                gblist,
-                gmlist,
-                DGList,
-            };
-        },
-    });
+            });
+        }
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+            formatValue,
+            rules,
+            formState,
+            formRef,
+            wareHouseList,
+            gblist,
+            gmlist,
+            DGList,
+        };
+    },
+});
 </script>
 
 <style lang="less">