This commit is contained in:
zxx 2024-03-26 16:55:37 +08:00
parent b821dabcb9
commit ee075ea7f8
14 changed files with 59 additions and 17 deletions

View File

@ -289,6 +289,7 @@ export default {
this.$forceUpdate() this.$forceUpdate()
} else { } else {
// id // id
this.addModeItems.forEach(item => { this.addModeItems.forEach(item => {
this.pageOptions.formOptions.items.push(item); this.pageOptions.formOptions.items.push(item);

View File

@ -39,6 +39,9 @@
<template #op="{ row }"> <template #op="{ row }">
<div class="oplinks"> <div class="oplinks">
<a @click.stop="pageDetail(row)" title="详情">
<a-icon type="file"/>
</a>
<a @click.stop="pageEdit(row)" title="编辑"> <a @click.stop="pageEdit(row)" title="编辑">
<a-icon type="edit"/> <a-icon type="edit"/>
</a> </a>
@ -76,6 +79,7 @@ export default {
keyName: 'id', // keyName: 'id', //
// //
actions: { // Api actions: { // Api
// =============================== Start =============================== // =============================== Start ===============================
@ -91,8 +95,6 @@ export default {
CustomBatchHandle: `${BASE_URL.BASE_URL}/Custom/v1/custom/batchHandle`, // CustomBatchHandle: `${BASE_URL.BASE_URL}/Custom/v1/custom/batchHandle`, //
CustomOpen: `${BASE_URL.BASE_URL}/Custom/v1/custom/open`, // CustomOpen: `${BASE_URL.BASE_URL}/Custom/v1/custom/open`, //
CustomClose: `${BASE_URL.BASE_URL}/Custom/v1/custom/close`, // CustomClose: `${BASE_URL.BASE_URL}/Custom/v1/custom/close`, //
BalanceAdd: `${BASE_URL.BASE_URL}/Custom/v1/balance/add`, //
BalanceReduce: `${BASE_URL.BASE_URL}/Custom/v1/balance/reduce`, //
// =============================== End =============================== // =============================== End ===============================
}, },
@ -179,6 +181,7 @@ export default {
{field: 'type', sortable: true, title: '类型',formatter: this.formatType, width: 150}, // {field: 'type', sortable: true, title: '类型',formatter: this.formatType, width: 150}, //
{field: 'industry', sortable: true, title: '行业', width: 150}, // {field: 'industry', sortable: true, title: '行业', width: 150}, //
{field: 'contact', title: '联系人', width: 150}, // {field: 'contact', title: '联系人', width: 150}, //
{field: 'total_balance', sortable: true, title: '总结余', width: 150}, //
{field: 'contact_phone', sortable: true, title: '联系人电话', width: 150}, // {field: 'contact_phone', sortable: true, title: '联系人电话', width: 150}, //
{field: 'total_ton', sortable: true, title: '总计交易吨数', width: 150}, // {field: 'total_ton', sortable: true, title: '总计交易吨数', width: 150}, //
{field: 'total_count', sortable: true, title: '总计交易次数', width: 150}, // {field: 'total_count', sortable: true, title: '总计交易次数', width: 150}, //
@ -191,7 +194,6 @@ export default {
title: '创建时间', title: '创建时间',
showHeaderOverflow: true showHeaderOverflow: true
}, // }, //
{field: 'total_balance', sortable: true, title: '总结余', width: 150}, //
{field: 'total_amount', sortable: true, title: '总交易金额', width: 150}, // {field: 'total_amount', sortable: true, title: '总交易金额', width: 150}, //
{field: 'remark', sortable: true, title: '备注', width: 250}, // {field: 'remark', sortable: true, title: '备注', width: 250}, //
{ {
@ -207,7 +209,7 @@ export default {
// =============================== Start =============================== // =============================== Start ===============================
{title: '操作', slots: {default: 'op'}, width: 120,fixed: 'right'} {title: '操作', slots: {default: 'op'}, width: 160,fixed: 'right'}
] ]
} }
@ -373,7 +375,34 @@ export default {
onSearch() { onSearch() {
this.$refs.xGrid.commitProxy('query') // this.$refs.xGrid.commitProxy('query') //
}, },
pageDetail(row){
console.log("list row",row)
if (!row) { //
this.$mk.msg("请选择行"); //
return; //
}
this.$mk.dialog.open({
height: 800,
width: 1200,
page: () => import('./Detail.vue'),
title: "详情",
dataId: row.id,
pageOptions: {
ApiUrl: this.actions.CustomDetail,
ApiData: {
id: row.id
},
FieldName: "custom",
title: "详情",
},
callback: ({success}) => {
console.log("success",success);
this.$forceUpdate() //
}
})
}
}, },
// //

View File

@ -274,7 +274,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/DriverWages/DriverWagesAdd" closeRoute: "/DriverWages/DriverWagesCreate"
}); });
} else { } else {
// //
@ -314,6 +314,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -226,7 +226,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/DriverWages/DriverWagesGiornaleLogAdd" closeRoute: "/DriverWages/DriverWagesGiornaleLogCreate"
}); });
} else { } else {
// //
@ -266,6 +266,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -231,7 +231,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/DriverWages/DriverWagesSurplusAdd" closeRoute: "/DriverWages/DriverWagesSurplusCreate"
}); });
} else { } else {
// //
@ -271,6 +271,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -209,7 +209,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/Maintenance/MaintenanceAdd" closeRoute: "/Maintenance/MaintenanceCreate"
}); });
} else { } else {
// //
@ -249,6 +249,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -305,7 +305,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/Maintenance/MaintenanceGiornaleLogAdd" closeRoute: "/Maintenance/MaintenanceGiornaleLogCreate"
}); });
} else { } else {
// //
@ -347,6 +347,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -270,7 +270,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/Maintenance/OtherExpensesLogAdd" closeRoute: "/Maintenance/OtherExpensesLogCreate"
}); });
} else { } else {
// //
@ -314,6 +314,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -317,6 +317,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -224,7 +224,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/SoilQualityMaterial/SoilQualityMaterialAliasAdd" closeRoute: "/SoilQualityMaterial/SoilQualityMaterialAliasCreate"
}); });
} else { } else {
// //
@ -264,6 +264,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -284,7 +284,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/Tire/TireAdd" closeRoute: "/Tire/TireCreate"
}); });
} else { } else {
// //
@ -330,6 +330,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -642,7 +642,7 @@ export default {
// //
if (!this.isEdit) { if (!this.isEdit) {
this.$closePage({ this.$closePage({
closeRoute: "/TrainNumber/TrainNumberAdd" closeRoute: "/TrainNumber/TrainNumberCreate"
}); });
} else { } else {
// //
@ -739,6 +739,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="page-body"> <div class="page-body">
<div class="page-header"> <!-- <div class="page-header">
<a-descriptions title="User Info"> <a-descriptions title="User Info">
<a-descriptions-item label="UserName"> <a-descriptions-item label="UserName">
Zhou Maomao Zhou Maomao
@ -19,7 +19,7 @@
No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
</a-descriptions-item> </a-descriptions-item>
</a-descriptions> </a-descriptions>
</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>
@ -324,6 +324,7 @@ export default {
this.$mk.success("保存成功"); this.$mk.success("保存成功");
if (!this.isEdit) { // if (!this.isEdit) { //
this.back(); this.back();
this.$forceUpdate()
} }
}).catch((a) => { // }).catch((a) => { //
this.$mk.error(a.data.msg); // this.$mk.error(a.data.msg); //

View File

@ -215,6 +215,7 @@ export default {
}); });
} else { } else {
this.back(); this.back();
this.$forceUpdate()
} }
} }