Преглед на файлове

Merge remote-tracking branch 'origin/master'

yu jie преди 4 години
родител
ревизия
5682d148ec

+ 1 - 1
public/config/app.config.json

@@ -1,3 +1,3 @@
 {
-    "apiUrl": "http://192.168.30.125:8080/cfg?key=test_125"
+    "apiUrl": "http://192.168.31.118:8080/cfg?key=test_118"
 }

+ 21 - 22
src/common/components/drawer/index.vue

@@ -1,26 +1,25 @@
 <template>
-    <a-drawer
-        :placement="placement"
-        :closable="false"
-        :visible="visible"
-        :destroyOnClose="true"
-        class="bottomListed"
-        height="406px"
-    >
-        <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
-        <div class="collapse" @click="cancel">
-            <DoubleRightOutlined />
-        </div>
-        <div class="collapseCont">
-            <div class="title">{{ title }}</div>
-            <div class="content highContent">
-                <!-- <Listed></Listed> -->
-                <!-- <Delisting></Delisting> -->
-                <slot></slot>
-                <!-- <Trade></Trade> -->
-            </div>
-        </div>
-    </a-drawer>
+  <a-drawer :placement="placement"
+            :closable="false"
+            :visible="visible"
+            :destroyOnClose="true"
+            class="bottomListed"
+            height="406px">
+    <!-- 摘牌是top  挂牌是bottom 期货交易是tradeDialog -->
+    <div class="collapse"
+         @click="cancel">
+      <DoubleRightOutlined />
+    </div>
+    <div class="collapseCont">
+      <div class="title">{{ title }}</div>
+      <div class="content highContent">
+        <!-- <Listed></Listed> -->
+        <!-- <Delisting></Delisting> -->
+        <slot></slot>
+        <!-- <Trade></Trade> -->
+      </div>
+    </div>
+  </a-drawer>
 </template>
 
 <script lang="ts">

+ 83 - 16
src/views/order/performance_information/components/performance_information_buy_performance/components/breach_contract/index.vue

@@ -4,32 +4,88 @@
           :placement="'bottom'"
           :visible="visible"
           @cancel="cancel">
-    违约
+    <div class="listed">
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef"
+                :model="formState"
+                :rules="rules">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="品种">
+                <span class="white">{{selectedRow.deliverygoodsname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="仓库">
+                <span class="white">{{selectedRow.warehousename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="履约商品">
+                <span class="white">{{selectedRow.wrtypename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="当前步骤">
+                <span class="white">{{selectedRow.curstepname}}(超期天数:331)</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="关联单号">
+                <span class="white">86989565623</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="附件"
+                           name="url">
+                <UploadImg :visible="visible"
+                           :imgList="uploadImgList"
+                           @upload="uploadImgAction" />
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="备注"
+                           name="remark">
+                <a-input class="commonInput"
+                         v-model:value="formState.remark"
+                         style="width: 100%" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <a-button class="listedBtn"
+                          :loading="loading"
+                          :disabled="loading"
+                          @click="submit">提交</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
   </Drawer>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrHoldLB, WrPosition } from '@/services/go/wrtrade/interface';
-import { getInTaAccount, getUserId } from '@/services/bus/account';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { hdWROrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
+import { WrPosition } from '@/services/go/wrtrade/interface';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { _closeModal } from '@/common/setup/modal/modal';
+import { handleForm } from './setup';
 import { validateAction } from '@/common/setup/form';
-import { getMarketRunByTradeMode } from '@/services/bus/market';
-import { message } from 'ant-design-vue';
-import { getGoodsGroupsByTradeMode } from '@/services/bus/goods';
-import { TradeMode } from '@/common/constants/enumCommon';
-import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
+import { FormState } from './interface';
+import UploadImg from '@/common/components/uploadImg/index.vue';
+import { getUploadImg } from '@/common/setup/upload';
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_breach_contract,
-    components: { Drawer },
+    components: { Drawer, UploadImg },
     emits: ['cancel', 'update'],
     props: {
         selectedRow: {
@@ -39,11 +95,22 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
-        console.log('selectedRow', props.selectedRow);
-
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleForm();
+        const { uploadImgAction, uploadImgList, handleImg } = getUploadImg();
+        function submit() {
+            validateAction<FormState>(formRef, formState).then((param) => {});
+        }
         return {
             visible,
             cancel,
+            submit,
+            loading,
+            rules,
+            formState,
+            formRef,
+            uploadImgAction,
+            uploadImgList,
         };
     },
 });

+ 4 - 0
src/views/order/performance_information/components/performance_information_buy_performance/components/breach_contract/interface.ts

@@ -0,0 +1,4 @@
+export interface FormState {
+    url: string,
+    remark: string,
+}

+ 14 - 0
src/views/order/performance_information/components/performance_information_buy_performance/components/breach_contract/setup.ts

@@ -0,0 +1,14 @@
+import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from "./interface";
+
+export function handleForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        url: '',
+        remark: ''
+    })
+    const rules = {
+        url: [{ required: true, message: '请上传附件', trigger: 'blur', }],
+    }
+    return { rules, formState, formRef }
+}

+ 80 - 16
src/views/order/performance_information/components/performance_information_buy_performance/components/extension/index.vue

@@ -1,31 +1,87 @@
 <template>
   <!-- 延期-->
-  <Drawer :title="'延期'"
+  <Drawer :title="'延期申请'"
           :placement="'bottom'"
           :visible="visible"
           @cancel="cancel">
-    延期
+    <div class="listed">
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef"
+                :model="formState"
+                :rules="rules">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="品种">
+                <span class="white">{{selectedRow.deliverygoodsname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="仓库">
+                <span class="white">{{selectedRow.warehousename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="履约商品">
+                <span class="white">{{selectedRow.wrtypename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="当前步骤">
+                <span class="white">{{selectedRow.curstepname}}((超期天数:331)</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="关联单号">
+                <span class="white">86989565623</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="申请延期天数"
+                           name="days">
+                <a-input-number class="commonInput"
+                                :min="1"
+                                v-model:value="formState.days"
+                                style="width: 140px" />
+                <span>天</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="备注"
+                           name="remark">
+                <a-input class="commonInput"
+                         v-model:value="formState.remark"
+                         style="width: 100%" />
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <a-button class="listedBtn"
+                          :loading="loading"
+                          :disabled="loading"
+                          @click="submit">提交</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
   </Drawer>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrHoldLB, WrPosition } from '@/services/go/wrtrade/interface';
-import { getInTaAccount, getUserId } from '@/services/bus/account';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { hdWROrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
+import { WrPosition } from '@/services/go/wrtrade/interface';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { _closeModal } from '@/common/setup/modal/modal';
+import { handleForm } from './setup';
 import { validateAction } from '@/common/setup/form';
-import { getMarketRunByTradeMode } from '@/services/bus/market';
-import { message } from 'ant-design-vue';
-import { getGoodsGroupsByTradeMode } from '@/services/bus/goods';
-import { TradeMode } from '@/common/constants/enumCommon';
-import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
+import { FormState } from './interface';
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_extension,
@@ -39,11 +95,19 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
-        console.log('selectedRow', props.selectedRow);
-
+        const loading = ref<boolean>(false);
+        const { rules, formState, formRef } = handleForm();
+        function submit() {
+            validateAction<FormState>(formRef, formState).then((param) => {});
+        }
         return {
             visible,
             cancel,
+            submit,
+            loading,
+            rules,
+            formState,
+            formRef,
         };
     },
 });

+ 4 - 0
src/views/order/performance_information/components/performance_information_buy_performance/components/extension/interface.ts

@@ -0,0 +1,4 @@
+export interface FormState {
+    days: number | null,
+    remark: string,
+}

+ 14 - 0
src/views/order/performance_information/components/performance_information_buy_performance/components/extension/setup.ts

@@ -0,0 +1,14 @@
+import { reactive, ref, UnwrapRef } from "vue";
+import { FormState } from "./interface";
+
+export function handleForm() {
+    const formRef = ref();
+    const formState: UnwrapRef<FormState> = reactive({
+        days: null,
+        remark: ''
+    })
+    const rules = {
+        days: [{ required: true, message: '请输入延期天数', trigger: 'blur', type: 'number', min: 1, }],
+    }
+    return { rules, formState, formRef }
+}

+ 61 - 15
src/views/order/performance_information/components/performance_information_buy_performance/components/pay/index.vue

@@ -4,28 +4,71 @@
           :placement="'bottom'"
           :visible="visible"
           @cancel="cancel">
-    付款
+    <div class="listed">
+      <div class="formBar">
+        <a-form class="inlineForm dialogForm"
+                ref="formRef">
+          <a-row :gutter="24">
+            <a-col :span="12">
+              <a-form-item label="品种">
+                <span class="white">{{selectedRow.deliverygoodsname}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="12">
+              <a-form-item label="仓库">
+                <span class="white">{{selectedRow.warehousename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="履约商品">
+                <span class="white">{{selectedRow.wrtypename}}</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="履约总金额">
+                <span class="white">1000.00元(已冻结履约金额200.00元)</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="当前步骤">
+                <span class="white">{{selectedRow.curstepname}}(</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="本次需支付">
+                <span class="white">1000.00</span>
+              </a-form-item>
+            </a-col>
+            <a-col :span="24">
+              <a-form-item label="剩余款">
+                <span class="white">1000.00</span>
+              </a-form-item>
+            </a-col>
+          </a-row>
+          <a-row :gutter="24"
+                 type="flex"
+                 justify="center">
+            <a-col :span="24">
+              <a-form-item class="tc">
+                <a-button class="listedBtn"
+                          :loading="loading"
+                          :disabled="loading"
+                          @click="submit">提交</a-button>
+              </a-form-item>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
   </Drawer>
 </template>
 
 <script lang="ts">
 import { defineComponent, PropType, ref } from 'vue';
-import { enumOrderComponents } from '@/common/constants/enumOrderComponents';
 import Drawer from '@/common/components/drawer/index.vue';
-import { QueryWrPositionReq, WrHoldLB, WrPosition } from '@/services/go/wrtrade/interface';
-import { getInTaAccount, getUserId } from '@/services/bus/account';
-import { requestResultLoadingAndInfo } from '@/common/methods/request/resultInfo';
-import { hdWROrder } from '@/services/proto/warehousetrade';
-import { v4 as uuidv4 } from 'uuid';
-import moment from 'moment';
+import { WrPosition } from '@/services/go/wrtrade/interface';
 import { ModalEnum } from '@/common/constants/modalNameEnum';
 import { _closeModal } from '@/common/setup/modal/modal';
-import { validateAction } from '@/common/setup/form';
-import { getMarketRunByTradeMode } from '@/services/bus/market';
-import { message } from 'ant-design-vue';
-import { getGoodsGroupsByTradeMode } from '@/services/bus/goods';
-import { TradeMode } from '@/common/constants/enumCommon';
-import { WRGoodsInfo } from '@/services/proto/warehousetrade/interface';
 
 export default defineComponent({
     name: ModalEnum.performance_information_buy_performance_pay,
@@ -39,11 +82,14 @@ export default defineComponent({
     },
     setup(props, context) {
         const { visible, cancel } = _closeModal(context);
+        const loading = ref<boolean>(false);
         console.log('selectedRow', props.selectedRow);
-
+        function submit() {}
         return {
             visible,
             cancel,
+            submit,
+            loading,
         };
     },
 });