Commit 40aa3ca7 authored by hiyon's avatar hiyon

销售订单修改

parent 64aaf36f
<template>
<el-form ref="form" class="sap-form" :label-width="labelWidth" size="mini">
<SapFormContext v-for="item in sapFieldList" v-model="sapForm[item.sapField]" :item="item" :key="item.id" :label-width="labelWidth"/>
<template v-for="item in sapFieldList">
<SapFormContext v-show="item.show" v-model="sapForm[item.sapField]" :item="item" :key="item.id" :label-width="labelWidth"/>
</template>
<div class="form-footer">
<el-button type="primary" @click="onConfirm">确认</el-button>
</div>
......@@ -65,7 +67,7 @@ export default {
sapForm[item.sapField][j] = this.initSapForm(item.children, subItemData)
}
} else {
sapForm[item.sapField] = itemData
sapForm[item.sapField] = itemData || item.defaultValue
}
}
return sapForm
......
......@@ -11,7 +11,7 @@
<!-- 对象 -->
<template v-if="item.dataType === 9">
<template v-for="child in item.children">
<sap-form-item :item="child" :label-width="labelWidth">
<sap-form-item v-show="child.show" :item="child" :label-width="labelWidth">
<el-input-all v-model="value[child.sapField]" :item="child"/>
</sap-form-item>
</template>
......@@ -22,13 +22,15 @@
<div style="width: 100%; overflow-x: auto">
<div>
<div class="item-head clearfix" style="width: max-content;">
<div v-for="child in item.children" :key="child.id + 'head'" class="item-label">{{ child.name }}</div>
<template v-for="child in item.children">
<div v-show="child.show" :key="child.id + 'head'" class="item-label">{{ child.name }}</div>
</template>
</div>
<template v-for="(sub, i) in value"><!-- ITEM -->
<div class="item-content" style="width: max-content;" :key="'sub' + '' + i">
<template v-for="(child, j) in item.children">
<div v-if="[1,2,3,4,5,6,7,8].some(dataType => dataType == child.dataType)" class="item-value" :key="child.id + j">
<sap-form-item :item="child" :label-width="labelWidth">
<div v-show="child.show" v-if="[1,2,3,4,5,6,7,8].some(dataType => dataType == child.dataType)" class="item-value" :key="child.id + j">
<sap-form-item :item="child" label-width="0px">
<el-input-all v-model="sub[child.sapField]" :item="child"/>
</sap-form-item>
</div>
......@@ -43,7 +45,7 @@
<!-- SIZE -->
<div v-for="leaf in sub[child.sapField]" class="item-child-content clearfix" style="width: max-content;">
<div v-for="(son, j) in child.children" class="item-value" :key="son.id + '' + j">
<sap-form-item :item="son" :label-width="labelWidth">
<sap-form-item :item="son" label-width="0px">
<el-input-all v-model="leaf[son.sapField]" :item="son"/>
</sap-form-item>
</div>
......@@ -121,8 +123,9 @@ export default {
}
.item-label, .item-value, .item-sub-label {
width: 150px;
height: 50px;
line-height: 28px;
float: left;
line-height: 50px;
overflow: hidden;
text-wrap: nowrap;
margin-left: 10px;
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment