|
|
|
@ -1,179 +1,141 @@
|
|
|
|
|
<template> |
|
|
|
|
<el-form label-position="top" label-width="400" :model="form" class="el_form"> |
|
|
|
|
<div class="content"> |
|
|
|
|
<div class="el_row_1"> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item label="计算类型"> |
|
|
|
|
<el-select |
|
|
|
|
class="el_Cselect" |
|
|
|
|
v-model="form.warehousePricingType" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
disabled |
|
|
|
|
placeholder="选择计费类型" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Storagebillingtype" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="计算模式"> |
|
|
|
|
<el-select |
|
|
|
|
class="el_Cselect" |
|
|
|
|
v-model="form.warehousePricingMode" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
disabled |
|
|
|
|
placeholder="选择仓储计费模式" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Warehousebillingmode" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item label="计算基准"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="form.warehouseCalculationBasis" |
|
|
|
|
class="el_Cselect" |
|
|
|
|
style="width: 100%; background-color: #f5f7fa; padding: 0 4px" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
<el-radio v-for="item in CalculationBasis" :key="item.label" :label="item.value">{{ |
|
|
|
|
item.label |
|
|
|
|
}}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="el_row_2" v-if="Surchargecd"> |
|
|
|
|
<div class="el_sever_title"> |
|
|
|
|
<span> 附加费用</span> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="!request.warehouseIsCategorySubjoin"> |
|
|
|
|
|
|
|
|
|
<span class="Subtitle">统一计费单价</span> |
|
|
|
|
<div class="el_row_2_1"> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="仓储操作/装卸费" |
|
|
|
|
class="el_lable_title" |
|
|
|
|
v-if="request.warehouseIsOperateFee" |
|
|
|
|
<div v-loading="loading" element-loading-text="正在加载中..."> |
|
|
|
|
<el-form label-position="top" label-width="400" :model="form" class="el_form"> |
|
|
|
|
<div class="content"> |
|
|
|
|
<div class="el_row_1"> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item label="计算类型"> |
|
|
|
|
<el-select |
|
|
|
|
class="el_Cselect" |
|
|
|
|
v-model="form.warehousePricingType" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
disabled |
|
|
|
|
placeholder="选择计费类型" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.operatePrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="10" |
|
|
|
|
:controls="false" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Storagebillingtype" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="仓储管理费" |
|
|
|
|
style="margin-top: 10px" |
|
|
|
|
v-if="request.warehouseIsManageFee" |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="计算模式"> |
|
|
|
|
<el-select |
|
|
|
|
class="el_Cselect" |
|
|
|
|
v-model="form.warehousePricingMode" |
|
|
|
|
filterable |
|
|
|
|
clearable |
|
|
|
|
disabled |
|
|
|
|
placeholder="选择仓储计费模式" |
|
|
|
|
style="width: 100%" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.warehouseManagementPrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="10" |
|
|
|
|
:controls="false" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_flex_row" style="margin-top: 10px" v-if="request.warehouseIsSortFee"> |
|
|
|
|
<el-form-item label="仓储分货费"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.warehouseSortPrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="10" |
|
|
|
|
:controls="false" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in Warehousebillingmode" |
|
|
|
|
:key="item.value" |
|
|
|
|
:label="item.label" |
|
|
|
|
:value="item.value" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item label="计算基准"> |
|
|
|
|
<el-radio-group |
|
|
|
|
v-model="form.warehouseCalculationBasis" |
|
|
|
|
class="el_Cselect" |
|
|
|
|
style="width: 100%; background-color: #f5f7fa; padding: 0 4px" |
|
|
|
|
disabled |
|
|
|
|
> |
|
|
|
|
<el-radio v-for="item in CalculationBasis" :key="item.label" :label="item.value">{{ |
|
|
|
|
item.label |
|
|
|
|
}}</el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- 品类计费单价 --> |
|
|
|
|
<div class="el_row" style="width: 50%" v-if="request.warehouseIsCategorySubjoin"> |
|
|
|
|
<el-form-item label="品类计费单价"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.SurchargeData" :Surcharge="form.Surcharge" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<!-- 下半部分布局 --> |
|
|
|
|
<div class="el_flex"> |
|
|
|
|
<!-- 按件计费 --> |
|
|
|
|
<!-- <div class="el_row" v-if="request.warehouseSubjoinFeeUnit == 1"> |
|
|
|
|
<span class="Subtitle">按件计费</span> |
|
|
|
|
<el-form-item label="统一计费单价" class="el_lable_title"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.piecebillingData" :Surcharge="form.piecebilling" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="按件计费品类单价"> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.piecebillingData" |
|
|
|
|
:Surcharge="form.piecebillingPL" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> --> |
|
|
|
|
|
|
|
|
|
<!-- <div class="el_row" v-if="request.warehouseSubjoinFeeUnit == 2"> |
|
|
|
|
<span class="Subtitle">按方计费</span> |
|
|
|
|
<el-form-item label="统一计费单价" class="el_lable_title"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.piecebillingData" :Surcharge="form.piecebilling" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="按件计费品类单价"> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.piecebillingData" |
|
|
|
|
:Surcharge="form.piecebillingPL" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> --> |
|
|
|
|
<!-- 下半部分布局 --> |
|
|
|
|
<div class="el_flex"> |
|
|
|
|
<div class="el_row"> |
|
|
|
|
<span class="Subtitle">{{ tabform.title }}</span> |
|
|
|
|
<el-form-item :label="tabform.table"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.publicData" :Surcharge="form.publicTable" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- <div class="el_row" v-if="request.warehouseSubjoinFeeUnit == 3"> |
|
|
|
|
<span class="Subtitle">按重量计费(kg)</span> |
|
|
|
|
<el-form-item label="统一计费单价" class="el_lable_title"> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.BillingbyweightPLData" |
|
|
|
|
:Surcharge="form.Billingbyweight" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<div class="el_row_2" v-if="Surchargecd"> |
|
|
|
|
<div class="el_sever_title"> |
|
|
|
|
<span> 附加费用</span> |
|
|
|
|
</div> |
|
|
|
|
<div v-if="!request.warehouseIsCategorySubjoin"> |
|
|
|
|
<span class="Subtitle">统一计费单价</span> |
|
|
|
|
<div class="el_row_2_1"> |
|
|
|
|
<div class="el_flex_row"> |
|
|
|
|
<el-form-item |
|
|
|
|
label="仓储操作/装卸费" |
|
|
|
|
class="el_lable_title" |
|
|
|
|
v-if="request.warehouseIsOperateFee" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.operatePrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="9999999" |
|
|
|
|
:controls="false" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item |
|
|
|
|
label="仓储管理费" |
|
|
|
|
style="margin-top: 10px" |
|
|
|
|
v-if="request.warehouseIsManageFee" |
|
|
|
|
> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.warehouseManagementPrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="9999999" |
|
|
|
|
:controls="false" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<div class="el_flex_row" style="margin-top: 10px" v-if="request.warehouseIsSortFee"> |
|
|
|
|
<el-form-item label="仓储分货费"> |
|
|
|
|
<el-input-number |
|
|
|
|
v-model="form.warehouseSortPrice" |
|
|
|
|
:precision="2" |
|
|
|
|
:min="0" |
|
|
|
|
:max="9999999" |
|
|
|
|
:controls="false" |
|
|
|
|
:value-on-clear="0" |
|
|
|
|
placeholder="请输入价格" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<el-form-item label="按重量(KG)计费品类单价"> |
|
|
|
|
<SurchargeTable |
|
|
|
|
:SurchargeData="form.piecebillingData" |
|
|
|
|
:Surcharge="form.BillingbyweightPL" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> --> |
|
|
|
|
<div class="el_row"> |
|
|
|
|
<span class="Subtitle">{{ tabform.title }}</span> |
|
|
|
|
<el-form-item :label="tabform.table" class="el_lable_title"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.publicData" :Surcharge="form.publicTable" /> |
|
|
|
|
<!-- 品类计费单价 --> |
|
|
|
|
<div class="el_row" style="width: 50%" v-if="request.warehouseIsCategorySubjoin"> |
|
|
|
|
<el-form-item label="品类计费单价"> |
|
|
|
|
<SurchargeTable :SurchargeData="form.SurchargeData" :Surcharge="form.Surcharge" /> |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 操作按钮 --> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button type="primary" icon="Refresh" @click="resetFormData">重置</el-button> |
|
|
|
|
<el-button type="primary" icon="Position" @click="handleSubmit">保存</el-button> |
|
|
|
|
</div> |
|
|
|
|
</el-form> |
|
|
|
|
<!-- 操作按钮 --> |
|
|
|
|
<div class="flex-c-c"> |
|
|
|
|
<el-button type="primary" icon="Refresh" @click="resetFormData">重置</el-button> |
|
|
|
|
<el-button type="primary" icon="Position" @click="handleSubmit">保存</el-button> |
|
|
|
|
</div> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
@ -182,7 +144,7 @@ import { ref, defineEmits, defineComponent, computed } from 'vue';
|
|
|
|
|
import SurchargeTable from '@/components/pric/tablePric.vue'; |
|
|
|
|
import { getDictionaryBiz } from '@/api/system/dict'; //字典 |
|
|
|
|
import { deepClone } from '@/utils/util'; |
|
|
|
|
import { ElMessage } from 'element-plus'; |
|
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'; |
|
|
|
|
import { putBasicdataPrice } from '@/api/Pricesystem/index'; |
|
|
|
|
import { useRoute } from 'vue-router'; |
|
|
|
|
const $route = useRoute(); //获取地址栏参数 |
|
|
|
@ -205,8 +167,8 @@ const Warehousebillingmode = ref([]);
|
|
|
|
|
const CalculationBasis = ref([]); |
|
|
|
|
const request = ref({}); |
|
|
|
|
const Surchargepricingunit = ref([]); |
|
|
|
|
function updateDictionary(targetArray, dictionaryType) { |
|
|
|
|
getDictionaryBiz(dictionaryType) |
|
|
|
|
async function updateDictionary(targetArray, dictionaryType) { |
|
|
|
|
await getDictionaryBiz(dictionaryType) |
|
|
|
|
.then(res => { |
|
|
|
|
console.log(res, '字典'); |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
@ -224,7 +186,8 @@ function updateDictionary(targetArray, dictionaryType) {
|
|
|
|
|
.catch(() => {}) |
|
|
|
|
.finally(() => {}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const loading = ref(true); |
|
|
|
|
const formCopy = ref({}); //拷贝数据 |
|
|
|
|
const form = ref({ |
|
|
|
|
operatePrice: 0, //操作/装卸费 |
|
|
|
|
warehouseManagementPrice: 0, //仓储管理费 |
|
|
|
@ -232,26 +195,33 @@ const form = ref({
|
|
|
|
|
// 附加费 |
|
|
|
|
Surcharge: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '80', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'categoryId', type: 'select', width: '150', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
label: '产品品类', |
|
|
|
|
prop: 'categoryId', |
|
|
|
|
type: 'select', |
|
|
|
|
width: '150', |
|
|
|
|
disabled: true, |
|
|
|
|
show: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '仓储操作/装卸费', |
|
|
|
|
prop: 'operatePrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '仓储管理费', |
|
|
|
|
prop: 'warehouseManagementPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '仓储分货费', |
|
|
|
|
prop: 'warehouseSortPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -259,33 +229,40 @@ const form = ref({
|
|
|
|
|
// 按吨计费 |
|
|
|
|
publicTable: [ |
|
|
|
|
{ label: '序号', prop: 'index', type: 'string', width: '80', disabled: true }, |
|
|
|
|
{ label: '产品品类', prop: 'categoryId', type: 'select', width: '150', disabled: true }, |
|
|
|
|
{ |
|
|
|
|
label: '产品品类', |
|
|
|
|
prop: 'categoryId', |
|
|
|
|
type: 'select', |
|
|
|
|
width: '150', |
|
|
|
|
disabled: true, |
|
|
|
|
show: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '30天内', |
|
|
|
|
prop: 'withinThirtyPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '30天-60天', |
|
|
|
|
prop: 'betweenThirtySixtyPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '60天外', |
|
|
|
|
prop: 'beyondSixtyPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: '上限', |
|
|
|
|
prop: 'maximumPrice', |
|
|
|
|
type: 'number', |
|
|
|
|
width: '180', |
|
|
|
|
width: 'auto', |
|
|
|
|
disabled: true, |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
@ -293,14 +270,14 @@ const form = ref({
|
|
|
|
|
publicData: [], |
|
|
|
|
}); |
|
|
|
|
const onLoad = async () => { |
|
|
|
|
updateDictionary(Storagebillingtype.value, 'warehouse_pricing_type'); //仓储计费类型 |
|
|
|
|
updateDictionary(Warehousebillingmode.value, 'warehouse_pricing_mode'); //仓储计费模式 |
|
|
|
|
updateDictionary(CalculationBasis.value, 'warehouse_calculation_basis'); //计算基准 |
|
|
|
|
await Promise.all([ |
|
|
|
|
updateDictionary(Storagebillingtype.value, 'warehouse_pricing_type'), // 仓储计费类型 |
|
|
|
|
updateDictionary(Warehousebillingmode.value, 'warehouse_pricing_mode'), // 仓储计费模式 |
|
|
|
|
updateDictionary(CalculationBasis.value, 'warehouse_calculation_basis'), // 计算基准 |
|
|
|
|
]); |
|
|
|
|
// updateDictionary(Surchargepricingunit.value, 'warehouse_pricing_unit'); //附加费计价单位 |
|
|
|
|
// 价格回显 |
|
|
|
|
|
|
|
|
|
// 回显 |
|
|
|
|
if (props.templateData.request) { |
|
|
|
|
|
|
|
|
|
form.value.warehousePricingType = request.value.warehousePricingType; //计算类型 |
|
|
|
|
form.value.warehousePricingMode = request.value.warehousePricingMode; //计费模式 |
|
|
|
|
form.value.warehouseCalculationBasis = request.value.warehouseCalculationBasis; //计算基准 |
|
|
|
@ -328,13 +305,13 @@ const onLoad = async () => {
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}else{ |
|
|
|
|
} else { |
|
|
|
|
console.log('没有附加品类'); |
|
|
|
|
let data= requestInfo.value.additionalCategory[0] |
|
|
|
|
console.log(data,'data数据'); |
|
|
|
|
form.value.operatePrice=data.operatePrice |
|
|
|
|
form.value.warehouseManagementPrice=data.warehouseManagementPrice |
|
|
|
|
form.value.warehouseSortPrice=data.warehouseSortPrice |
|
|
|
|
let data = requestInfo.value.additionalCategory[0]; |
|
|
|
|
console.log(data, 'data数据'); |
|
|
|
|
form.value.operatePrice = data.operatePrice || 0; |
|
|
|
|
form.value.warehouseManagementPrice = data.warehouseManagementPrice || 0; |
|
|
|
|
form.value.warehouseSortPrice = data.warehouseSortPrice || 0; |
|
|
|
|
} |
|
|
|
|
form.value.publicData = []; //清空数据 |
|
|
|
|
// 仓储回显 |
|
|
|
@ -416,6 +393,46 @@ const onLoad = async () => {
|
|
|
|
|
handleFormUpdate(isByCategory, '(元/t)', '按吨计费(t)'); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
// 附加费是否有操作装/装卸费 |
|
|
|
|
if (!request.value.warehouseIsOperateFee) { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'operatePrice').disabled = false; |
|
|
|
|
} else { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'operatePrice').disabled = true; |
|
|
|
|
} |
|
|
|
|
// 附加费是否有仓储管理费 |
|
|
|
|
if (!request.value.warehouseIsManageFee) { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'warehouseManagementPrice').disabled = false; |
|
|
|
|
} else { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'warehouseManagementPrice').disabled = true; |
|
|
|
|
} |
|
|
|
|
// 附加费是否有仓储分货费 |
|
|
|
|
if (!request.value.warehouseIsSortFee) { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'warehouseSortPrice').disabled = false; |
|
|
|
|
} else { |
|
|
|
|
form.value.Surcharge.find(res => res.prop === 'warehouseSortPrice').disabled = true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// { |
|
|
|
|
// label: '仓储操作/装卸费', |
|
|
|
|
// prop: 'operatePrice', |
|
|
|
|
// type: 'number', |
|
|
|
|
// width: 'auto', |
|
|
|
|
// disabled: true, |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// label: '仓储管理费', |
|
|
|
|
// prop: 'warehouseManagementPrice', |
|
|
|
|
// type: 'number', |
|
|
|
|
// width: 'auto', |
|
|
|
|
// disabled: true, |
|
|
|
|
// }, |
|
|
|
|
// { |
|
|
|
|
// label: '仓储分货费', |
|
|
|
|
// prop: 'warehouseSortPrice', |
|
|
|
|
// type: 'number', |
|
|
|
|
// width: 'auto', |
|
|
|
|
// disabled: true, |
|
|
|
|
// }, |
|
|
|
|
|
|
|
|
|
// if(request.value.warehouseSubjoinFeeUnit==4){ |
|
|
|
|
// form.value.publicTable.forEach(res=>{ |
|
|
|
@ -467,45 +484,46 @@ const onLoad = async () => {
|
|
|
|
|
// } |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log(request.value, '初始化页面'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const price = async () => { |
|
|
|
|
|
|
|
|
|
// 价格处理 |
|
|
|
|
if (Object.keys(requestInfo.value).length > 0) { |
|
|
|
|
if (requestInfo.value.catergory && requestInfo.value.catergory.length) { |
|
|
|
|
// 仓储 |
|
|
|
|
requestInfo.value.catergory.forEach(res => { |
|
|
|
|
let data = form.value.publicData.find(temp => temp.categoryId == res.categoryId); |
|
|
|
|
if (data) { |
|
|
|
|
data.betweenThirtySixtyPrice = res.betweenThirtySixtyPrice; |
|
|
|
|
data.beyondSixtyPrice = res.beyondSixtyPrice; |
|
|
|
|
data.maximumPrice = res.maximumPrice; |
|
|
|
|
data.withinThirtyPrice = res.withinThirtyPrice; |
|
|
|
|
data.betweenThirtySixtyPrice = res.betweenThirtySixtyPrice || 0; |
|
|
|
|
data.beyondSixtyPrice = res.beyondSixtyPrice || 0; |
|
|
|
|
data.maximumPrice = res.maximumPrice || 0; |
|
|
|
|
data.withinThirtyPrice = res.withinThirtyPrice || 0; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
// 附加费(还差状态) |
|
|
|
|
// 附加费 |
|
|
|
|
if (requestInfo.value.additionalCategory && requestInfo.value.additionalCategory.length) { |
|
|
|
|
requestInfo.value.additionalCategory.forEach(res => { |
|
|
|
|
let data = form.value.SurchargeData.find(temp => temp.categoryId == res.categoryId); |
|
|
|
|
if (data) { |
|
|
|
|
data.operatePrice = res.operatePrice;//操作/装卸费 |
|
|
|
|
data.managementFee = res.managementFee; |
|
|
|
|
data.warehouseManagementPrice = res.warehouseManagementPrice;// 仓储管理费 |
|
|
|
|
data.warehouseSortPrice = res.warehouseSortPrice;//仓储分货费 |
|
|
|
|
data.operatePrice = res.operatePrice || 0; //操作/装卸费 |
|
|
|
|
data.managementFee = res.managementFee || 0; |
|
|
|
|
data.warehouseManagementPrice = res.warehouseManagementPrice || 0; // 仓储管理费 |
|
|
|
|
data.warehouseSortPrice = res.warehouseSortPrice || 0; //仓储分货费 |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
let setTime = setTimeout(async () => { |
|
|
|
|
formCopy.value = await deepClone(form.value); |
|
|
|
|
loading.value = false; |
|
|
|
|
clearTimeout(setTime); |
|
|
|
|
}, 500); |
|
|
|
|
console.log(request.value, '初始化页面'); |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
// 页面初始化 |
|
|
|
|
const pageonload = async () => { |
|
|
|
|
request.value = await deepClone(props.templateData.request); |
|
|
|
|
requestInfo.value = await deepClone(props.templateData.requestInfo.warehouse); |
|
|
|
|
onLoad(); //页面渲染 |
|
|
|
|
price(); //处理价格 |
|
|
|
|
}; |
|
|
|
|
pageonload(); |
|
|
|
|
const Surchargecd = computed(() => { |
|
|
|
@ -526,7 +544,24 @@ const Surchargecd = computed(() => {
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// 重置表单 |
|
|
|
|
const resetFormData = () => { |
|
|
|
|
ElMessageBox.confirm('是否重置数据?', '提示', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
loading.value = true; |
|
|
|
|
form.value = deepClone(formCopy.value); |
|
|
|
|
setTimeout(() => { |
|
|
|
|
loading.value = false; |
|
|
|
|
ElMessage({ |
|
|
|
|
message: '重置成功', |
|
|
|
|
type: 'success', |
|
|
|
|
}); |
|
|
|
|
}, 300); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// 保存数据 |
|
|
|
|
const handleSubmit = () => { |
|
|
|
|
let data = { |
|
|
|
@ -584,7 +619,6 @@ const handleSubmit = () => {
|
|
|
|
|
|
|
|
|
|
// 数据处理 |
|
|
|
|
if (!request.value.warehouseIsCategorySubjoin) { |
|
|
|
|
|
|
|
|
|
// 不存在填写统一单价 |
|
|
|
|
// data.warehouse['additionalCategory'].push({ |
|
|
|
|
// operatePrice: form.value.operatePrice, //操作/装卸费 |
|
|
|
@ -593,7 +627,7 @@ const handleSubmit = () => {
|
|
|
|
|
// name: 'fj', |
|
|
|
|
// }); |
|
|
|
|
let mox = data.warehouse['additionalCategory'].find(res => res.name == 'fj'); |
|
|
|
|
delete mox.name |
|
|
|
|
delete mox.name; |
|
|
|
|
if (!request.value.warehouseIsManageFee) { |
|
|
|
|
//删除管理费 |
|
|
|
|
delete mox.warehouseManagementPrice; |
|
|
|
|