模具订单审批
This commit is contained in:
parent
a4869f7a8b
commit
8d7e3ec103
|
|
@ -8,9 +8,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<a-button type="primary" @click="ok" >保存</a-button>
|
<a-button type="primary" @click="ok">保存</a-button>
|
||||||
<a-button @click="pageApproved" type="primary" :disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
<a-button @click="pageApproved" type="primary" :disabled="!this.getDataId() || pageStatus == 'approved'">审批
|
||||||
</a-button>
|
</a-button>
|
||||||
|
<a-button @click="pageUnApproved" type="primary" :disabled="!this.getDataId() || pageStatus != 'approved'">弃审
|
||||||
|
</a-button>
|
||||||
|
|
||||||
<a-button @click="back">关闭</a-button>
|
<a-button @click="back">关闭</a-button>
|
||||||
|
|
||||||
|
|
@ -39,6 +41,25 @@
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
|
|
||||||
|
|
||||||
|
<vxe-column title="产品结构" width="160" v-if="getDataId()">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div v-if="getDataId() && row.id">
|
||||||
|
<a-button v-if="!row.is_product_structure" @click.stop="pageAuditDetail(row)" type="primary">审核</a-button>
|
||||||
|
<a-button v-else @click.stop="pageUnAuditDetail(row)">弃审</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
<vxe-column title="分模结构" width="160" v-if="getDataId()">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div v-if="getDataId() && row.id">
|
||||||
|
<a-button v-if="!row.is_mold_structure" @click.stop="pageAuditDetail2(row)" type="primary">审核</a-button>
|
||||||
|
<a-button v-else @click.stop="pageUnAuditDetail2(row)">弃审</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</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"
|
<vxe-column field="production_type" title="布产类型" width="160" :params="options_production_type"
|
||||||
|
|
@ -116,7 +137,7 @@ export default {
|
||||||
|
|
||||||
uploadDefaultImg: null,
|
uploadDefaultImg: null,
|
||||||
|
|
||||||
|
|
||||||
detailDataFieldName: "mold_order",
|
detailDataFieldName: "mold_order",
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
|
@ -154,13 +175,13 @@ export default {
|
||||||
},
|
},
|
||||||
// 表单项
|
// 表单项
|
||||||
items: [
|
items: [
|
||||||
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input', props: { } } },
|
{ field: 'code', title: '订单编码', span: 6, itemRender: { name: '$input', props: {} } },
|
||||||
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input', props: { } } },
|
{ field: 'name', title: '客户名称', span: 6, itemRender: { name: '$input', props: {} } },
|
||||||
{ field: 'contact', title: '联系人', span: 6, itemRender: { name: '$input', props: { } } },
|
{ field: 'contact', title: '联系人', span: 6, itemRender: { name: '$input', props: {} } },
|
||||||
{ field: 'phone', title: '联系电话', span: 6, itemRender: { name: '$input', props: { } } },
|
{ field: 'phone', title: '联系电话', span: 6, itemRender: { name: '$input', props: {} } },
|
||||||
|
|
||||||
{ field: 'salesman', title: '业务员姓名', span: 6, itemRender: { name: '$input', props: { } } },
|
{ field: 'salesman', title: '业务员姓名', span: 6, itemRender: { name: '$input', props: {} } },
|
||||||
{ field: 'contract_no', title: '合同号', span: 6, itemRender: { name: '$input' , props: { }} },
|
{ 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" } } },
|
||||||
|
|
||||||
|
|
@ -173,7 +194,7 @@ export default {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input', props: { } } },
|
{ field: 'remark', title: '备注', span: 24, itemRender: { name: '$input', props: {} } },
|
||||||
|
|
||||||
|
|
||||||
]
|
]
|
||||||
|
|
@ -261,6 +282,8 @@ export default {
|
||||||
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) {
|
if (a.data[this.detailDataFieldName].auditor_uid) {
|
||||||
this.pageStatus = 'approved';
|
this.pageStatus = 'approved';
|
||||||
|
} else {
|
||||||
|
this.pageStatus = '';
|
||||||
}
|
}
|
||||||
this.setPageReadonly(this.pageStatus == 'approved');
|
this.setPageReadonly(this.pageStatus == 'approved');
|
||||||
this.detailsDataInit();
|
this.detailsDataInit();
|
||||||
|
|
@ -285,13 +308,13 @@ export default {
|
||||||
|
|
||||||
setPageReadonly(readonly) {
|
setPageReadonly(readonly) {
|
||||||
this.formOptions.items.forEach(item => {
|
this.formOptions.items.forEach(item => {
|
||||||
|
|
||||||
if (item.field == 'paid_amount'){
|
if (item.field == 'paid_amount') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.field == 'paid_ratio'){
|
if (item.field == 'paid_ratio') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (item.itemRender && item.itemRender.name == "$select") {
|
if (item.itemRender && item.itemRender.name == "$select") {
|
||||||
item.itemRender.props.disabled = readonly;
|
item.itemRender.props.disabled = readonly;
|
||||||
}
|
}
|
||||||
|
|
@ -488,6 +511,96 @@ export default {
|
||||||
onPopupSelected({ rows, name, params }) {
|
onPopupSelected({ rows, name, params }) {
|
||||||
console.log(rows, name, params);
|
console.log(rows, name, params);
|
||||||
},
|
},
|
||||||
|
pageUnAuditDetail(row) {
|
||||||
|
this.$mk.confirm('您确定要弃审吗?').then(type => {
|
||||||
|
if (type == 'confirm') {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/cancel/product/audit`,
|
||||||
|
loading: '弃审中...',
|
||||||
|
data: {
|
||||||
|
id: this.$mk.toBigInt(row.id)
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == "200") {
|
||||||
|
this.$mk.success("弃审成功");
|
||||||
|
this.pageInit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$mk.error(a.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pageAuditDetail(row) {
|
||||||
|
this.$mk.confirm('您确定要审批吗?').then(type => {
|
||||||
|
if (type == 'confirm') {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/product/audit`,
|
||||||
|
loading: '审批中...',
|
||||||
|
data: {
|
||||||
|
id: this.$mk.toBigInt(row.id)
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == "200") {
|
||||||
|
this.$mk.success("审批成功");
|
||||||
|
this.pageInit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$mk.error(a.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
pageUnAuditDetail2(row) {
|
||||||
|
this.$mk.confirm('您确定要弃审吗?').then(type => {
|
||||||
|
if (type == 'confirm') {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/cancel/mould/audit`,
|
||||||
|
loading: '弃审中...',
|
||||||
|
data: {
|
||||||
|
id: this.$mk.toBigInt(row.id)
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == "200") {
|
||||||
|
this.$mk.success("弃审成功");
|
||||||
|
this.pageInit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$mk.error(a.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
pageAuditDetail2(row) {
|
||||||
|
this.$mk.confirm('您确定要审批吗?').then(type => {
|
||||||
|
if (type == 'confirm') {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/mould/audit`,
|
||||||
|
loading: '审批中...',
|
||||||
|
data: {
|
||||||
|
id: this.$mk.toBigInt(row.id)
|
||||||
|
},
|
||||||
|
useBigInt: true
|
||||||
|
}).then(a => {
|
||||||
|
if (a.code == "200") {
|
||||||
|
this.$mk.success("审批成功");
|
||||||
|
this.pageInit();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
this.$mk.error(a.msg);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
pageApproved() {
|
pageApproved() {
|
||||||
let dataId = this.getDataId();
|
let dataId = this.getDataId();
|
||||||
|
|
@ -519,6 +632,35 @@ export default {
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
pageUnApproved() {
|
||||||
|
let dataId = this.getDataId();
|
||||||
|
if (!dataId) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
let sendApproved = () => {
|
||||||
|
this.$mk.post({
|
||||||
|
url: `${BASE_URL.BASE_URL}/MoldOrder/v1/mold/order/cancel/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("");
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
// 监听属性
|
// 监听属性
|
||||||
watch: {
|
watch: {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue