li.shaoyi 4 år sedan
förälder
incheckning
055a2c7055

+ 1 - 1
src/views/business/purchase/list/all/index.vue

@@ -56,7 +56,7 @@ export default defineComponent({
         filterCustomTable,
         MtpTableButton,
         detail: defineAsyncComponent(() => import('../../components/detail/index.vue')), // 详情
-        purchase_pending_someprice: defineAsyncComponent(() => import('../../components/someprice/index.vue')), //采购点价登记
+        purchase_pending_someprice: defineAsyncComponent(() => import('../../components/someprice/index.vue')), //点价登记
         purchase_performance_settlement: defineAsyncComponent(() => import('../../components/settlement/index.vue')), //交收登记
         purchase_performance_funds: defineAsyncComponent(() => import('../../components/funds/index.vue')), // 款项登记
         purchase_performance_invoice: defineAsyncComponent(() => import('../../components/invoice/index.vue')), // 发票登记

+ 21 - 19
src/views/business/spotmarket/components/filter/index.vue

@@ -8,32 +8,17 @@
 
 <script lang="ts">
 import FilterOption from '@/common/components/filter/index.vue';
-import { defineComponent } from 'vue';
+import { defineComponent, reactive } from 'vue';
 import { handleFilter, InputList, SelectList } from '@/common/setup/filter';
 import { initData } from '@/common/export/table';
-import { ErmcpDeliveryGoodsDetailEx, ErmcpDeliveryGoods, Ermcp3Brand, Ermcp3Wrstandard } from '@/services/go/ermcp/goodsInfo/interface';
+import { ErmcpDeliveryGoodsDetailEx } from '@/services/go/ermcp/goodsInfo/interface';
 import APP from '@/services';
 
 export default defineComponent({
     name: 'spotmarket_price-filter-table',
     components: { FilterOption },
     setup(props, context) {
-        initData(() => {
-            const goodsList: ErmcpDeliveryGoodsDetailEx[] = APP.get('DeliveryGoodsList'),
-                category: ErmcpDeliveryGoods[] = [], // 品种
-                goods: Ermcp3Wrstandard[] = [], // 商品
-                brand: Ermcp3Brand[] = []; // 品牌
-
-            goodsList.forEach((el) => {
-                category.push(el.data);
-                goods.push(...el.gmlist);
-                brand.push(...el.gblist);
-            });
-
-            debugger;
-        });
-
-        const select: SelectList[] = [
+        const select = reactive<SelectList[]>([
             {
                 value: undefined,
                 key: 'deliverygoodsid',
@@ -63,8 +48,25 @@ export default defineComponent({
                     { value: 3, lable: '暂定价' },
                 ],
             },
-        ];
+        ]);
         const input: InputList[] = [];
+
+        initData(() => {
+            const goodsList: ErmcpDeliveryGoodsDetailEx[] = APP.get('DeliveryGoodsList');
+            goodsList.forEach((el) => {
+                select[0].list.push({
+                    value: el.data.deliverygoodsid,
+                    lable: el.data.deliverygoodsname,
+                });
+
+                const gm = el.gmlist.map((item) => ({ value: item.wrstandardid, lable: item.wrstandardname }));
+                select[1].list.push(...gm);
+
+                const gb = el.gblist.map((item) => ({ value: item.brandid, lable: item.brandname }));
+                select[2].list.push(...gb);
+            });
+        });
+
         return {
             ...handleFilter(select, input, context),
         };

+ 93 - 0
src/views/business/spotmarket/components/modify/index.vue

@@ -0,0 +1,93 @@
+<template>
+    <!-- 现货参考价-修改-->
+    <a-modal class="add-custom custom-detail" title="修改现货参考价" v-model:visible="visible" centered :maskClosable="false" @cancel="cancel" width="890px">
+        <a-form class="inlineForm" :form="form" @submit="handleSearch">
+            <fieldset class="formFieldSet">
+                <legend>现货市价信息</legend>
+                <a-row :gutter="24">
+                    <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.wrstandardname) }}</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="结算币种" name="currencyid">
+                            <a-select class="inlineFormSelect" style="width: 200px" placeholder="请选择结算币种" v-model:value="formState.currencyid">
+                                <a-select-option v-for="option in currencyList" :key="option.enumitemname" :value="option.enumitemname">{{ option.enumdicname }}</a-select-option>
+                            </a-select>
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+                <a-row :gutter="24">
+                    <a-col :span="24">
+                        <a-form-item label="现货价格" name="spotgoodsprice">
+                            <a-input-number class="dialogInput" style="width: 200px" v-model:value="formState.spotgoodsprice" :min="0" placeholder="请输入现货价格" />
+                        </a-form-item>
+                    </a-col>
+                </a-row>
+            </fieldset>
+        </a-form>
+        <template #footer>
+            <a-button key="submit" type="primary" :loading="loading" @click="cancel">取消</a-button>
+            <a-button key="submit" type="primary" :loading="loading" @click="submit">提交</a-button>
+        </template>
+    </a-modal>
+</template>
+
+<script lang="ts">
+import { defineComponent, PropType, ref } from 'vue';
+import { formatValue } from '@/common/methods';
+import { Modal } from 'ant-design-vue';
+import { Ermcp3SpotGoodsPrice } from '@/services/go/ermcp/qhj/interface';
+import { _closeModal } from '@/common/setup/modal/modal';
+import { getPayCurrencyTypeEnumList } from '@/common/constants/enumsList';
+
+export default defineComponent({
+    name: 'spotmarket_price_modify',
+    emits: ['cancel', 'update'],
+    props: {
+        selectedRow: {
+            type: Object as PropType<Ermcp3SpotGoodsPrice>,
+            default: {},
+        },
+    },
+    setup(props, context) {
+        const { visible, cancel } = _closeModal(context);
+        const loading = ref<boolean>(false);
+
+        const formState = ref<{ [key: string]: number | null }>({
+            currencyid: props.selectedRow.currencyid,
+            spotgoodsprice: props.selectedRow.spotgoodsprice,
+        });
+
+        const currencyList = getPayCurrencyTypeEnumList();
+
+        // 审核通过
+        function submit() {
+            // 提交
+        }
+
+        return {
+            visible,
+            cancel,
+            submit,
+            loading,
+            formatValue,
+            formState,
+            currencyList,
+        };
+    },
+});
+</script>

+ 2 - 1
src/views/business/spotmarket/list/price/index.vue

@@ -29,7 +29,8 @@ export default defineComponent({
         contextMenu,
         MtpTableFilter,
         MtpTableButton,
-        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')),
+        detail: defineAsyncComponent(() => import('../../components/detail/index.vue')), // 详情
+        spotmarket_price_modify: defineAsyncComponent(() => import('../../components/modify/index.vue')), // 修改
     },
     setup() {
         // 权限按钮