|
|
@@ -184,11 +184,16 @@ const isDeliveryRequired = computed(() => {
|
|
|
return checkedList.value.includes('1') || form.sellType === '1';
|
|
|
});
|
|
|
|
|
|
-// 线下服务:itemsList 和 system 类型都需要“服务所需时间”
|
|
|
+// 线下服务:itemsList 和 system 类型都需要”服务所需时间”
|
|
|
const showServiceRequiredTime = computed(() => {
|
|
|
return form.sellType === '2';
|
|
|
});
|
|
|
|
|
|
+// 线下服务+一口价:固定计价单位、相当于、使用单位、建议频率单位
|
|
|
+const isOfflineServiceFixedPrice = computed(() => {
|
|
|
+ return form.sellType === '2' && form.pricingType === '0';
|
|
|
+});
|
|
|
+
|
|
|
// 获取所有的供应商
|
|
|
async function getSupplier(params: any) {
|
|
|
supplierOptions.value = [];
|
|
|
@@ -768,6 +773,22 @@ watch(
|
|
|
}
|
|
|
);
|
|
|
|
|
|
+// 线下服务+一口价:自动填充固定值
|
|
|
+watch(
|
|
|
+ isOfflineServiceFixedPrice,
|
|
|
+ (val) => {
|
|
|
+ if (val) {
|
|
|
+ if (!form.cpFixedPricingRule) {
|
|
|
+ form.cpFixedPricingRule = { unitPrice: '', pricingUnit: '', convertDose: '', convertUnit: '' };
|
|
|
+ }
|
|
|
+ form.cpFixedPricingRule.pricingUnit = '次';
|
|
|
+ form.cpFixedPricingRule.convertDose = '1';
|
|
|
+ form.cpFixedPricingRule.convertUnit = '次';
|
|
|
+ suggestedFrequencyUnit.value = '次';
|
|
|
+ }
|
|
|
+ }
|
|
|
+);
|
|
|
+
|
|
|
// 监听一口价单位变化,同步到建议频率单位
|
|
|
watch(
|
|
|
() => form.cpFixedPricingRule?.convertUnit,
|
|
|
@@ -946,13 +967,13 @@ function handleDerivation() {
|
|
|
<span style="margin: 0 8px">元</span>
|
|
|
|
|
|
<span class="label" style="margin-left: 32px">计价单位:</span>
|
|
|
- <a-input v-model:value="form.cpFixedPricingRule.pricingUnit" placeholder="请输入" style="width: 100px" />
|
|
|
+ <a-input v-model:value="form.cpFixedPricingRule.pricingUnit" placeholder="请输入" style="width: 100px" :disabled="isOfflineServiceFixedPrice" />
|
|
|
|
|
|
<span style="margin-left: 32px">相当于</span>
|
|
|
<a-input v-model:value="form.cpFixedPricingRule.convertDose" placeholder="请输入"
|
|
|
- style="width: 100px; margin-left: 8px" />
|
|
|
+ style="width: 100px; margin-left: 8px" :disabled="isOfflineServiceFixedPrice" />
|
|
|
<vxe-select v-model="form.cpFixedPricingRule.convertUnit" :options="unitOptions" placeholder="请选择" clearable
|
|
|
- transfer style="width: 100px; margin-left: 8px" />
|
|
|
+ transfer style="width: 100px; margin-left: 8px" :disabled="isOfflineServiceFixedPrice" />
|
|
|
|
|
|
<span style="color: #aaa; margin-left: 8px">(使用单位)</span>
|
|
|
</div>
|
|
|
@@ -992,7 +1013,7 @@ function handleDerivation() {
|
|
|
<span>天</span>
|
|
|
<a-input v-model:value="form.frequencyMeasure" placeholder="请输入" style="width: 100px; margin: 0 8px" />
|
|
|
<vxe-select v-model="suggestedFrequencyUnit" :options="unitOptions" placeholder="请选择"
|
|
|
- :clearable="form.pricingType !== '0'" transfer style="width: 100px; margin-left: 8px" />
|
|
|
+ :clearable="form.pricingType !== '0'" transfer style="width: 100px; margin-left: 8px" :disabled="isOfflineServiceFixedPrice" />
|
|
|
</div>
|
|
|
</a-form-item>
|
|
|
<a-form-item label="服务所需时间:"
|