Browse Source

修复模板已知bug

dev
马远东 1 week ago
parent
commit
c351a1c420
  1. 255
      src/views/financialsector/Financialse/FinancialWarehousing.vue

255
src/views/financialsector/Financialse/FinancialWarehousing.vue

@ -4,38 +4,18 @@
<div class="el_flex_box">
<div class="el_Storage">
<el-form-item label="仓储计费类型" prop="warehousePricingType">
<el-select
class="el_Cselect"
v-model="form.warehousePricingType"
filterable
clearable
placeholder="选择计费类型"
>
<el-option
v-for="item in Storagebillingtype"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select class="el_Cselect" v-model="form.warehousePricingType" filterable clearable placeholder="选择计费类型">
<el-option v-for="item in Storagebillingtype" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</div>
<!-- 仓储计费模式 -->
<div class="el_Storage">
<el-form-item label="仓储计费模式" prop="warehousePricingMode">
<el-select
class="el_Cselect"
v-model="form.warehousePricingMode"
filterable
clearable
placeholder="选择仓储计费模式"
>
<el-option
v-for="item in Warehousebillingmode"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select class="el_Cselect" v-model="form.warehousePricingMode" filterable clearable
placeholder="选择仓储计费模式">
<el-option v-for="item in Warehousebillingmode" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</div>
@ -54,17 +34,9 @@
<!-- 是否区分品类 -->
<div class="el_Storage">
<el-form-item label="是否区分品类">
<el-radio-group
@change="categoriesDisplayChange"
v-model="form.warehouseIsByCategory"
class="el_Cselect"
>
<el-radio
v-for="item in Distinguishcategories"
:key="item.label"
:label="item.value"
>{{ item.label }}</el-radio
>
<el-radio-group @change="categoriesDisplayChange" v-model="form.warehouseIsByCategory" class="el_Cselect">
<el-radio v-for="item in Distinguishcategories" :key="item.label" :label="item.value">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
@ -73,29 +45,21 @@
<!-- -->
<div class="el_Storage Storage-cont" v-if="form.warehouseIsByCategory" style="width: 24%">
<span class="el_table_span" style="margin-bottom: 18px">仓储品类配置</span>
<SurchargeTable
:SurchargeData="form.StoragecategoryData"
:Surcharge="Storagecategory"
@focus="handleRowFocus"
@search="search"
@change="selectChange"
>
<SurchargeTable :SurchargeData="form.StoragecategoryData" :Surcharge="Storagecategory" @focus="handleRowFocus"
@search="search" @change="selectChange">
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="eml_btn">
<span @click="storageplus" class="el_btn_a" v-if="slotProps.scope.row.plus">
<el-icon style="font-size: 12px; color: #409eff; margin-right: 3px"
><CirclePlus /></el-icon
>
<el-icon style="font-size: 12px; color: #409eff; margin-right: 3px">
<CirclePlus />
</el-icon>
</span>
<span
@click="storagereduce(slotProps.scope.row.index)"
class="el_btn_b"
v-if="slotProps.scope.row.reduce"
>
<el-icon style="font-size: 12px; color: #f00; margin-right: 3px"
><Delete /></el-icon
>删除
<span @click="storagereduce(slotProps.scope.row.index)" class="el_btn_b"
v-if="slotProps.scope.row.reduce">
<el-icon style="font-size: 12px; color: #f00; margin-right: 3px">
<Delete />
</el-icon>
</span>
</div>
</template>
@ -113,37 +77,19 @@
<div style="width: 100%">
<div class="el_Storage">
<el-form-item label="是否附加费">
<el-radio-group
v-model="form.warehouseIsAddFee"
class="el_Cselect"
@change="iswarehouseIsAddFee"
>
<el-radio
v-for="item in warehouseIsAddFeeList"
:key="item.label"
:label="item.value"
>{{ item.label }}</el-radio
>
<el-radio-group v-model="form.warehouseIsAddFee" class="el_Cselect" @change="iswarehouseIsAddFee">
<el-radio v-for="item in warehouseIsAddFeeList" :key="item.label" :label="item.value">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
</div>
<div class="el_Storage" v-if="form.warehouseIsAddFee">
<el-form-item label="附加费计价单位" prop="warehouseSubjoinFeeUnit">
<el-select
class="el_Cselect"
v-model="form.warehouseSubjoinFeeUnit"
filterable
clearable
placeholder="选择计费类型"
style="width: 100%"
>
<el-option
v-for="item in Surchargepricingunit"
:key="item.value"
:label="item.label"
:value="item.value"
/>
<el-select class="el_Cselect" v-model="form.warehouseSubjoinFeeUnit" filterable clearable
placeholder="选择计费类型" style="width: 100%">
<el-option v-for="item in Surchargepricingunit" :key="item.value" :label="item.label"
:value="item.value" />
</el-select>
</el-form-item>
</div>
@ -163,12 +109,8 @@
<div class="el_Storage" v-if="form.warehouseIsAddFee">
<el-form-item label="是否有操作/装卸费">
<el-radio-group v-model="form.warehouseIsOperateFee" class="el_Cselect">
<el-radio
v-for="item in Operatingunloading"
:key="item.label"
:label="item.value"
>{{ item.label }}</el-radio
>
<el-radio v-for="item in Operatingunloading" :key="item.label" :label="item.value">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
@ -188,17 +130,10 @@
<!-- 附加费用是否统一计费 -->
<div class="el_Storage" v-if="form.warehouseIsAddFee">
<el-form-item label="附加费是否按品类计费">
<el-radio-group
@change="AdditionalDisplayChange"
v-model="form.warehouseIsCategorySubjoin"
class="el_Cselect"
>
<el-radio
v-for="item in Additionalfeebilling"
:key="item.label"
:label="item.value"
>{{ item.label }}</el-radio
>
<el-radio-group @change="AdditionalDisplayChange" v-model="form.warehouseIsCategorySubjoin"
class="el_Cselect">
<el-radio v-for="item in Additionalfeebilling" :key="item.label" :label="item.value">{{ item.label
}}</el-radio>
</el-radio-group>
</el-form-item>
</div>
@ -208,26 +143,21 @@
<div class="Storage-cont">
<span class="el_table_span">附加费品类配置</span>
<!-- 表格 -->
<SurchargeTable
:SurchargeData="form.AdditionalcategoriesData"
:Surcharge="Additionalcategories"
@focus="handleRowFocus"
@search="search"
@change="wxselectChange"
>
<SurchargeTable :SurchargeData="form.AdditionalcategoriesData" :Surcharge="Additionalcategories"
@focus="handleRowFocus" @search="search" @change="wxselectChange">
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="eml_btn">
<span @click="categoriesplus" class="el_btn_a" v-if="slotProps.scope.row.plus">
<el-icon style="color: #409eff; margin-right: 3px"><CirclePlus /></el-icon
>新增
<el-icon style="color: #409eff; margin-right: 3px">
<CirclePlus />
</el-icon>
</span>
<span
@click="categoriesduce(slotProps.scope.row.index)"
class="el_btn_b"
v-if="slotProps.scope.row.reduce"
>
<el-icon style="color: #f00; margin-right: 3px"><Delete /></el-icon>
<span @click="categoriesduce(slotProps.scope.row.index)" class="el_btn_b"
v-if="slotProps.scope.row.reduce">
<el-icon style="color: #f00; margin-right: 3px">
<Delete />
</el-icon>
</span>
</div>
</template>
@ -366,7 +296,7 @@ const search = val => {
}
}
})
.catch(res => {})
.catch(res => { })
.finally(() => {
SelectData.value.loading = false;
});
@ -579,8 +509,8 @@ const iswarehouseIsAddFee = () => {
form.value.warehouseIsOperateFee = 0; ///
form.value.warehouseIsSortFee = 0; //
form.value.warehouseIsCategorySubjoin = 0; //
//
form.value.AdditionalcategoriesData=[
//
form.value.AdditionalcategoriesData = [
{
index: 1,
warehousePieceCategory: '',
@ -619,8 +549,8 @@ async function updateDictionary(targetArray, dictionaryType) {
warehouseIsAddFeeList.value = { ...Distinguishcategories.value };
}
})
.catch(() => {})
.finally(() => {});
.catch(() => { })
.finally(() => { });
}
/** 重置数据 */
@ -664,39 +594,45 @@ const onLoad = async () => {
if (request.warehouseIsByCategory == 1) {
form.value.StoragecategoryData = [];
request.warehousePieceCategorys.forEach((res, index) => {
form.value.StoragecategoryData.push({
index: index + 1,
plus: !index ? true : false,
reduce: index ? true : false,
StateName: 'storage', //
warehousePieceCategory: res.id,
loading: false,
options: [
{
label: res.name,
value: res.id,
},
],
});
request.warehousePieceCategorys.forEach((item, index) => {
if (item) {
form.value.StoragecategoryData.push({
index: index + 1,
plus: !index ? true : false,
reduce: index ? true : false,
StateName: 'storage', //
warehousePieceCategory: item.id,
loading: false,
options: [
{
label: item.name,
value: item.id,
},
],
});
}
});
}
if (request.warehouseIsCategorySubjoin == 1) {
form.value.AdditionalcategoriesData = [];
request.warehouseSubjoinCategorys.forEach((res, index) => {
form.value.AdditionalcategoriesData.push({
index: index + 1,
plus: !index ? true : false,
reduce: index ? true : false,
StateName: 'additional', //
warehousePieceCategory: res.id,
options: [
{
label: res.name,
value: res.id,
},
],
});
request.warehouseSubjoinCategorys.forEach((item, index) => {
if (item) {
form.value.AdditionalcategoriesData.push({
index: index + 1,
plus: !index ? true : false,
reduce: index ? true : false,
StateName: 'additional', //
warehousePieceCategory: item.id,
options: [
{
label: item.name,
value: item.id,
},
],
});
}
});
}
form.value.warehouseCalculationBasis = request.warehouseCalculationBasis || 1; //
@ -878,48 +814,59 @@ const AdditionalDisplayChange = val => {
.content_max {
padding: 10px;
}
.el_Storage {
margin-bottom: 30px;
.el_Cselect {
margin-left: 10px;
}
.el_table_span {
font-size: 16px;
font-weight: 500;
display: inline-block;
width: 160px;
}
.Storage-cont {
display: flex;
flex-direction: column;
}
}
.el_hr {
height: 1px;
background-color: #378cbe;
border: none;
border-radius: 10px;
}
.el_Surcharge_title {
margin-bottom: 10px;
}
.el_Surcharge {
.el_Storage {
width: 24%;
display: flex;
flex-direction: column;
.el_Cselect {
margin-left: 0;
background-color: #f5f5f6;
}
}
.el_flex_row {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.el-form-item {
flex-direction: column;
margin-right: 0;
.el-radio-group {
width: 100%;
padding: 0 10px;
@ -927,24 +874,30 @@ const AdditionalDisplayChange = val => {
}
}
}
.el_submit {
width: 100%;
display: flex;
justify-content: flex-end;
}
.el_flex {
display: flex;
.el_Cselect {
margin-left: 0;
}
}
.el_flex_box {
display: flex;
justify-content: space-between;
.el-form-item {
flex-direction: column;
margin-right: 0;
}
.el_Storage {
width: 24%;
display: flex;
@ -958,26 +911,31 @@ const AdditionalDisplayChange = val => {
}
}
}
.el_btn_a,
.el_btn_b {
font-size: 14px;
display: flex;
align-items: center;
cursor: pointer;
.el-icon {
font-size: 14px;
}
}
:deep(.el_row_table) {
thead {
th {
background-color: #f5f8fa;
color: #172e60;
}
.cell {
padding: 0 10px;
}
}
tbody {
.el-table tr:hover {
background-color: transparent;
@ -986,8 +944,10 @@ const AdditionalDisplayChange = val => {
.cell {
text-align: center;
padding: 0 10px;
.el-input-number {
width: 100%;
.el-input__wrapper {
box-shadow: none;
}
@ -999,15 +959,18 @@ const AdditionalDisplayChange = val => {
}
}
}
.eml_btn {
display: flex;
justify-content: space-evenly;
align-items: center;
}
.el_Storage {
.el-form-item {
flex-direction: column;
margin-right: 0;
.el-radio-group {
width: 100%;
padding: 0 10px;

Loading…
Cancel
Save