|
|
@@ -231,8 +231,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="数量"
|
|
|
- name="Qty"
|
|
|
- >
|
|
|
+ name="Qty">
|
|
|
<a-input class="dialogInput suffixGrey"
|
|
|
v-model:value="formState.Qty"
|
|
|
style="width: 200px"
|
|
|
@@ -266,8 +265,10 @@
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
- <a-form-item label="升贴水">
|
|
|
+ <a-form-item label="升贴水"
|
|
|
+ name="PriceMove">
|
|
|
<a-input class="dialogInput suffixGrey"
|
|
|
+ v-model:value="formState.PriceMove"
|
|
|
placeholder="请输入升贴水"
|
|
|
:suffix="`${payCurrencyUnit}/${numberUnit}`"
|
|
|
style="width: 200px" />
|
|
|
@@ -275,40 +276,20 @@
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="点价期">
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
- style="width: 95px"
|
|
|
- placeholder="请选择点价期">
|
|
|
- <a-select-option value="1">
|
|
|
- 日期一
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- <span class="to">-</span>
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
- style="width: 95px"
|
|
|
- placeholder="请选择定价类型">
|
|
|
- <a-select-option value="1">
|
|
|
- 日期二
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-range-picker v-model:value="priceDate"
|
|
|
+ class="commonPicker"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ :show-time="{hideDisabledOptions: true}"
|
|
|
+ format="YYYY-MM-DD" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :span="12">
|
|
|
<a-form-item label="交收期">
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
- style="width: 95px"
|
|
|
- placeholder="请选择定价类型">
|
|
|
- <a-select-option value="1">
|
|
|
- 日期一
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
- <span class="to">-</span>
|
|
|
- <a-select class="inlineFormSelect"
|
|
|
- style="width: 95px"
|
|
|
- placeholder="请选择定价类型">
|
|
|
- <a-select-option value="1">
|
|
|
- 日期二
|
|
|
- </a-select-option>
|
|
|
- </a-select>
|
|
|
+ <a-range-picker v-model:value="deliveryDate"
|
|
|
+ class="commonPicker"
|
|
|
+ :disabled-date="disabledDate"
|
|
|
+ :show-time="{hideDisabledOptions: true}"
|
|
|
+ format="YYYY-MM-DD" />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
</template>
|
|
|
@@ -438,6 +419,7 @@ import { initData } from '@/common/methods';
|
|
|
import { handleFromState, handleContract, handlevalidate, handleDeliveryGoods, handlePrice, handleDate } from './setup';
|
|
|
import { getUserName } from '@/services/bus/user';
|
|
|
import { getGoodsList } from '@/services/bus/goods';
|
|
|
+import { Goods } from '@/services/go/ermcp/goodsInfo/interface';
|
|
|
|
|
|
export default defineComponent({
|
|
|
name: 'add-spot-contract',
|
|
|
@@ -452,7 +434,7 @@ export default defineComponent({
|
|
|
// 合同类型
|
|
|
const { contractType, isSell, contractChange, customList, queryCustomList } = handleContract();
|
|
|
// 自定义表单验证方法
|
|
|
- const { v_ContractType, v_BizType, v_BuyUser, v_SellUser, v_DeliveryGoods, v_WrStandard, v_SpotGoodsBrand, v_PriceType, v_Currency } = handlevalidate(formState);
|
|
|
+ const { v_ContractType, v_BizType, v_BuyUser, v_SellUser, v_DeliveryGoods, v_WrStandard, v_SpotGoodsBrand, v_PriceType, v_Currency, v_Goods } = handlevalidate(formState);
|
|
|
const rules = {
|
|
|
ContractNo: [{ required: true, message: '请输入合同编号', trigger: 'blur' }],
|
|
|
ContractType: [{ required: true, validator: v_ContractType, trigger: 'change' }],
|
|
|
@@ -462,21 +444,23 @@ export default defineComponent({
|
|
|
DeliveryGoodsID: [{ required: true, validator: v_DeliveryGoods, trigger: 'change' }],
|
|
|
WrStandardID: [{ required: true, validator: v_WrStandard, trigger: 'blur' }],
|
|
|
SpotGoodsBrandID: [{ required: true, validator: v_SpotGoodsBrand, trigger: 'blur' }],
|
|
|
+ GoodsID: [{ required: true, validator: v_Goods, trigger: 'blur' }],
|
|
|
ConvertFactor: [{ required: true, message: '请选择品类', trigger: 'blur' }],
|
|
|
SpotGoodsDesc: [{ required: true, message: '请输入商品规格', trigger: 'blur' }],
|
|
|
PriceType: [{ required: true, validator: v_PriceType, trigger: 'blur' }],
|
|
|
CurrencyID: [{ required: true, validator: v_Currency, trigger: 'blur' }],
|
|
|
Qty: [{ required: true, message: '请输入数量', trigger: 'blur' }],
|
|
|
Price: [{ required: true, message: '请输入价格', trigger: 'blur' }],
|
|
|
+ PriceMove: [{ required: true, message: '请输入升贴水', trigger: 'blur' }],
|
|
|
};
|
|
|
// 处理现货商品
|
|
|
const { deliveryGoodsList, gblist, gmlist, numberUnit, WrStandardChange, getDeliveryGoods, deliveryGoodsChange } = handleDeliveryGoods(formState);
|
|
|
// 价格信息
|
|
|
const { priceType, payCurrency, payCurrencyUnit, parCurrencyChange } = handlePrice(formState);
|
|
|
// 日期
|
|
|
- const { deliveryDate, disabledDate } = handleDate();
|
|
|
+ const { deliveryDate, priceDate, disabledDate } = handleDate();
|
|
|
// 现货商品列表
|
|
|
- const goodsList = getGoodsList();
|
|
|
+ const goodsList = ref<Goods[]>([]);
|
|
|
function submit() {
|
|
|
loading.value = true;
|
|
|
setTimeout(() => {
|
|
|
@@ -487,6 +471,7 @@ export default defineComponent({
|
|
|
initData(() => {
|
|
|
queryCustomList();
|
|
|
getDeliveryGoods();
|
|
|
+ goodsList.value = getGoodsList();
|
|
|
});
|
|
|
return {
|
|
|
visible,
|
|
|
@@ -513,6 +498,7 @@ export default defineComponent({
|
|
|
numberUnit,
|
|
|
getUserName,
|
|
|
deliveryDate,
|
|
|
+ priceDate,
|
|
|
disabledDate,
|
|
|
goodsList,
|
|
|
};
|