From 939ee5a461a64b40b23d2b5f51c69dead13ee7e3 Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期二, 30 十二月 2025 23:21:03 +0800
Subject: [PATCH] 提交
---
ui/admin-ui3/src/views/tms/generationCost/index.vue | 161 +++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 142 insertions(+), 19 deletions(-)
diff --git a/ui/admin-ui3/src/views/tms/generationCost/index.vue b/ui/admin-ui3/src/views/tms/generationCost/index.vue
index 52f7770..deddddf 100644
--- a/ui/admin-ui3/src/views/tms/generationCost/index.vue
+++ b/ui/admin-ui3/src/views/tms/generationCost/index.vue
@@ -47,7 +47,10 @@
</el-button>
</template>
<template #menu-before="{row}">
-
+ <el-link size="small" type="primary" v-if="[0,1,2,3].includes(row.status)" @click="handleClose(row)" class="link-btn"
+ v-hasPermi="['tms:tmsDispatchOrder:closeOrder']"
+ :underline="false" icon="el-icon-close">浣滃簾
+ </el-link>
<el-link size="small" type="primary" v-if="![0,1].includes(row.status)" @click="handleLogItinerary(row)"
v-hasPermi="['tms:tmsTrip:list']"
class="link-btn" :underline="false" icon="el-icon-view">鏌ョ湅琛岀▼
@@ -95,6 +98,9 @@
:true-value="1"
:false-value="0"
@change="(e:number) =>isYFChange(e, row)" ></el-checkbox>
+ </template>
+ <template #remark="{row}">
+ <el-input v-model="row.remark" placeholder="澶囨敞" ></el-input>
</template>
<template #expand="{row}">
<el-descriptions :column="3" border v-if="row.isYF == 1">
@@ -222,7 +228,31 @@
</template>
</el-dialog>
+ <el-dialog title="璋冨害鍗曚綔搴�" v-model="open5" class="avue-dialog avue-dialog--top" width="80%">
+ <el-descriptions :column="3" border>
+ <el-descriptions-item label="璋冨害鍗曞彿">{{form.dispatchNo}}</el-descriptions-item>
+ <el-descriptions-item label="瀹㈡埛鍚嶇О">{{form.customerName}}</el-descriptions-item>
+ <el-descriptions-item label="椤圭洰鍚嶇О">{{form.projectName}}</el-descriptions-item>
+ <el-descriptions-item label="杩愯緭璺嚎">{{form.transportLine}}</el-descriptions-item>
+ <el-descriptions-item label="杞﹀瀷">{{form.$actualVehicleType}}</el-descriptions-item>
+ <el-descriptions-item label="杞︾墝">{{form.licensePlate}}</el-descriptions-item>
+ </el-descriptions>
+ <avue-form v-model="boxForm" ref="boxFormRef"
+ :option="boxFormOption">
+
+ </avue-form>
+ <template #footer>
+ <div class="dialog-footer">
+ <el-button type="primary"
+ :loading="pageF.isUploading" @click="submitForm5">
+ {{ pageF.isUploading ? '鎻愪氦涓�' : '纭� 瀹�' }}
+ </el-button>
+
+ <el-button @click="open5 = false">鍙� 娑�</el-button>
+ </div>
+ </template>
+ </el-dialog>
</basicContainer>
</template>
@@ -237,8 +267,8 @@
costListTmsDispatchOrder,
updateTmsDispatchOrder,
generateTmsDispatchOrder, initGenerate, initYSGenerate,
- ysGenerateTmsDispatchOrder, initYFGenerate,yfGenerateTmsDispatchOrder,
- getServiceProvider
+ ysGenerateTmsDispatchOrder, initYFGenerate, yfGenerateTmsDispatchOrder,
+ getServiceProvider, checkCloseOrder, closeOrder
} from "@/api/tms/tmsDispatchOrder";
import useCurrentInstance from "@/utils/useCurrentInstance";
import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance, nextTick} from "vue";
@@ -306,11 +336,12 @@
isLoad: -1,
active: 'tab1',
quotationItems:[],
- serviceProviderList: <any>[]
+ serviceProviderList: <any>[],
+ open5:false,
})
const {
queryParams, form, page, selectionList,
- boxTableData, optionType,open,
+ boxTableData, optionType,open,open5,
boxFormOption, boxForm, boxTableOption,boxItemTableOption,selectionList2,isCustoms,isLoad,active,quotationItems,serviceProviderList
} = toRefs(data);
const option = ref({
@@ -622,7 +653,14 @@
search: true,
},
isUrgent: {
- label: '鏄惁绱ф�ュ惁',
+ label: '鏄惁绱ф��',
+ display: false, minWidth: 100,
+ search: true,
+ type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
+
+ },
+ isfk: {
+ label: '鏄惁鏀剧┖',
display: false, minWidth: 100,
search: true,
type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string',
@@ -763,6 +801,9 @@
}, {
label: '寰呯敓鎴愬簲浠�',
prop: 'tab2',
+ }, {
+ label: '宸蹭綔搴�',
+ prop: 'tab3',
}]
})
const tabsOption2 = ref({
@@ -871,10 +912,15 @@
voucherUrl: {
label: '琛岀▼鍑瘉',
display: true,
- span: 24,
accept: 'string', dataType: 'string',
type: 'upload',
action: '/common/upload2',
+
+ },
+ remark: {
+ label: '澶囨敞',span:24,
+ display: true,
+ type: 'textarea',
},
dataSource: {
@@ -925,6 +971,10 @@
action: '/common/upload2',
},
+ remark: {
+ label: '澶囨敞',
+ display: true,
+ },
isYF:{
label: '鏄惁搴斾粯璐圭敤',
display: true,
@@ -973,6 +1023,9 @@
},
sum: {
label: '鎬婚噾棰�',
+ },
+ remark: {
+ label: '澶囨敞',
},
isYF: {
label: '鏄惁搴斾粯璐圭敤',
@@ -1106,6 +1159,28 @@
}
})
+
+const closeOption = ref({
+ menuBtn: false,
+ labelWidth: 120,
+ column: {
+ closeWhy:{
+ label: '浣滃簾鍘熷洜',span:24,
+ type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/close_why',
+ rules: [
+ {
+ required: true,
+ message: "浣滃簾鍘熷洜涓嶈兘涓虹┖", trigger: "change"
+ }
+ ],
+ },
+ closeWhyRemark:{
+ label: '浣滃簾鍘熷洜璇存槑',
+ type: 'textarea',
+ span:24,
+ },
+ }
+})
@@ -1247,36 +1322,53 @@
const getTab1Data = async () =>{
- const quotePlanItemRes = await listTmsQuoteItem({quotePlanId: form.value.quotePlanId, pageNum: 1, pageSize: 999});
- let items = quotePlanItemRes.rows || [];
-
+ const quotePlanItemRes2 = await listTmsQuoteItem({quotePlanId: form.value.quotePlanId, pageNum: 1, pageSize: 999});
+ let list = quotePlanItemRes2.rows || [];
+ let quotePlanItemRes = await getDicts("sys_quotation_items");
+ console.log(quotePlanItemRes)
+ let items = quotePlanItemRes.data || [];
let res = await listTmsQuoteFee({dispatchId: form.value.id, pageNum: 1, pageSize: 999});
let rowsData = res.rows || [];
selectionList2.value = []
itemsTableRef.value?.clearSelection();
itemsTableData.value = items.map( (item: any) => {
- let find = rowsData.find((ele: any) => {
- return item.free == ele.free
+ let find2 = list.find((ele: any) => {
+ return item.dictValue == ele.free
});
+ let find = rowsData.find((ele: any) => {
+ return item.dictValue == ele.free
+ });
+ delete item.remark;
if (find) {
let aRow = {
+ unit: '娆�',
+
...item,
- feeType: item.freeName,
- rowKey: item.id,
+ freeName:item.dictLabel,
+ feeType: item.dictLabel,
+ rowKey: item.dictCode,
+ free: item.dictValue,
...find,
+ ...find2,
+ price: find.price||0,
+ currency: find.currency|| 'RMB',
+ sum: find.sum|| 0,
};
selectionList2.value.push(aRow);
return aRow
} else {
return {
...item,
- rowKey: item.id,
- feeType: item.freeName,
- unit: item.unit,
- price: item.price,
- currency: item.currency,
+ freeName:item.dictLabel,
+ rowKey: item.dictCode,
+ feeType: item.dictLabel,
+ price: 0,
+ currency: 'RMB',
count: 0,
+ unit: '娆�',
+ free: item.dictValue,
sum: 0,
+ ...find2,
}
}
})
@@ -1339,6 +1431,8 @@
}else if (column.prop === 'tab2'){
accountsPayableStatus = 0;
+ }else if (column.prop === 'tab3'){
+ queryParams.value.inStatusList = [5];
}
page.value.currentPage = 1;
queryParams.value.accountsReceivableStatus = accountsReceivableStatus;
@@ -1528,6 +1622,35 @@
row.yfServiceProviderName = active.serviceProviderName;
row.yfServiceProviderType = active.serviceProviderType;
}
+const handleClose = (row:any) => {
+ if (row.status == 2 && row.isfk == 1){
+ checkCloseOrder(row.id).then(res=>{
+ open5.value = true;
+ form.value = row;
+ boxFormOption.value = closeOption.value;
+ });
+ }else{
+ open5.value = true;
+ form.value = row;
+ boxFormOption.value = closeOption.value;
+ }
+}
+const submitForm5 = () =>{
+ boxFormRef.value.validate((valid: boolean,done:any) => {
+ console.log(valid)
+ if(valid){
+ boxForm.value.id = form.value.id;
+ closeOrder(boxForm.value).then(res=>{
+ ElMessage.success('鎿嶄綔鎴愬姛');
+ open5.value = false;
+ done();
+ onLoad(page.value)
+ }).catch(err=>{
+ done();
+ })
+ }
+ })
+}
</script>
\ No newline at end of file
--
Gitblit v1.8.0