|
|
@@ -1,20 +1,10 @@
|
|
|
<template>
|
|
|
<!-- 销售: 点价登记-->
|
|
|
- <a-modal class="commonModal someprice"
|
|
|
- title="点价登记"
|
|
|
- v-model:visible="visible"
|
|
|
- @cancel="cancel"
|
|
|
- centered
|
|
|
- width="890px">
|
|
|
+ <a-modal class="commonModal someprice" title="点价登记" v-model:visible="visible" @cancel="cancel" centered width="890px">
|
|
|
<template #footer>
|
|
|
- <a-button key="submit"
|
|
|
- class="cancelBtn"
|
|
|
- @click="cancel">取消
|
|
|
+ <a-button key="submit" class="cancelBtn" @click="cancel">取消
|
|
|
</a-button>
|
|
|
- <a-button key="submit"
|
|
|
- type="primary"
|
|
|
- :loading="loading"
|
|
|
- @click="submit">点价登记
|
|
|
+ <a-button key="submit" type="primary" :loading="loading" @click="submit">点价登记
|
|
|
</a-button>
|
|
|
</template>
|
|
|
<fieldset class="formFieldSet">
|
|
|
@@ -48,8 +38,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="合同签署量">
|
|
|
- <span
|
|
|
- class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
|
|
|
+ <span class="white">{{ formatValue(selectedRow.qty + selectedRow.enumdicname) }}</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
@@ -61,8 +50,7 @@
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="点价合约">
|
|
|
- <span
|
|
|
- class="white">{{ formatValue(selectedRow.goodsname) + selectedRow.currencyname }}</span>
|
|
|
+ <span class="white">{{ formatValue(selectedRow.goodsname) }}</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
@@ -79,8 +67,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="已点均价">
|
|
|
- <span
|
|
|
- class="white">{{ formatValue(selectedRow.pricedavg.toFixed(2)) + " 元" }}</span>
|
|
|
+ <span class="white">{{ formatValue(selectedRow.pricedavg.toFixed(2)) + " 元" }}</span>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
@@ -88,19 +75,11 @@
|
|
|
</fieldset>
|
|
|
<fieldset class="formFieldSet">
|
|
|
<legend>本次点价信息</legend>
|
|
|
- <a-form class="inlineForm"
|
|
|
- ref="formRef"
|
|
|
- :model="formState"
|
|
|
- :rules="rules">
|
|
|
+ <a-form class="inlineForm" ref="formRef" :model="formState" :rules="rules">
|
|
|
<a-row :gutter="24">
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="点价价格"
|
|
|
- name="PricedPrice">
|
|
|
- <a-input-number class="dialogInput"
|
|
|
- style="width: 200px"
|
|
|
- v-model:value="formState.PricedPrice"
|
|
|
- :min="0"
|
|
|
- placeholder="请输入点价价格" />
|
|
|
+ <a-form-item label="点价价格" name="PricedPrice">
|
|
|
+ <a-input-number class="dialogInput" style="width: 200px" v-model:value="formState.PricedPrice" :min="0" placeholder="请输入点价价格" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
@@ -119,21 +98,12 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="点价数量"
|
|
|
- class="relative"
|
|
|
- name="PricedQty">
|
|
|
- <a-input-number class="dialogInput"
|
|
|
- style="width: 200px"
|
|
|
- v-model:value="formState.PricedQty"
|
|
|
- :min="0"
|
|
|
- :max="selectedRow.unpricedqty"
|
|
|
- placeholder="请输入点价数量" />
|
|
|
+ <a-form-item label="点价数量" class="relative" name="PricedQty">
|
|
|
+ <a-input-number class="dialogInput" style="width: 200px" v-model:value="formState.PricedQty" :min="0" :max="selectedRow.unpricedqty" placeholder="请输入点价数量" />
|
|
|
<div class="tip mt10">
|
|
|
- <span>未定价量<span
|
|
|
- class="white">{{ selectedRow.unpricedqty }}{{ selectedRow.enumdicname }}</span>
|
|
|
+ <span>未定价量<span class="white">{{ selectedRow.unpricedqty }}{{ selectedRow.enumdicname }}</span>
|
|
|
</span>
|
|
|
- <a class="blue ml10"
|
|
|
- @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
|
|
|
+ <a class="blue ml10" @click="formState.PricedQty = selectedRow.unpricedqty"> 全部登记</a>
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
@@ -164,46 +134,46 @@ import { getPriceTypeName } from '@/common/constants/enumsName';
|
|
|
import { _closeModal } from '@/common/setup/modal/modal';
|
|
|
|
|
|
export default defineComponent({
|
|
|
- name: 'sell_pending_someprice',
|
|
|
- emits: ['cancel', 'update'],
|
|
|
- props: {
|
|
|
- selectedRow: {
|
|
|
- type: Object as PropType<Ermcp3SellBuyContract>,
|
|
|
- default: {},
|
|
|
- },
|
|
|
+ name: 'sell_pending_someprice',
|
|
|
+ emits: ['cancel', 'update'],
|
|
|
+ props: {
|
|
|
+ selectedRow: {
|
|
|
+ type: Object as PropType<Ermcp3SellBuyContract>,
|
|
|
+ default: {},
|
|
|
},
|
|
|
- setup(props, context) {
|
|
|
- const { visible, cancel } = _closeModal(context);
|
|
|
- const loading = ref<boolean>(false);
|
|
|
- const { rules, formState, formRef } = handleForm();
|
|
|
- function submit() {
|
|
|
- const wrapEl = unref(formRef);
|
|
|
- wrapEl.validate().then(() => {
|
|
|
- loading.value = true;
|
|
|
- const params: SomePriceReq = {
|
|
|
- PricedPrice: Number(formState.PricedPrice),
|
|
|
- PricedQty: Number(formState.PricedQty),
|
|
|
- };
|
|
|
- // 发出点价请求
|
|
|
- somePriceReq(props.selectedRow.spotcontractid, params, loading)
|
|
|
- .then((res) => {
|
|
|
- cancel(true);
|
|
|
- })
|
|
|
- .catch((err) => {});
|
|
|
- });
|
|
|
- }
|
|
|
- return {
|
|
|
- visible,
|
|
|
- cancel,
|
|
|
- submit,
|
|
|
- loading,
|
|
|
- formRef,
|
|
|
- formState,
|
|
|
- formatValue,
|
|
|
- rules,
|
|
|
- getPriceTypeName,
|
|
|
+ },
|
|
|
+ setup(props, context) {
|
|
|
+ const { visible, cancel } = _closeModal(context);
|
|
|
+ const loading = ref<boolean>(false);
|
|
|
+ const { rules, formState, formRef } = handleForm();
|
|
|
+ function submit() {
|
|
|
+ const wrapEl = unref(formRef);
|
|
|
+ wrapEl.validate().then(() => {
|
|
|
+ loading.value = true;
|
|
|
+ const params: SomePriceReq = {
|
|
|
+ PricedPrice: Number(formState.PricedPrice),
|
|
|
+ PricedQty: Number(formState.PricedQty),
|
|
|
};
|
|
|
- },
|
|
|
+ // 发出点价请求
|
|
|
+ somePriceReq(props.selectedRow.spotcontractid, params, loading)
|
|
|
+ .then((res) => {
|
|
|
+ cancel(true);
|
|
|
+ })
|
|
|
+ .catch((err) => { });
|
|
|
+ });
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ visible,
|
|
|
+ cancel,
|
|
|
+ submit,
|
|
|
+ loading,
|
|
|
+ formRef,
|
|
|
+ formState,
|
|
|
+ formatValue,
|
|
|
+ rules,
|
|
|
+ getPriceTypeName,
|
|
|
+ };
|
|
|
+ },
|
|
|
});
|
|
|
</script>
|
|
|
|