更新回格式化的处理

This commit is contained in:
zxx 2023-10-16 11:00:39 +08:00
parent e10b2f355d
commit 7d3db0078a
3 changed files with 13 additions and 10 deletions

View File

@ -164,11 +164,6 @@ VXETable.formats.mixin({
return parseFloat(cellValue).toFixed(2) + "%";
},
formatProduction({ cellValue }) { // 百分比的形式显示
if (cellValue === 0) return '未布产';
if (!cellValue) return '';
return '已布产';
},
})
VXETable.renderer.add('enum', {

View File

@ -13,7 +13,12 @@
<vxe-column field="mold_scheme" title="模型名" width="160" :params="editor_scheme" formatter="formatRef"></vxe-column>
<vxe-column field="mold_scheme" title="模型编码" width="160" :params="{dataType:'object',valueField: 'id',textField: 'code'}" formatter="formatRef"></vxe-column>
<vxe-column field="production_id" title="布产状态" width="160" formatter="formatProduction"></vxe-column>
<vxe-column field="production_id" title="布产状态" width="160" >
<template #default="{ row }">
<span v-if="row.production_id === 0"> 未布产</span>
<span v-if="row.production_id > 0">已布产</span>
</template>
</vxe-column>
<vxe-column field="progress" title="进度" width="160" :cellRender="{ name: 'progress' }"></vxe-column>
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
formatter='formatEnum'></vxe-column>

View File

@ -32,6 +32,7 @@
<script>
import BASE_URL from '@/services/mes/api.js';
const settings = require('../basic/settings.js');
export default {
i18n: require("./i18n"),
@ -112,6 +113,7 @@ export default {
searchFormData: {
title: '',
desc: '',
is_complete: '0',
},
//
searchRules: [
@ -124,9 +126,9 @@ export default {
searchFormItems: [ //
{ field: 'code', title: '编码', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
{ field: 'code', title: '编码', span: 3, itemRender: { name: '$input', props: { placeholder: '请输入编码' } } },
{ field: 'customer_name', title: '客户名称', span: 4, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
{ field: 'is_complete', title: '完成状态', span: 2, itemRender: { name: '$input', props: { placeholder: '请输入客户名称' } } },
{
title: '模具师傅', span:4,
field: 'mold_master_uid',
@ -146,7 +148,7 @@ export default {
}
},
{
title: '工程师傅', span: 4,
title: '工程师傅', span: 3,
field: 'engineer_uid',
dataRule: {
fromField: "id"
@ -164,7 +166,7 @@ export default {
}
},
{
title: '订单', span: 4,
title: '订单', span: 3,
field: 'order_id',
dataRule: {
fromField: "id"
@ -181,6 +183,7 @@ export default {
}
}
},
{ field: 'is_complete', title: '状态', span: 3, itemRender: { name: '$select', props: { options: settings.options_is_complete } } },
{
align: 'right', span: 4, itemRender: { //