提交 1ffe6590 编写于 作者: ibizdev's avatar ibizdev

ShineKOT 发布系统代码 [后台服务,演示应用]

上级 0c784557
...@@ -185,6 +185,7 @@ export default { ...@@ -185,6 +185,7 @@ export default {
type: "图书类型", type: "图书类型",
press: "图书出版社", press: "图书出版社",
price: "图书价格", price: "图书价格",
booknumber: "图书数量",
}, },
nodata:"", nodata:"",
uiactions: { uiactions: {
......
...@@ -184,6 +184,7 @@ export default { ...@@ -184,6 +184,7 @@ export default {
type: "图书类型", type: "图书类型",
press: "图书出版社", press: "图书出版社",
price: "图书价格", price: "图书价格",
booknumber: "图书数量",
}, },
nodata:"", nodata:"",
uiactions: { uiactions: {
......
...@@ -160,6 +160,33 @@ ...@@ -160,6 +160,33 @@
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<template v-if="getColumnState('booknumber')">
<el-table-column show-overflow-tooltip :prop="'booknumber'" :label="$t('entities.ibizbook.rowrules_grid.columns.booknumber')" :width="100" :align="'left'" :sortable="'custom'">
<template v-slot:header="{column}">
<span class="column-header ">
{{$t('entities.ibizbook.rowrules_grid.columns.booknumber')}}
</span>
</template>
<template v-slot="{row,column,$index}">
<template v-if="actualIsOpenEdit && !row.children">
<app-form-item :error="gridItemsModel[$index][column.property].error">
<input-box
:disabled="getColumnDisabled(row,column.property)"
v-model="row[column.property]"
type="number"
:precision="0"
style=""
@change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
</input-box>
</app-form-item>
</template>
<template v-if="!actualIsOpenEdit">
<app-span name='booknumber' editorType="NUMBER" :value="row.booknumber" dataType="INT" precision="0" ></app-span>
</template>
</template>
</el-table-column>
</template>
<template v-if="adaptiveState"> <template v-if="adaptiveState">
<el-table-column></el-table-column> <el-table-column></el-table-column>
</template> </template>
...@@ -639,7 +666,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -639,7 +666,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
* *
* @memberof RowRulesBase * @memberof RowRulesBase
*/ */
public defaultUpdateItems:Array<any> =[,,,,,]; public defaultUpdateItems:Array<any> =[,,,,,,];
/** /**
* 选中行数据 * 选中行数据
...@@ -762,6 +789,15 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -762,6 +789,15 @@ export default class RowRulesBase extends Vue implements ControlInterface {
isEnableRowEdit: true, isEnableRowEdit: true,
enableCond: 3 , enableCond: 3 ,
}, },
{
name: 'booknumber',
label: '图书数量',
langtag: 'entities.ibizbook.rowrules_grid.columns.booknumber',
show: true,
unit: 'PX',
isEnableRowEdit: true,
enableCond: 3 ,
},
] ]
/** /**
...@@ -852,6 +888,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -852,6 +888,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
press: new FormItemModel(), press: new FormItemModel(),
ibizbookname: new FormItemModel(), ibizbookname: new FormItemModel(),
price: new FormItemModel(), price: new FormItemModel(),
booknumber: new FormItemModel(),
type: new FormItemModel(), type: new FormItemModel(),
srfkey: new FormItemModel(), srfkey: new FormItemModel(),
} }
...@@ -864,6 +901,27 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -864,6 +901,27 @@ export default class RowRulesBase extends Vue implements ControlInterface {
* @memberof RowRulesBase * @memberof RowRulesBase
*/ */
public deRules:any = { public deRules:any = {
booknumber:[
{
type:"SIMPLE",
condOP:"GT",
ruleInfo:"",
isKeyCond:false,
paramValue:"0",
isNotMode:false,
deName:"booknumber",
},
],
author:[
{
type:"SIMPLE",
condOP:"ISNOTNULL",
ruleInfo:"",
isKeyCond:false,
isNotMode:false,
deName:"author",
},
],
}; };
/** /**
...@@ -876,6 +934,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -876,6 +934,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
author: [ author: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书作者 值不能为空', trigger: 'change' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书作者 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书作者 值不能为空', trigger: 'blur' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书作者 值不能为空', trigger: 'blur' },
{validator:(rule:any, value:any, callback:any)=>{return this.verifyDeRules("author",this.deRules,"AND",value).isPast},message: "作者名非空", trigger: 'blur' },
], ],
press: [ press: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书出版社 值不能为空', trigger: 'change' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书出版社 值不能为空', trigger: 'change' },
...@@ -889,6 +948,11 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -889,6 +948,11 @@ export default class RowRulesBase extends Vue implements ControlInterface {
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书价格 值不能为空', trigger: 'change' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书价格 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书价格 值不能为空', trigger: 'blur' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书价格 值不能为空', trigger: 'blur' },
], ],
booknumber: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书数量 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书数量 值不能为空', trigger: 'blur' },
{validator:(rule:any, value:any, callback:any)=>{return this.verifyDeRules("booknumber",this.deRules,"AND",value).isPast},message: "图书数量大于0", trigger: 'blur' },
],
type: [ type: [
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书类型 值不能为空', trigger: 'change' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书类型 值不能为空', trigger: 'change' },
{ required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书类型 值不能为空', trigger: 'blur' }, { required: false, validator: (rule:any, value:any, callback:any) => { return (rule.required && (value === null || value === undefined || value === "")) ? false : true;}, message: '图书类型 值不能为空', trigger: 'blur' },
...@@ -1484,7 +1548,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -1484,7 +1548,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
* @memberof RowRulesBase * @memberof RowRulesBase
*/ */
public arraySpanMethod({row, column, rowIndex, columnIndex} : any) { public arraySpanMethod({row, column, rowIndex, columnIndex} : any) {
let allColumns:Array<any> = ['ibizbookname','author','type','press','price']; let allColumns:Array<any> = ['ibizbookname','author','type','press','price','booknumber'];
if(row && row.children) { if(row && row.children) {
if(columnIndex == (this.isSingleSelect ? 0:1)) { if(columnIndex == (this.isSingleSelect ? 0:1)) {
return [1, allColumns.length+1]; return [1, allColumns.length+1];
...@@ -1569,6 +1633,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -1569,6 +1633,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
type:'', type:'',
press:'', press:'',
price:'', price:'',
booknumber:'',
children: children children: children
} }
groupTree.push(tree); groupTree.push(tree);
...@@ -1601,6 +1666,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -1601,6 +1666,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
type:'', type:'',
press:'', press:'',
price:'', price:'',
booknumber:'',
children: child children: child
} }
if(child && child.length > 0){ if(child && child.length > 0){
...@@ -1666,6 +1732,7 @@ export default class RowRulesBase extends Vue implements ControlInterface { ...@@ -1666,6 +1732,7 @@ export default class RowRulesBase extends Vue implements ControlInterface {
type:'', type:'',
press:'', press:'',
price:'', price:'',
booknumber:'',
children: children, children: children,
} }
groupTree.push(tree); groupTree.push(tree);
......
...@@ -50,6 +50,12 @@ export default class RowRulesModel { ...@@ -50,6 +50,12 @@ export default class RowRulesModel {
dataType: 'CURRENCY', dataType: 'CURRENCY',
isEditable:true isEditable:true
}, },
{
name: 'booknumber',
prop: 'booknumber',
dataType: 'INT',
isEditable:true
},
{ {
name: 'ibizbookid', name: 'ibizbookid',
prop: 'ibizbookid', prop: 'ibizbookid',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册