This commit is contained in:
parent
862dc4fdc7
commit
740ccd452e
|
|
@ -115,7 +115,7 @@ export default {
|
||||||
items: [
|
items: [
|
||||||
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
|
{ field: 'code', title: '编码', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'name', title: '名称', span: 12, itemRender: { name: '$input' } },
|
{ field: 'name', title: '名称', span: 12, itemRender: { name: '$input' } },
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
title: '分类', span: 12,
|
title: '分类', span: 12,
|
||||||
field: 'mold_component_category',
|
field: 'mold_component_category',
|
||||||
|
|
@ -135,7 +135,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
// 新增模式表单项
|
// 新增模式表单项
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,21 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="page-body">
|
<div class="page-body">
|
||||||
|
|
||||||
|
<div class="approvedbg" v-if="pageStatus == 'approved'"></div>
|
||||||
|
|
||||||
|
<div class="voucher-toolbar">
|
||||||
|
<div class="voucher-toolbar-left">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a-button type="primary" @click="ok" :disabled="pageStatus == 'approved'">保存</a-button>
|
||||||
|
<a-button @click="pageApproved" type="primary" :disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
||||||
|
</a-button>
|
||||||
|
|
||||||
|
<a-button @click="back">关闭</a-button>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
<vxe-form :data="formOptions.data" ref="xForm" :title-width="formOptions.titleWidth"
|
||||||
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
:title-align="formOptions.titleAlign" :rules="formOptions.rules" :items="formOptions.items" titleColon>
|
||||||
</vxe-form>
|
</vxe-form>
|
||||||
|
|
@ -12,7 +27,7 @@
|
||||||
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
@pulldownSelected="onPulldownSelected" @popupSelected="onPopupSelected" :export-config="{}"
|
||||||
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
@edit-closed="afterEditEvent" @edit-actived="beforeEditEvent"
|
||||||
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
:edit-config="{ trigger: 'click', mode: 'cell', icon: 'vxe-icon-edit', showStatus: false, beforeEditMethod: beforeEditMethod }">
|
||||||
<vxe-column width="60">
|
<vxe-column width="60" v-if="pageStatus != 'approved'">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<div class="oplinks2">
|
<div class="oplinks2">
|
||||||
<a @click.stop="pageAdd(row)" title="新增">
|
<a @click.stop="pageAdd(row)" title="新增">
|
||||||
|
|
@ -26,7 +41,8 @@
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="mold_scheme" title="模型" width="160" :params="editor_scheme" formatter="formatRef"
|
<vxe-column field="mold_scheme" title="模型" width="160" :params="editor_scheme" formatter="formatRef"
|
||||||
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
:edit-render="{ name: 'MkGridDataSelector' }"></vxe-column>
|
||||||
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type" formatter = 'formatEnum'
|
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
|
||||||
|
formatter='formatEnum'
|
||||||
:edit-render="{ name: '$select', props: { options: options_production_type } }"></vxe-column>
|
:edit-render="{ name: '$select', props: { options: options_production_type } }"></vxe-column>
|
||||||
|
|
||||||
<vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef"
|
<vxe-column field="mold_master_user_detail" title="师傅" width="160" :params="editor_staff" formatter="formatRef"
|
||||||
|
|
@ -58,10 +74,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footerbar">
|
|
||||||
<a-button type="primary" @click="ok">确定</a-button>
|
|
||||||
<a-button @click="cancel">取消</a-button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -99,6 +112,8 @@ export default {
|
||||||
// 当前项目ID
|
// 当前项目ID
|
||||||
currentBeid: 0,
|
currentBeid: 0,
|
||||||
|
|
||||||
|
pageStatus: '',
|
||||||
|
|
||||||
uploadDefaultImg: null,
|
uploadDefaultImg: null,
|
||||||
detailDataFieldName: "mold_order",
|
detailDataFieldName: "mold_order",
|
||||||
|
|
||||||
|
|
@ -137,13 +152,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input' } },
|
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input', props: { } } },
|
||||||
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input' } },
|
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input', props: { } } },
|
||||||
{ field: 'contact', title: '联系人', span: 6, itemRender: { name: '$input' } },
|
{ field: 'contact', title: '联系人', span: 6, itemRender: { name: '$input', props: { } } },
|
||||||
{ field: 'phone', title: '联系电话', span: 6, itemRender: { name: '$input' } },
|
{ field: 'phone', title: '联系电话', span: 6, itemRender: { name: '$input', props: { } } },
|
||||||
|
|
||||||
{ field: 'salesman', title: '业务员姓名', span: 6, itemRender: { name: '$input' } },
|
{ field: 'salesman', title: '业务员姓名', span: 6, itemRender: { name: '$input', props: { } } },
|
||||||
{ field: 'contract_no', title: '合同号', span: 6, itemRender: { name: '$input' } },
|
{ field: 'contract_no', title: '合同号', span: 6, itemRender: { name: '$input' , props: { }} },
|
||||||
{ field: 'contract_start_time', dataRule: { type: "timestamp" }, title: '合同开始日期', span: 6, itemRender: { name: '$input', props: { type: "date" } } },
|
{ field: 'contract_start_time', dataRule: { type: "timestamp" }, title: '合同开始日期', span: 6, itemRender: { name: '$input', props: { type: "date" } } },
|
||||||
{ field: 'contract_end_time', dataRule: { type: "timestamp" }, title: '合同结束日期', span: 6, itemRender: { name: '$input', props: { type: "date" } } },
|
{ field: 'contract_end_time', dataRule: { type: "timestamp" }, title: '合同结束日期', span: 6, itemRender: { name: '$input', props: { type: "date" } } },
|
||||||
|
|
||||||
|
|
@ -156,7 +171,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input' } },
|
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input', props: { } } },
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
@ -216,6 +231,16 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
|
|
||||||
|
this.pageInit();
|
||||||
|
|
||||||
|
|
||||||
|
this.heightInit();
|
||||||
|
|
||||||
|
},
|
||||||
|
// 函数
|
||||||
|
methods: {
|
||||||
|
pageInit() {
|
||||||
|
|
||||||
// 获取路由的id参数
|
// 获取路由的id参数
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
|
|
||||||
|
|
@ -232,7 +257,10 @@ export default {
|
||||||
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
this.formOptions.data = this.$mk.formatDetailData({ data: a.data[this.detailDataFieldName], rules: this.formOptions.items });
|
||||||
console.log(this.formOptions.data)
|
console.log(this.formOptions.data)
|
||||||
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].order_molds || []));
|
this.detailsData = JSON.parse(JSON.stringify(a.data[this.detailDataFieldName].order_molds || []));
|
||||||
|
if (a.data[this.detailDataFieldName].auditor_uid) {
|
||||||
|
this.pageStatus = 'approved';
|
||||||
|
}
|
||||||
|
this.setPageReadonly(this.pageStatus == 'approved');
|
||||||
this.detailsDataInit();
|
this.detailsDataInit();
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
@ -245,17 +273,25 @@ export default {
|
||||||
this.addModeItems.forEach(item => {
|
this.addModeItems.forEach(item => {
|
||||||
this.formOptions.items.push(item);
|
this.formOptions.items.push(item);
|
||||||
})
|
})
|
||||||
|
this.setPageReadonly(this.pageStatus == 'approved');
|
||||||
this.detailsDataInit();
|
this.detailsDataInit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.heightInit();
|
|
||||||
|
|
||||||
},
|
},
|
||||||
// 函数
|
|
||||||
methods: {
|
setPageReadonly(readonly) {
|
||||||
|
this.formOptions.items.forEach(item => {
|
||||||
|
if (item.itemRender && item.itemRender.name == "$select") {
|
||||||
|
item.itemRender.props.disabled = readonly;
|
||||||
|
}
|
||||||
|
if (item.itemRender && item.itemRender.props) {
|
||||||
|
item.itemRender.props.readonly = readonly;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -264,6 +300,9 @@ export default {
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 300;
|
let h = this.$mk.getWindowSize().height - this.$mk.getOffsetTop(this.$refs.xTable.$el) - 300;
|
||||||
|
if (h < 300) {
|
||||||
|
h = 300;
|
||||||
|
}
|
||||||
|
|
||||||
this.table1Height = h;
|
this.table1Height = h;
|
||||||
});
|
});
|
||||||
|
|
@ -421,6 +460,9 @@ export default {
|
||||||
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
this.detailsData.splice($table.getRowSeq(row) - 1, 1);
|
||||||
},
|
},
|
||||||
beforeEditMethod({ column, row }) {
|
beforeEditMethod({ column, row }) {
|
||||||
|
if (this.pageStatus == "approved") {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
console.log(column, row);
|
console.log(column, row);
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
@ -438,6 +480,35 @@ export default {
|
||||||
console.log(rows, name, params);
|
console.log(rows, name, params);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
pageApproved() {
|
||||||
|
let dataId = this.getDataId();
|
||||||
|
if (!dataId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let sendApproved = () => {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/audit`,
|
||||||
|
loading: '审批中...',
|
||||||
|
data: {
|
||||||
|
id: this.getDataId_BigInt()
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == "200") {
|
||||||
|
this.$mk.success("审批成功");
|
||||||
|
this.pageInit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$mk.error(a.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
sendApproved("");
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,7 @@ export default {
|
||||||
children: [
|
children: [
|
||||||
{ field: 'code', title: '模型编码', span: 12, itemRender: { name: '$input' } },
|
{ field: 'code', title: '模型编码', span: 12, itemRender: { name: '$input' } },
|
||||||
{ field: 'name', title: '模型名称', span: 12, itemRender: { name: '$input' } },
|
{ field: 'name', title: '模型名称', span: 12, itemRender: { name: '$input' } },
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
title: '分类', span: 12,
|
title: '分类', span: 12,
|
||||||
field: 'mold_scheme_category',
|
field: 'mold_scheme_category',
|
||||||
|
|
@ -171,6 +171,8 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue