This commit is contained in:
parent
e1ddcc0314
commit
73c798e27a
|
|
@ -11,6 +11,7 @@
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
|
||||||
<vxe-grid :keyboard-config="{ isArrow: true }" auto-resize height="400" ref="xgrid"
|
<vxe-grid :keyboard-config="{ isArrow: true }" auto-resize height="400" ref="xgrid"
|
||||||
|
|
||||||
:row-config="{ isCurrent: true, isHover: true }" :loading="loading" :pager-config="tablePage" :data="tableData"
|
:row-config="{ isCurrent: true, isHover: true }" :loading="loading" :pager-config="tablePage" :data="tableData"
|
||||||
:columns="tableColumn" @cell-dblclick="dblClickEvent" @cell-click="selectEvent" @page-change="pageChangeEvent">
|
:columns="tableColumn" @cell-dblclick="dblClickEvent" @cell-click="selectEvent" @page-change="pageChangeEvent">
|
||||||
</vxe-grid>
|
</vxe-grid>
|
||||||
|
|
@ -154,6 +155,10 @@ export default {
|
||||||
|
|
||||||
this.tablePage.total = data.total;
|
this.tablePage.total = data.total;
|
||||||
this.tableData = data[this.listdataFieldName];
|
this.tableData = data[this.listdataFieldName];
|
||||||
|
|
||||||
|
if(column.params.extendData){
|
||||||
|
this.tableData = [...column.params.extendData,...this.tableData];
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData(key) {
|
getData(key) {
|
||||||
|
|
|
||||||
|
|
@ -383,10 +383,10 @@
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
||||||
<vxe-column width="60" v-if="!isReadonly">
|
<vxe-column width="60" v-if="!isReadonly">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2" v-if="!row.isMain && !row.isBanding">
|
<div class="oplinks2">
|
||||||
<a @click.stop="material_pageAdd(row)" title="新增">
|
<a @click.stop="material_pageAdd(row)" title="新增">
|
||||||
<a-icon type="plus-circle" />
|
<a-icon type="plus-circle" />
|
||||||
</a>
|
</a>
|
||||||
<a @click.stop="material_pageDelete(row)" title="删除">
|
<a @click.stop="material_pageDelete(row)" title="删除">
|
||||||
<a-icon type="delete" />
|
<a-icon type="delete" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -394,10 +394,11 @@
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="quantity_formula" title="总用量" width="200"
|
||||||
|
:params="{hasTotalQuantity:true}" :edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
|
|
@ -551,7 +552,7 @@
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: paintMaterial_beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: paintMaterial_beforeEditMethod }">
|
||||||
<vxe-column width="60" v-if="!isReadonly">
|
<vxe-column width="60" v-if="!isReadonly">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2" v-if="!row.isMain && !row.isBanding">
|
<div class="oplinks2">
|
||||||
<a @click.stop="paintMaterial_pageAdd(row)" title="新增">
|
<a @click.stop="paintMaterial_pageAdd(row)" title="新增">
|
||||||
<a-icon type="plus-circle" />
|
<a-icon type="plus-circle" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -562,10 +563,11 @@
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="quantity_formula" title="总用量" width="200"
|
||||||
|
:params="{hasTotalQuantity:true}" :edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
|
|
@ -713,7 +715,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div class="footerbar">
|
<div class="footerbar">
|
||||||
<a-button type="primary" @click="ok">保存</a-button>
|
<a-button type="primary" @click="ok" v-if="!isPreview">保存</a-button>
|
||||||
<a-button @click="cancel">关闭</a-button>
|
<a-button @click="cancel">关闭</a-button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -721,6 +723,7 @@
|
||||||
v-model="modalVisible" @confirm="confirmSelectScheme">
|
v-model="modalVisible" @confirm="confirmSelectScheme">
|
||||||
<template #default>
|
<template #default>
|
||||||
<vxe-grid :keyboard-config="{ isArrow: true }" auto-resize height="400" ref="scheme_grid"
|
<vxe-grid :keyboard-config="{ isArrow: true }" auto-resize height="400" ref="scheme_grid"
|
||||||
|
@cell-dblclick="dblClickEvent"
|
||||||
:row-config="{ isCurrent: true, isHover: true }" :loading="scheme_loading" :pager-config="scheme_tablePage"
|
:row-config="{ isCurrent: true, isHover: true }" :loading="scheme_loading" :pager-config="scheme_tablePage"
|
||||||
:data="scheme_tableData" :columns="scheme_tableColumn" @page-change="scheme_pageChangeEvent">
|
:data="scheme_tableData" :columns="scheme_tableColumn" @page-change="scheme_pageChangeEvent">
|
||||||
</vxe-grid>
|
</vxe-grid>
|
||||||
|
|
@ -775,6 +778,7 @@ export default {
|
||||||
showExp: false,
|
showExp: false,
|
||||||
showType: "1",
|
showType: "1",
|
||||||
modalVisible: false,
|
modalVisible: false,
|
||||||
|
isPreview:false,
|
||||||
scheme_loading: false, // 加载中
|
scheme_loading: false, // 加载中
|
||||||
scheme_tableData: [], // 表格数据
|
scheme_tableData: [], // 表格数据
|
||||||
scheme_tableColumn: [ // 表格列
|
scheme_tableColumn: [ // 表格列
|
||||||
|
|
@ -817,6 +821,19 @@ export default {
|
||||||
searchFieldNames: ['name'],
|
searchFieldNames: ['name'],
|
||||||
textField: 'name'
|
textField: 'name'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
editorMaterial2: {
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`,
|
||||||
|
listdataFieldName: 'BathroomMaterial',
|
||||||
|
columns: [
|
||||||
|
{ field: 'name', title: '名称' },
|
||||||
|
{ field: 'remark', title: '备注' }
|
||||||
|
],
|
||||||
|
placeholder: "请输入名称",
|
||||||
|
searchFieldNames: ['name'],
|
||||||
|
extendData : [{id:'封边条', name : '封边条'}],
|
||||||
|
textField: 'name'
|
||||||
|
},
|
||||||
editorBanding: {
|
editorBanding: {
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
||||||
listdataFieldName: 'BathroomBanding',
|
listdataFieldName: 'BathroomBanding',
|
||||||
|
|
@ -1113,9 +1130,12 @@ export default {
|
||||||
|
|
||||||
// 获取路由的id参数
|
// 获取路由的id参数
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
|
if(dataId && dataId.indexOf && dataId.indexOf('d') == 0){
|
||||||
|
this.isPreview = true;
|
||||||
|
this.loadSchemeDataById(dataId.substr(1));
|
||||||
|
}
|
||||||
// 如果有id参数,说明是编辑模式
|
// 如果有id参数,说明是编辑模式
|
||||||
if (dataId) {
|
else if (dataId) {
|
||||||
const json = `{"id":${dataId}}`;
|
const json = `{"id":${dataId}}`;
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
url: this.actions.get,
|
url: this.actions.get,
|
||||||
|
|
@ -1209,7 +1229,6 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
console.log(this.fittings_detailsData)
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
@ -1338,9 +1357,36 @@ export default {
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
this.scheme_load();
|
this.scheme_load();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
dblClickEvent( ) {
|
||||||
|
this.confirmSelectScheme();
|
||||||
|
},
|
||||||
confirmSelectScheme() {
|
confirmSelectScheme() {
|
||||||
let row = this.$refs.scheme_grid.getCurrentRecord(); // 获取当前行
|
let row = this.$refs.scheme_grid.getCurrentRecord(); // 获取当前行
|
||||||
|
|
||||||
|
this.loadSchemeData(row);
|
||||||
|
|
||||||
|
this.modalVisible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
loadSchemeDataById(dataId){
|
||||||
|
const json = `{"id":${dataId}}`;
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/detail`,
|
||||||
|
loading: "加载中...",
|
||||||
|
data: json,
|
||||||
|
config: {
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).then(a => {
|
||||||
|
|
||||||
|
this.loadSchemeData(a.data.bathroom_scheme);
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
loadSchemeData(row){
|
||||||
|
|
||||||
let scheme_id = row.id.toString()
|
let scheme_id = row.id.toString()
|
||||||
|
|
||||||
|
|
@ -1394,8 +1440,6 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.modalVisible = false;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//把来源数据添加到目标表格数据
|
//把来源数据添加到目标表格数据
|
||||||
|
|
@ -1768,12 +1812,6 @@ export default {
|
||||||
},
|
},
|
||||||
material_beforeEditMethod({ column, row }) {
|
material_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
material_afterEditEvent({ column, row }) {
|
material_afterEditEvent({ column, row }) {
|
||||||
|
|
@ -1946,13 +1984,6 @@ export default {
|
||||||
},
|
},
|
||||||
paintMaterial_beforeEditMethod({ column, row }) {
|
paintMaterial_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
|
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
paintMaterial_afterEditEvent({ column, row }) {
|
paintMaterial_afterEditEvent({ column, row }) {
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="fittings" title="部件" width="160" :params="editorFittings" formatter="formatRef"
|
<vxe-column field="fittings" title="部件" width="160" :params="editorFittings" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
<vxe-column field="material" title="材料(免漆)" width="160" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料(免漆)" width="160" :params="editorMaterial" formatter="formatRef"
|
||||||
|
|
@ -55,8 +55,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.long_formula || '' }}
|
{{ row.long_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.long, 0)"></span>
|
<span v-else v-html="formatShowNumber(row.long, 0)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="width_formula" title="宽" width="160" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="width_formula" title="宽" width="160" :edit-render="{ name: 'EditExpressions' }">
|
||||||
|
|
@ -68,8 +68,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.width_formula || '' }}
|
{{ row.width_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.width, 0)"></span>
|
<span v-else v-html="formatShowNumber(row.width, 0)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="height_formula" title="厚" width="160" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="height_formula" title="厚" width="160" :edit-render="{ name: 'EditExpressions' }">
|
||||||
|
|
@ -82,8 +82,8 @@
|
||||||
{{ row.height_formula || '' }}
|
{{ row.height_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-else v-html="formatShowNumber(row.height, 0)"></span>
|
<span v-else v-html="formatShowNumber(row.height, 0)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="quantity" title="数量" width="80"
|
<vxe-column field="quantity" title="数量" width="80"
|
||||||
|
|
@ -100,12 +100,12 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.seal_formula || '' }}
|
{{ row.seal_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.seal, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.seal, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="rate_materials" title="主材利用率" width="80"
|
<vxe-column field="rate_materials" title="主材利用率" width="80"
|
||||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||||
<vxe-column field="paint_number" title="油漆面" width="80"
|
<vxe-column field="paint_number" title="油漆面" width="80"
|
||||||
|
|
@ -118,9 +118,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.board_length_formula || '' }}
|
{{ row.board_length_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.board_length, 3)"></span>
|
<span v-else v-html="formatShowNumber(row.board_length, 3)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
@ -171,7 +171,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="parts" title="配件" width="260" :params="editorParts" formatter="formatRef"
|
<vxe-column field="parts" title="配件" width="260" :params="editorParts" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
<vxe-column field="spec" title="规格" width="120" :edit-render="{ name: '$input' }"></vxe-column>
|
<vxe-column field="spec" title="规格" width="120" :edit-render="{ name: '$input' }"></vxe-column>
|
||||||
|
|
@ -188,10 +188,10 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
@ -225,7 +225,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="packaging" title="包装" width="260" :params="editorPackaging" formatter="formatRef"
|
<vxe-column field="packaging" title="包装" width="260" :params="editorPackaging" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
<vxe-column field="long_formula" title="长" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="long_formula" title="长" width="200" :edit-render="{ name: 'EditExpressions' }">
|
||||||
|
|
@ -238,8 +238,8 @@
|
||||||
{{ row.long_formula || '' }}
|
{{ row.long_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span v-else v-html="formatShowNumber(row.long, 1)"></span>
|
<span v-else v-html="formatShowNumber(row.long, 1)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="width_formula" title="宽" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="width_formula" title="宽" width="200" :edit-render="{ name: 'EditExpressions' }">
|
||||||
|
|
@ -250,10 +250,10 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.width_formula || '' }}
|
{{ row.width_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.width, 1)"></span>
|
<span v-else v-html="formatShowNumber(row.width, 1)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="height_formula" title="高" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="height_formula" title="高" width="200" :edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -263,9 +263,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.height_formula || '' }}
|
{{ row.height_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.height, 1)"></span>
|
<span v-else v-html="formatShowNumber(row.height, 1)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -277,9 +277,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.quantity_formula || '' }}
|
{{ row.quantity_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.quantity, 1)"></span>
|
<span v-else v-html="formatShowNumber(row.quantity, 1)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="price" title="单价" width="120"
|
<vxe-column field="price" title="单价" width="120"
|
||||||
|
|
@ -292,9 +292,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -324,7 +324,7 @@
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
||||||
<vxe-column width="60" v-if="!isReadonly">
|
<vxe-column width="60" v-if="!isReadonly">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2" v-if="!row.isMain && !row.isBanding">
|
<div class="oplinks2">
|
||||||
<a @click.stop="material_pageAdd(row)" title="新增">
|
<a @click.stop="material_pageAdd(row)" title="新增">
|
||||||
<a-icon type="plus-circle" />
|
<a-icon type="plus-circle" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -334,11 +334,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="quantity_formula" title="总用量" width="200" :params="{ hasTotalQuantity: true }"
|
||||||
|
:edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
|
|
@ -347,8 +348,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.quantity_formula || '' }}
|
{{ row.quantity_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.quantity, 3)"></span>
|
<span v-else v-html="formatShowNumber(row.quantity, 3)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
@ -363,8 +364,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -397,7 +398,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="labor" title="项目" width="260" :params="editorLabor" formatter="formatRef"
|
<vxe-column field="labor" title="项目" width="260" :params="editorLabor" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
|
|
@ -411,8 +412,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -446,7 +447,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="item_name" title="项目" width="220" :edit-render="{ name: '$input' }"></vxe-column>
|
<vxe-column field="item_name" title="项目" width="220" :edit-render="{ name: '$input' }"></vxe-column>
|
||||||
<vxe-column field="amount_formula" title="金额" width="220" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="amount_formula" title="金额" width="220" :edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -457,8 +458,8 @@
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -500,11 +501,12 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="quantity_formula" title="总用量" width="200" :params="{ hasTotalQuantity: true }"
|
||||||
|
:edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<a-tooltip>
|
<a-tooltip>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
|
|
@ -512,9 +514,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.quantity_formula || '' }}
|
{{ row.quantity_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.quantity, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.quantity, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="price" title="单价" width="120"
|
<vxe-column field="price" title="单价" width="120"
|
||||||
|
|
@ -526,10 +528,10 @@
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -563,7 +565,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="labor" title="项目" width="260" :params="editorLabor" formatter="formatRef"
|
<vxe-column field="labor" title="项目" width="260" :params="editorLabor" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
|
|
@ -575,9 +577,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -612,7 +614,7 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
<vxe-column type="seq" title="序号" width="48"></vxe-column>
|
||||||
<vxe-column field="item_name" title="项目" width="220" :edit-render="{ name: '$input' }"></vxe-column>
|
<vxe-column field="item_name" title="项目" width="220" :edit-render="{ name: '$input' }"></vxe-column>
|
||||||
<vxe-column field="amount_formula" title="金额" width="200" :edit-render="{ name: 'EditExpressions' }">
|
<vxe-column field="amount_formula" title="金额" width="200" :edit-render="{ name: 'EditExpressions' }">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
|
|
@ -622,9 +624,9 @@
|
||||||
</template>
|
</template>
|
||||||
<span v-if="showExp">
|
<span v-if="showExp">
|
||||||
{{ row.amount_formula || '' }}
|
{{ row.amount_formula || '' }}
|
||||||
</span>
|
</span>
|
||||||
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
<span v-else v-html="formatShowNumber(row.amount, 2)"></span>
|
||||||
</a-tooltip>
|
</a-tooltip>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
@ -681,11 +683,11 @@ export default {
|
||||||
currentConfigName: "",
|
currentConfigName: "",
|
||||||
// 当前项目ID
|
// 当前项目ID
|
||||||
currentBeid: 0,
|
currentBeid: 0,
|
||||||
settignsValues : {},
|
settignsValues: {},
|
||||||
showType: '1',
|
showType: '1',
|
||||||
showExp: false,
|
showExp: false,
|
||||||
|
|
||||||
showAll:false,
|
showAll: false,
|
||||||
|
|
||||||
modalVisible: false,
|
modalVisible: false,
|
||||||
scheme_loading: false, // 加载中
|
scheme_loading: false, // 加载中
|
||||||
|
|
@ -730,6 +732,19 @@ export default {
|
||||||
searchFieldNames: ['name'],
|
searchFieldNames: ['name'],
|
||||||
textField: 'name'
|
textField: 'name'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
editorMaterial2: {
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`,
|
||||||
|
listdataFieldName: 'BathroomMaterial',
|
||||||
|
columns: [
|
||||||
|
{ field: 'name', title: '名称' },
|
||||||
|
{ field: 'remark', title: '备注' }
|
||||||
|
],
|
||||||
|
placeholder: "请输入名称",
|
||||||
|
searchFieldNames: ['name'],
|
||||||
|
extendData: [{ id: '封边条', name: '封边条' }],
|
||||||
|
textField: 'name'
|
||||||
|
},
|
||||||
editorBanding: {
|
editorBanding: {
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
||||||
listdataFieldName: 'BathroomBanding',
|
listdataFieldName: 'BathroomBanding',
|
||||||
|
|
@ -893,6 +908,8 @@ export default {
|
||||||
this.paintMaterial_detailsData = data.paint_materialList || [];
|
this.paintMaterial_detailsData = data.paint_materialList || [];
|
||||||
//this.expense_detailsData = data.expense_list;
|
//this.expense_detailsData = data.expense_list;
|
||||||
//this.paintExpense_detailsData = data.paint_expenseList;
|
//this.paintExpense_detailsData = data.paint_expenseList;
|
||||||
|
|
||||||
|
this.materialHeightInit()
|
||||||
this.detailDataInit();
|
this.detailDataInit();
|
||||||
this.resetMaterial();
|
this.resetMaterial();
|
||||||
this.resetPaintMaterial();
|
this.resetPaintMaterial();
|
||||||
|
|
@ -902,6 +919,30 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
|
|
||||||
|
materialHeightInit() {
|
||||||
|
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`,
|
||||||
|
data: { "page": 1, "limit": 100, "order_bys": [], "search_rules": [] }
|
||||||
|
}).then(a => {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
a.data.BathroomMaterial.forEach(o => {
|
||||||
|
this.fittings_detailsData.forEach(item => {
|
||||||
|
if (item.material && item.material[0] && item.material[0].toString() == o.id.toString()) {
|
||||||
|
|
||||||
|
item.material_default_height = o.spec || "15";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
loadSettings() {
|
loadSettings() {
|
||||||
|
|
||||||
this.$mk.post({
|
this.$mk.post({
|
||||||
|
|
@ -930,7 +971,7 @@ export default {
|
||||||
},
|
},
|
||||||
formatShowNumber(value, points) {
|
formatShowNumber(value, points) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
return '<span style="color:red;">'+(0.0).toFixed(points ||0)+'</span>';
|
return '<span style="color:red;">' + (0.0).toFixed(points || 0) + '</span>';
|
||||||
}
|
}
|
||||||
return parseFloat(value).toFixed(points || 0)
|
return parseFloat(value).toFixed(points || 0)
|
||||||
},
|
},
|
||||||
|
|
@ -1075,7 +1116,7 @@ export default {
|
||||||
if (column.field == "material") {
|
if (column.field == "material") {
|
||||||
this.resetMaterial();
|
this.resetMaterial();
|
||||||
|
|
||||||
if(selectedData.spec){
|
if (selectedData.spec) {
|
||||||
row.material_default_height = selectedData.spec;
|
row.material_default_height = selectedData.spec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1169,7 +1210,7 @@ export default {
|
||||||
row.spec = selectedData.spec;
|
row.spec = selectedData.spec;
|
||||||
|
|
||||||
}
|
}
|
||||||
if(selectedData.price){
|
if (selectedData.price) {
|
||||||
row.price = selectedData.price;
|
row.price = selectedData.price;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1297,12 +1338,6 @@ export default {
|
||||||
},
|
},
|
||||||
material_beforeEditMethod({ column, row }) {
|
material_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
material_afterEditEvent({ column, row }) {
|
material_afterEditEvent({ column, row }) {
|
||||||
|
|
@ -1478,13 +1513,6 @@ export default {
|
||||||
},
|
},
|
||||||
paintMaterial_beforeEditMethod({ column, row }) {
|
paintMaterial_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
|
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
paintMaterial_afterEditEvent({ column, row }) {
|
paintMaterial_afterEditEvent({ column, row }) {
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,9 @@
|
||||||
<a-button type="primary" @click="ok">保存</a-button>
|
<a-button type="primary" @click="ok">保存</a-button>
|
||||||
<a-button @click="selectScheme">复制方案</a-button>
|
<a-button @click="selectScheme">复制方案</a-button>
|
||||||
<a-button @click="cancel">取消</a-button>
|
<a-button @click="cancel">取消</a-button>
|
||||||
|
<a-button @click="previewScheme" >预览方案</a-button>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<a-collapse v-model="groupbox1_activeKey">
|
<a-collapse v-model="groupbox1_activeKey">
|
||||||
|
|
@ -168,7 +171,7 @@
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: material_beforeEditMethod }">
|
||||||
<vxe-column width="60" v-if="!isReadonly">
|
<vxe-column width="60" v-if="!isReadonly">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2" v-if="!row.isMain && !row.isBanding">
|
<div class="oplinks2">
|
||||||
<a @click.stop="material_pageAdd(row)" title="新增">
|
<a @click.stop="material_pageAdd(row)" title="新增">
|
||||||
<a-icon type="plus-circle" />
|
<a-icon type="plus-circle" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -178,10 +181,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量(公式)" width="220"
|
<vxe-column field="quantity_formula" title="总用量(公式)" width="220"
|
||||||
|
:params="{hasTotalQuantity:true}"
|
||||||
:edit-render="{ name: 'EditExpressions' }"></vxe-column>
|
:edit-render="{ name: 'EditExpressions' }"></vxe-column>
|
||||||
<vxe-column field="price" title="单价" width="120"
|
<vxe-column field="price" title="单价" width="120"
|
||||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||||
|
|
@ -243,7 +247,7 @@
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: paintMaterial_beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: paintMaterial_beforeEditMethod }">
|
||||||
<vxe-column width="60" v-if="!isReadonly">
|
<vxe-column width="60" v-if="!isReadonly">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2" v-if="!row.isMain && !row.isBanding">
|
<div class="oplinks2">
|
||||||
<a @click.stop="paintMaterial_pageAdd(row)" title="新增">
|
<a @click.stop="paintMaterial_pageAdd(row)" title="新增">
|
||||||
<a-icon type="plus-circle" />
|
<a-icon type="plus-circle" />
|
||||||
</a>
|
</a>
|
||||||
|
|
@ -253,10 +257,11 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="material" title="材料" width="260" :params="editorMaterial" formatter="formatRef"
|
<vxe-column field="material" title="材料" width="260" :params="editorMaterial2" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="quantity_formula" title="总用量(公式)" width="220"
|
<vxe-column field="quantity_formula" title="总用量(公式)" width="220"
|
||||||
|
:params="{hasTotalQuantity:true}"
|
||||||
:edit-render="{ name: 'EditExpressions' }"></vxe-column>
|
:edit-render="{ name: 'EditExpressions' }"></vxe-column>
|
||||||
<vxe-column field="price" title="单价" width="120"
|
<vxe-column field="price" title="单价" width="120"
|
||||||
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
:edit-render="{ name: '$input', props: { type: 'number' } }"></vxe-column>
|
||||||
|
|
@ -402,6 +407,19 @@ export default {
|
||||||
searchFieldNames: ['name'],
|
searchFieldNames: ['name'],
|
||||||
textField: 'name'
|
textField: 'name'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
editorMaterial2: {
|
||||||
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomMaterial/v1/bathroom/material/list`,
|
||||||
|
listdataFieldName: 'BathroomMaterial',
|
||||||
|
columns: [
|
||||||
|
{ field: 'name', title: '名称' },
|
||||||
|
{ field: 'remark', title: '备注' }
|
||||||
|
],
|
||||||
|
placeholder: "请输入名称",
|
||||||
|
searchFieldNames: ['name'],
|
||||||
|
extendData : [{id:'封边条', name : '封边条'}],
|
||||||
|
textField: 'name'
|
||||||
|
},
|
||||||
editorBanding: {
|
editorBanding: {
|
||||||
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
dataUrl: `${BASE_URL.BASE_URL}/BathroomBanding/v1/bathroom/banding/list`,
|
||||||
listdataFieldName: 'BathroomBanding',
|
listdataFieldName: 'BathroomBanding',
|
||||||
|
|
@ -1016,12 +1034,6 @@ export default {
|
||||||
material_beforeEditMethod({ column, row }) {
|
material_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
|
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
material_afterEditEvent({ column, row }) {
|
material_afterEditEvent({ column, row }) {
|
||||||
|
|
@ -1091,12 +1103,7 @@ export default {
|
||||||
paintMaterial_beforeEditMethod({ column, row }) {
|
paintMaterial_beforeEditMethod({ column, row }) {
|
||||||
console.log(row, column);
|
console.log(row, column);
|
||||||
|
|
||||||
if (column.field == "material" && (row.isMain || row.isBanding)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (column.field == 'quantity_formula' && (row.isMain)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
paintMaterial_afterEditEvent({ column, row }) {
|
paintMaterial_afterEditEvent({ column, row }) {
|
||||||
|
|
@ -1426,6 +1433,10 @@ export default {
|
||||||
this.modalVisible = true;
|
this.modalVisible = true;
|
||||||
this.scheme_load();
|
this.scheme_load();
|
||||||
},
|
},
|
||||||
|
previewScheme(){
|
||||||
|
let dataId = this.getDataId();
|
||||||
|
this.$openPage("/BathroomQuotation/BathroomQuotationUpdate/d" + dataId); // 打开页面
|
||||||
|
},
|
||||||
confirmSelectScheme() {
|
confirmSelectScheme() {
|
||||||
let row = this.$refs.scheme_grid.getCurrentRecord(); // 获取当前行
|
let row = this.$refs.scheme_grid.getCurrentRecord(); // 获取当前行
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,461 +0,0 @@
|
||||||
<template>
|
|
||||||
<div class="page-body">
|
|
||||||
|
|
||||||
<a-row type="flex">
|
|
||||||
<a-col :flex="$mk.config.ui.searchFlex">
|
|
||||||
<!-- 搜索区 -->
|
|
||||||
<vxe-form :data="searchFormData" :items="searchFormItems" titleColon @submit="onSearch">
|
|
||||||
<template #date="{}">
|
|
||||||
<a-form-item label="创建时间" :style="{ display: 'inline-block', width: 120 }">
|
|
||||||
</a-form-item>
|
|
||||||
<a-form-item :style="{ display: 'inline-block', width: 'calc(100% - 120px )' }">
|
|
||||||
<a-range-picker @change="onDateChange" />
|
|
||||||
</a-form-item>
|
|
||||||
</template>
|
|
||||||
</vxe-form>
|
|
||||||
</a-col>
|
|
||||||
<a-col :flex="$mk.config.ui.toolbarFlex">
|
|
||||||
<!-- 工具条 -->
|
|
||||||
<mk-toolbar @toolbarClick="toolbarClick"></mk-toolbar>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<vxe-toolbar ref="xToolbar" custom>
|
|
||||||
<template #buttons>
|
|
||||||
<a-button type="primary" icon="delete" @click="pageDelete()">批量删除</a-button>
|
|
||||||
</template>
|
|
||||||
</vxe-toolbar>
|
|
||||||
<!-- 表格区 -->
|
|
||||||
<div class="gridPanel">
|
|
||||||
<vxe-grid ref='xGrid' v-bind="gridOptions">
|
|
||||||
|
|
||||||
<!-- =============================== 表格列 自动生成 Start =============================== -->
|
|
||||||
|
|
||||||
<!-- =============================== 表格列 自动生成 End =============================== -->
|
|
||||||
|
|
||||||
<template #op="{ row }">
|
|
||||||
<div class="oplinks">
|
|
||||||
<a @click.stop="pageEdit(row)" title="编辑"><a-icon type="edit" /></a>
|
|
||||||
<a @click.stop="pageDelete(row)" title="删除"><a-icon type="delete" /></a>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<template #image="{ row }">
|
|
||||||
<img v-if="row.image" :src="row.image" style="width: 100px;">
|
|
||||||
<span v-else>无</span>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
</vxe-grid>
|
|
||||||
|
|
||||||
<a-row style="background: white;">
|
|
||||||
<a-col style="margin-bottom: 8px;" v-for="item in [1,2,3,4,4,4,4,4]" :key="item" :span="6">
|
|
||||||
<a-card hoverable style="width: 300px">
|
|
||||||
<img
|
|
||||||
slot="cover"
|
|
||||||
alt="example"
|
|
||||||
src="https://gw.alipayobjects.com/zos/rmsportal/JiqGstEfoWAOHiTxclqi.png"
|
|
||||||
/>
|
|
||||||
<template slot="actions" class="ant-card-actions">
|
|
||||||
<a-icon key="setting" type="setting" />
|
|
||||||
<a-icon key="edit" type="edit" />
|
|
||||||
<a-icon key="ellipsis" type="ellipsis" />
|
|
||||||
</template>
|
|
||||||
<a-card-meta title="Card title" description="This is the description">
|
|
||||||
</a-card-meta>
|
|
||||||
</a-card>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-pagination v-model="currentPageIndex" :total="50" show-less-items />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import BASE_URL from '@/services/Middle/bathroom/BathroomScheme/api.js';
|
|
||||||
const settings = require('../../basic/settings.js');
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'BathroomSchemeList',
|
|
||||||
i18n: require('./i18n'), // 国际化
|
|
||||||
props: {
|
|
||||||
pageMode: {
|
|
||||||
type: String,
|
|
||||||
default: "edit"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
|
|
||||||
const listFieldName = 'BathroomScheme';
|
|
||||||
// 页面数据
|
|
||||||
var pageData = { // 页面数据变量
|
|
||||||
|
|
||||||
keyName: 'id', // 主键字段名
|
|
||||||
|
|
||||||
currentPageIndex:1,
|
|
||||||
|
|
||||||
// 接口动作
|
|
||||||
actions: { // Api 接口地址
|
|
||||||
// =============================== 接口地址 自动生成 Start ===============================
|
|
||||||
BathroomSchemeList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/list`, // 设计方案列表
|
|
||||||
BathroomSchemeDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/detail`, // 设计方案详情
|
|
||||||
BathroomSchemeCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/create`, // 创建设计方案
|
|
||||||
BathroomSchemeUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/update`, // 更新设计方案
|
|
||||||
BathroomSchemeDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/detele`, // 删除设计方案
|
|
||||||
BathroomSchemeBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/batchDelete`, // 批量删除设计方案
|
|
||||||
BathroomSchemeBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/batchUpdate`, // 批量更新设计方案
|
|
||||||
BathroomSchemeBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/batchCreate`, // 批量创建设计方案
|
|
||||||
BathroomSchemeExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/export/excel`, // 导出设计方案数据到EXCEL
|
|
||||||
BathroomSchemeImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/import/excel`, // 批量导入EXCEL设计方案数据
|
|
||||||
BathroomSchemeFittingsList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/list`, // 报价单部件列表
|
|
||||||
BathroomSchemeFittingsDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/detail`, // 报价单部件详情
|
|
||||||
BathroomSchemeFittingsCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/create`, // 创建报价单部件
|
|
||||||
BathroomSchemeFittingsUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/update`, // 更新报价单部件
|
|
||||||
BathroomSchemeFittingsDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/detele`, // 删除报价单部件
|
|
||||||
BathroomSchemeFittingsBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/batchDelete`, // 批量删除报价单部件
|
|
||||||
BathroomSchemeFittingsBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/batchUpdate`, // 批量更新报价单部件
|
|
||||||
BathroomSchemeFittingsBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/batchCreate`, // 批量创建报价单部件
|
|
||||||
BathroomSchemeFittingsExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/export/excel`, // 导出报价单部件数据到EXCEL
|
|
||||||
BathroomSchemeFittingsImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/fittings/import/excel`, // 批量导入EXCEL报价单部件数据
|
|
||||||
BathroomSchemePartsList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/list`, // 报价单配件列表
|
|
||||||
BathroomSchemePartsDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/detail`, // 报价单配件详情
|
|
||||||
BathroomSchemePartsCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/create`, // 创建报价单配件
|
|
||||||
BathroomSchemePartsUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/update`, // 更新报价单配件
|
|
||||||
BathroomSchemePartsDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/detele`, // 删除报价单配件
|
|
||||||
BathroomSchemePartsBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/batchDelete`, // 批量删除报价单配件
|
|
||||||
BathroomSchemePartsBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/batchUpdate`, // 批量更新报价单配件
|
|
||||||
BathroomSchemePartsBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/batchCreate`, // 批量创建报价单配件
|
|
||||||
BathroomSchemePartsExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/export/excel`, // 导出报价单配件数据到EXCEL
|
|
||||||
BathroomSchemePartsImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/parts/import/excel`, // 批量导入EXCEL报价单配件数据
|
|
||||||
BathroomSchemeMaterialList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/list`, // 报价单材料列表
|
|
||||||
BathroomSchemeMaterialDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/detail`, // 报价单材料详情
|
|
||||||
BathroomSchemeMaterialCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/create`, // 创建报价单材料
|
|
||||||
BathroomSchemeMaterialUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/update`, // 更新报价单材料
|
|
||||||
BathroomSchemeMaterialDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/detele`, // 删除报价单材料
|
|
||||||
BathroomSchemeMaterialBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/batchDelete`, // 批量删除报价单材料
|
|
||||||
BathroomSchemeMaterialBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/batchUpdate`, // 批量更新报价单材料
|
|
||||||
BathroomSchemeMaterialBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/batchCreate`, // 批量创建报价单材料
|
|
||||||
BathroomSchemeMaterialExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/export/excel`, // 导出报价单材料数据到EXCEL
|
|
||||||
BathroomSchemeMaterialImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/material/import/excel`, // 批量导入EXCEL报价单材料数据
|
|
||||||
BathroomSchemeLaborList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/list`, // 报价单人工费用列表
|
|
||||||
BathroomSchemeLaborDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/detail`, // 报价单人工费用详情
|
|
||||||
BathroomSchemeLaborCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/create`, // 创建报价单人工费用
|
|
||||||
BathroomSchemeLaborUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/update`, // 更新报价单人工费用
|
|
||||||
BathroomSchemeLaborDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/detele`, // 删除报价单人工费用
|
|
||||||
BathroomSchemeLaborBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/batchDelete`, // 批量删除报价单人工费用
|
|
||||||
BathroomSchemeLaborBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/batchUpdate`, // 批量更新报价单人工费用
|
|
||||||
BathroomSchemeLaborBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/batchCreate`, // 批量创建报价单人工费用
|
|
||||||
BathroomSchemeLaborExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/export/excel`, // 导出报价单人工费用数据到EXCEL
|
|
||||||
BathroomSchemeLaborImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/labor/import/excel`, // 批量导入EXCEL报价单人工费用数据
|
|
||||||
BathroomSchemeProcessList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/list`, // 报价单工序列表
|
|
||||||
BathroomSchemeProcessDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/detail`, // 报价单工序详情
|
|
||||||
BathroomSchemeProcessCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/create`, // 创建报价单工序
|
|
||||||
BathroomSchemeProcessUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/update`, // 更新报价单工序
|
|
||||||
BathroomSchemeProcessDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/detele`, // 删除报价单工序
|
|
||||||
BathroomSchemeProcessBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/batchDelete`, // 批量删除报价单工序
|
|
||||||
BathroomSchemeProcessBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/batchUpdate`, // 批量更新报价单工序
|
|
||||||
BathroomSchemeProcessBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/batchCreate`, // 批量创建报价单工序
|
|
||||||
BathroomSchemeProcessExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/export/excel`, // 导出报价单工序数据到EXCEL
|
|
||||||
BathroomSchemeProcessImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/process/import/excel`, // 批量导入EXCEL报价单工序数据
|
|
||||||
BathroomSchemePackagingList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/list`, // 包装材料列表
|
|
||||||
BathroomSchemePackagingDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/detail`, // 包装材料详情
|
|
||||||
BathroomSchemePackagingCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/create`, // 创建包装材料
|
|
||||||
BathroomSchemePackagingUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/update`, // 更新包装材料
|
|
||||||
BathroomSchemePackagingDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/detele`, // 删除包装材料
|
|
||||||
BathroomSchemePackagingBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/batchDelete`, // 批量删除包装材料
|
|
||||||
BathroomSchemePackagingBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/batchUpdate`, // 批量更新包装材料
|
|
||||||
BathroomSchemePackagingBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/batchCreate`, // 批量创建包装材料
|
|
||||||
BathroomSchemePackagingExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/export/excel`, // 导出包装材料数据到EXCEL
|
|
||||||
BathroomSchemePackagingImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/packaging/import/excel`, // 批量导入EXCEL包装材料数据
|
|
||||||
BathroomSchemeOutsourcingList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/list`, // 外购产品列表
|
|
||||||
BathroomSchemeOutsourcingDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/detail`, // 外购产品详情
|
|
||||||
BathroomSchemeOutsourcingCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/create`, // 创建外购产品
|
|
||||||
BathroomSchemeOutsourcingUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/update`, // 更新外购产品
|
|
||||||
BathroomSchemeOutsourcingDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/detele`, // 删除外购产品
|
|
||||||
BathroomSchemeOutsourcingBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/batchDelete`, // 批量删除外购产品
|
|
||||||
BathroomSchemeOutsourcingBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/batchUpdate`, // 批量更新外购产品
|
|
||||||
BathroomSchemeOutsourcingBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/batchCreate`, // 批量创建外购产品
|
|
||||||
BathroomSchemeOutsourcingExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/export/excel`, // 导出外购产品数据到EXCEL
|
|
||||||
BathroomSchemeOutsourcingImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/outsourcing/import/excel`, // 批量导入EXCEL外购产品数据
|
|
||||||
BathroomSchemePaintList: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/list`, // 油漆列表
|
|
||||||
BathroomSchemePaintDetail: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/detail`, // 油漆详情
|
|
||||||
BathroomSchemePaintCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/create`, // 创建油漆
|
|
||||||
BathroomSchemePaintUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/update`, // 更新油漆
|
|
||||||
BathroomSchemePaintDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/detele`, // 删除油漆
|
|
||||||
BathroomSchemePaintBatchDelete: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/batchDelete`, // 批量删除油漆
|
|
||||||
BathroomSchemePaintBatchUpdate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/batchUpdate`, // 批量更新油漆
|
|
||||||
BathroomSchemePaintBatchCreate: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/batchCreate`, // 批量创建油漆
|
|
||||||
BathroomSchemePaintExportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/export/excel`, // 导出油漆数据到EXCEL
|
|
||||||
BathroomSchemePaintImportExcel: `${BASE_URL.BASE_URL}/BathroomScheme/v1/bathroom/scheme/paint/import/excel`, // 批量导入EXCEL油漆数据
|
|
||||||
|
|
||||||
// =============================== 接口地址 自动生成 End ===============================
|
|
||||||
},
|
|
||||||
|
|
||||||
start_time: 0, // 开始时间
|
|
||||||
end_time: 0, // 结束时间
|
|
||||||
|
|
||||||
|
|
||||||
//搜索区
|
|
||||||
searchFormData: {
|
|
||||||
title: '',
|
|
||||||
desc: '',
|
|
||||||
},
|
|
||||||
// 搜索区配置
|
|
||||||
searchRules: [
|
|
||||||
{ key: "title", mode: "like" },
|
|
||||||
{ key: "desc", mode: "like" }
|
|
||||||
],
|
|
||||||
//搜索区
|
|
||||||
searchFormItems: [ // 子项
|
|
||||||
{ field: 'title', title: '标题', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入标题' } } },
|
|
||||||
{ field: 'desc', title: '描述', span: 5, itemRender: { name: '$input', props: { placeholder: '请输入描述' } } },
|
|
||||||
{ span: 8, slots: { default: 'date' } }, // 自定义列
|
|
||||||
{
|
|
||||||
align: 'right', span: 4, itemRender: { // 按钮列
|
|
||||||
name: '$buttons', children: [{ props: { type: 'submit', content: '搜索', status: 'primary' } }, // 搜索按钮
|
|
||||||
{ props: { type: 'reset', content: '重置' } }]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
|
|
||||||
//数据区
|
|
||||||
gridOptions: { // 表格配置
|
|
||||||
height: '100%', // 表格高度 100% 会自动撑满父容器
|
|
||||||
stripe: true, // 启用斑马纹
|
|
||||||
id: 'datagrid_1', // 表格唯一标识
|
|
||||||
|
|
||||||
// 接口获取数据
|
|
||||||
proxyConfig: { // 配置代理
|
|
||||||
sort: true, // 启用排序代理,当点击排序时会自动触发 query 行为
|
|
||||||
filter: true, // 启用筛选代理,当点击筛选时会自动触发 query 行为
|
|
||||||
props: {
|
|
||||||
result: listFieldName, // 配置响应结果列表字段
|
|
||||||
total: 'total' // 配置响应结果总页数字段
|
|
||||||
},
|
|
||||||
// 接收Promise
|
|
||||||
ajax: {
|
|
||||||
// 当点击工具栏查询按钮或者手动提交指令 query或reload 时会被触发
|
|
||||||
query: (options) => { // options 为当前表格的配置项
|
|
||||||
const { page, sorts } = options; // 获取当前页码、每页条数、排序信息
|
|
||||||
var params = {}; // 定义请求参数
|
|
||||||
params.page = page.currentPage; // 当前页码
|
|
||||||
params.limit = page.pageSize; // 每页条数
|
|
||||||
params.order_bys = []; // 排序信息
|
|
||||||
params.search_rules = this.getSearchParms(); // 搜索信息
|
|
||||||
if (sorts) { // 如果有排序信息
|
|
||||||
sorts.forEach((v) => { // 遍历排序信息
|
|
||||||
params.order_bys.push({ // 添加排序信息
|
|
||||||
column: v.property, // 字段名
|
|
||||||
order: v.order // 排序方式
|
|
||||||
})
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return this.loadData({ params }); // 返回请求结果
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
// 表格列配置
|
|
||||||
columns: [
|
|
||||||
{ type: 'checkbox', width: 50 }, // 多选框
|
|
||||||
|
|
||||||
{ title: '操作', slots: { default: 'op' }, width: 120 },
|
|
||||||
{ type: 'seq', width: 30 }, // 序号
|
|
||||||
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
|
||||||
|
|
||||||
{ field: 'type', sortable: true, title: '类型', params:settings.options_schemeType, formatter: 'formatEnum', width: 250 }, // 类型:1.主柜,2.抽屉
|
|
||||||
{ field: 'name', sortable: true, title: '设计方案名称', width: 250 }, // 设计方案名称
|
|
||||||
//{ field: 'code', sortable: true, title: '编码', width: 250 }, // 编码
|
|
||||||
{ field: 'model', sortable: true, title: '型号', width: 250 }, // 型号
|
|
||||||
//{ field: 'description', sortable: true, title: '描述', width: 250 }, // 描述
|
|
||||||
{ field: 'image', sortable: true, title: '主图', width: 250 , slots: { default: 'image' } }, // 图片
|
|
||||||
{ field: 'create_time', formatter: 'formatDate', width: 160, sortable: true, title: '创建时间', showHeaderOverflow: true }, // 创建时间
|
|
||||||
{ field: 'update_time', formatter: 'formatDate', width: 160, sortable: true, title: '更新时间', showHeaderOverflow: true }, // 更新时间
|
|
||||||
|
|
||||||
// =============================== 表格列 自动生成 Start ===============================
|
|
||||||
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
pageData.actions.getList = pageData.actions.BathroomSchemeList;
|
|
||||||
pageData.actions.delete = pageData.actions.BathroomSchemeBatchDelete;
|
|
||||||
pageData.gridOptions = Object.assign({}, this.$mk.config.defaults.gridOptions, pageData.gridOptions); // 合并表格数据
|
|
||||||
|
|
||||||
return pageData; // 返回页面数据
|
|
||||||
},
|
|
||||||
|
|
||||||
// 计算属性
|
|
||||||
computed: {
|
|
||||||
// 页面描述
|
|
||||||
desc() {
|
|
||||||
return this.$t('pageDesc')
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 创建完成
|
|
||||||
created() {
|
|
||||||
this.$nextTick(() => { // 在下次 DOM 更新循环结束之后执行延迟回调
|
|
||||||
// 将表格和工具栏进行关联
|
|
||||||
this.$refs.xGrid.connect(this.$refs.xToolbar) // 将表格和工具栏进行关联
|
|
||||||
});
|
|
||||||
},
|
|
||||||
// 挂载完成
|
|
||||||
onLoad() {
|
|
||||||
|
|
||||||
},
|
|
||||||
// 动作
|
|
||||||
methods: {
|
|
||||||
|
|
||||||
|
|
||||||
// =============================== 基于status进行开关 自动生成 Start ===============================
|
|
||||||
|
|
||||||
// =============================== 基于status进行开关 自动生成 End ===============================
|
|
||||||
|
|
||||||
// 修改日期
|
|
||||||
onDateChange(date) { // 日期选择器事件
|
|
||||||
if (date && date.length) { // 如果有值
|
|
||||||
this.start_time = parseInt(date[0]._d.getTime() / 1000); // 将日期转换为时间戳
|
|
||||||
this.end_time = parseInt(date[1]._d.getTime() / 1000); // 将日期转换为时间戳
|
|
||||||
} else { // 如果没有值
|
|
||||||
this.start_time = 0; // 将日期转换为时间戳
|
|
||||||
this.end_time = 0; // 将日期转换为时间戳
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// 获取搜索参数
|
|
||||||
getSearchParms() { // 获取搜索参数
|
|
||||||
var rules = []; // 定义搜索参数
|
|
||||||
let findMode = k => { // 查找搜索模式
|
|
||||||
for (let i in this.searchRules) { // 遍历搜索规则
|
|
||||||
if (this.searchRules[i].key == k) return this.searchRules[i].mode; // 如果找到了就返回搜索模式
|
|
||||||
}
|
|
||||||
return "equal"; // 如果没有找到就返回等于
|
|
||||||
};
|
|
||||||
|
|
||||||
for (let key in this.searchFormData) { // 遍历搜索表单数据
|
|
||||||
let value = this.searchFormData[key]; // 获取值
|
|
||||||
if (value) { // 如果有值
|
|
||||||
let mode = findMode(key); // 获取搜索模式
|
|
||||||
if (mode == "like") { // 如果是模糊搜索
|
|
||||||
value = "%" + value + "%"; // 如果是模糊搜索就在两边加上%
|
|
||||||
}
|
|
||||||
rules.push({ // 添加搜索参数
|
|
||||||
column: key, // 字段名
|
|
||||||
mode: mode, // 搜索模式
|
|
||||||
value: value // 值
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return rules; // 返回搜索参数
|
|
||||||
},
|
|
||||||
// 获取选中行
|
|
||||||
getSelectdRow() { // 获取选中行
|
|
||||||
let row = this.$refs.xGrid.getCurrentRecord(); // 获取当前行
|
|
||||||
if (!row) { // 如果没有选中行
|
|
||||||
let rows = this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
|
||||||
if (rows && rows.length) { row = rows[0]; } // 如果有选中行就取第一行
|
|
||||||
}
|
|
||||||
return row; // 返回选中行
|
|
||||||
},
|
|
||||||
// 加载数据
|
|
||||||
loadData({ params }) {
|
|
||||||
params.start_time = this.start_time; // 开始时间
|
|
||||||
params.end_time = this.end_time; // 结束时间
|
|
||||||
this.$mk.getPagedData({ url: this.actions.getList, data: params }).then(r=>{
|
|
||||||
|
|
||||||
console.log(r);
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
// 工具栏点击事件 add / log / setting
|
|
||||||
toolbarClick(e) {
|
|
||||||
if (e.name == "add") { // 如果是添加
|
|
||||||
this.$openPage("/BathroomScheme/BathroomSchemeAdd"); // 打开页面
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
// 编辑
|
|
||||||
pageEdit(row) {
|
|
||||||
if (!row) { // 如果没有选中行
|
|
||||||
this.$mk.msg("请选择行"); // 提示
|
|
||||||
return; // 返回
|
|
||||||
}
|
|
||||||
this.$openPage("/BathroomScheme/BathroomSchemeUpdate/" + row[this.keyName]); // 打开页面
|
|
||||||
},
|
|
||||||
|
|
||||||
// 删除
|
|
||||||
pageDelete(row) {
|
|
||||||
let rows = row ? [row] : this.$refs.xGrid.getCheckboxRecords(); // 获取选中行
|
|
||||||
let ids = []; // 定义id数组
|
|
||||||
rows.forEach((row) => { // 遍历选中行
|
|
||||||
ids.push(row[this.keyName]); // 将选择行的id添加到id数组
|
|
||||||
});
|
|
||||||
|
|
||||||
if (!ids.length) { // 如果没有选中行
|
|
||||||
this.$mk.error("请选择行"); // 提示
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$mk.confirm('您确定要删除吗?').then(type => { // 确认删除
|
|
||||||
if (type == 'confirm') { // 如果确认删除
|
|
||||||
this.$mk.post({
|
|
||||||
url: this.actions.delete, // 请求删除数据地址
|
|
||||||
loading: "删除中...", // 加载提示
|
|
||||||
data: {
|
|
||||||
ids: ids // 传递id数组
|
|
||||||
},
|
|
||||||
useBigInt : true
|
|
||||||
}).then(() => { // 成功
|
|
||||||
this.$mk.success("删除成功"); // 提示成功
|
|
||||||
this.onSearch(); // 重新加载数据
|
|
||||||
}).catch((a) => { // 失败
|
|
||||||
this.$mk.error(a.data.msg); // 提示错误信息
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
// 搜索
|
|
||||||
onSearch() {
|
|
||||||
this.$refs.xGrid.commitProxy('query') // 提交搜索
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
},
|
|
||||||
// 监听属性
|
|
||||||
watch: {
|
|
||||||
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
</script>
|
|
||||||
<style scoped lang="less">
|
|
||||||
.page-body {
|
|
||||||
padding: 30px;
|
|
||||||
background: @base-bg-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gridPanel {
|
|
||||||
height: calc(100vh - 400px);
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
.oplinks svg {
|
|
||||||
width: 22px;
|
|
||||||
height: 22px;
|
|
||||||
margin: 0 5px 0 0;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<vxe-pulldown class="edit-down-pulldown" ref="xDown" transfer>
|
<vxe-pulldown class="edit-down-pulldown" ref="xDown" transfer>
|
||||||
<template>
|
<template>
|
||||||
<vxe-textarea class="edit-expressions-textarea" ref="inputx" v-model="textboxValue" placeholder="输入表达式"
|
<vxe-textarea class="edit-expressions-textarea" ref="inputx" v-model="textboxValue" placeholder="输入表达式"
|
||||||
@click="clickEvent" @change="textChange" ></vxe-textarea>
|
@click="clickEvent" @change="textChange"></vxe-textarea>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
|
@ -41,8 +41,8 @@ export default {
|
||||||
actions: {
|
actions: {
|
||||||
},
|
},
|
||||||
textboxValue: '',
|
textboxValue: '',
|
||||||
expressions_list: settings.expressions_list,
|
expressions_list: [],
|
||||||
sourceValue:'',
|
sourceValue: '',
|
||||||
row: null,
|
row: null,
|
||||||
column: null,
|
column: null,
|
||||||
loading: false
|
loading: false
|
||||||
|
|
@ -68,20 +68,20 @@ export default {
|
||||||
this.$refs.inputx.focus();
|
this.$refs.inputx.focus();
|
||||||
|
|
||||||
|
|
||||||
row[column.field] = this.textboxValue;
|
row[column.field] = this.textboxValue;
|
||||||
},
|
},
|
||||||
setText(){
|
setText() {
|
||||||
const { row, column } = this.params
|
const { row, column } = this.params
|
||||||
this.textboxValue = this.sourceValue;
|
this.textboxValue = this.sourceValue;
|
||||||
|
|
||||||
row[column.field] = this.textboxValue;
|
row[column.field] = this.textboxValue;
|
||||||
|
|
||||||
this.$refs.inputx.focus();
|
this.$refs.inputx.focus();
|
||||||
},
|
},
|
||||||
textChange(){
|
textChange() {
|
||||||
const { row, column } = this.params
|
const { row, column } = this.params
|
||||||
|
|
||||||
row[column.field] = this.textboxValue;
|
row[column.field] = this.textboxValue;
|
||||||
},
|
},
|
||||||
load() {
|
load() {
|
||||||
const { row, column } = this.params
|
const { row, column } = this.params
|
||||||
|
|
@ -90,10 +90,26 @@ export default {
|
||||||
|
|
||||||
this.textboxValue = row[column.field]
|
this.textboxValue = row[column.field]
|
||||||
|
|
||||||
if(row.source && row.source[column.field]){
|
if (row.source && row.source[column.field]) {
|
||||||
this.sourceValue = row.source[column.field];
|
this.sourceValue = row.source[column.field];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.expressions_list = settings.expressions_list;
|
||||||
|
|
||||||
|
if (column.params && column.params.hasTotalQuantity) {
|
||||||
|
if (row.material && row.material[1]) {
|
||||||
|
let name = this.formatName(row.material[1]);
|
||||||
|
if(name == '封边条'){
|
||||||
|
this.expressions_list = ['封边条用量合计', ... this.expressions_list]
|
||||||
|
}else{
|
||||||
|
this.expressions_list = [name + '的总用量', ... this.expressions_list]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
formatName(v) {
|
||||||
|
return (v || "").replace("\r", "").replace("\n", "").replace("\t", "").replace(" ", "");
|
||||||
|
|
||||||
},
|
},
|
||||||
clickEvent() {
|
clickEvent() {
|
||||||
|
|
@ -129,25 +145,28 @@ export default {
|
||||||
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
|
box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
|
||||||
line-height: 180%;
|
line-height: 180%;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
overflow:auto;
|
overflow: auto;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.edit-expressions-wrapper ul{
|
|
||||||
|
.edit-expressions-wrapper ul {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
}
|
}
|
||||||
.sourceValue{
|
|
||||||
|
.sourceValue {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-expressions-wrapper li {
|
.edit-expressions-wrapper li {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
.edit-expressions-wrapper a {
|
|
||||||
color: #4286eb;
|
.edit-expressions-wrapper a {
|
||||||
|
color: #4286eb;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}</style>
|
||||||
</style>
|
|
||||||
|
|
@ -142,7 +142,7 @@ var config = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
table_min_count: 4,
|
table_min_count: 1,
|
||||||
|
|
||||||
|
|
||||||
getGuid: () => {
|
getGuid: () => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue