| | |
| | | v-hasPermi="['tms:tmsDispatchOrder:loading']" |
| | | >委托卸货信息 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="UserFilled" |
| | | :disabled="pageF.single" |
| | | @click="handleZZ" |
| | | v-hasPermi="['tms:tmsDispatchOrder:zzdj']" |
| | | >增值作业登记 |
| | | </el-button> |
| | | </template> |
| | | <template #menu-before="{row}"> |
| | | <el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsGoodsDetail:add']" |
| | | v-hasPermi="['tms:tmsGoodsDetail:add']" v-if="[0,1,2].includes(row.status)" |
| | | :underline="false" icon="el-icon-document-add">运输货品登记 |
| | | </el-link> |
| | | <el-link size="small" type="primary" @click="handleActual(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:update']" |
| | | v-hasPermi="['tms:tmsDispatchOrder:update']" v-if="[0,1,2].includes(row.status)" |
| | | :underline="false" icon="el-icon-set-up">实际运输记录 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="row.status == 0" @click="handleConfirm(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:confirmOrder']" |
| | | :underline="false" icon="el-icon-pointer">确定 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="[0,1,2].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" @click="handleCopy(row)" class="link-btn" :underline="false" |
| | | v-hasPermi="['tms:tmsDispatchOrder:copyOrder']" |
| | |
| | | |
| | | <template #shipperId-form="{disabled}"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" |
| | | <avue-input-table :props="consignorProps" dataType="string" |
| | | :children="consignorOption" :disabled="disabled" |
| | | :on-load="onShipperLoad" suffixIcon="search" |
| | | v-model="form.shipperId" style="width: 80%" |
| | |
| | | <template #receiverId-form="{disabled}"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" |
| | | :children="consignorOption" |
| | | :children="consignorOption" dataType="string" |
| | | :on-load="onConsignorLoad" suffixIcon="search" |
| | | v-model="form.receiverId" :disabled="disabled" |
| | | @change="changeReceiver" style="width: 80%" |
| | |
| | | > |
| | | <el-descriptions-item label="调度单号">{{ form.dispatchNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际运输工具类型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="派出车型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="运输工具号码">{{ form.licensePlate }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号">{{ form.shelfCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="主驾驶员">{{ form.mainDriverName }}</el-descriptions-item> |
| | |
| | | > |
| | | <el-descriptions-item label="调度单号">{{ form.dispatchNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item> |
| | | <el-descriptions-item label="实际运输工具类型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="派出车型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号">{{ form.shelfCode }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption"> |
| | |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | <el-dialog title="增值作业登记" v-model="open4" 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-tabs :option="tabsOption" ref="tabsOptionRef" |
| | | @change="handleChange"></avue-tabs> |
| | | |
| | | <avue-crud v-if="active !== 'tab4'" |
| | | :option="zzItemsTableOption" ref="itemsTableRef" |
| | | :data="zzItemsTableData" |
| | | > |
| | | <template #count="{row}"> |
| | | <el-input-number v-model="row.count" placeholder="计费数量" |
| | | :min="0"></el-input-number> |
| | | </template> |
| | | <template #remark="{row}"> |
| | | <el-input v-model="row.remark" placeholder="备注" ></el-input> |
| | | </template> |
| | | |
| | | |
| | | </avue-crud> |
| | | |
| | | <div v-if="active === 'tab4'"> |
| | | <h2>实报实销费用</h2> |
| | | <avue-form v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <avue-crud |
| | | :option="boxTableOption" |
| | | :data="boxTableData" |
| | | > |
| | | </avue-crud> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="pageF.isUploading" @click="submitTabForm"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button @click="open4 = false">取 消</el-button> |
| | | </div> |
| | | </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> |
| | | |
| | |
| | | getTmsDispatchOrder, |
| | | listTmsDispatchOrder, |
| | | updateTmsDispatchOrder, |
| | | confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang,customsOrder,loadingOrder, |
| | | confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, |
| | | connectHang,customsOrder,loadingOrder,checkCloseOrder,closeOrder |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance} from "vue"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance, nextTick} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | |
| | | import {addTmsConsignor, getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {addTmsTrip, listTmsTrip} from "@/api/tms/tmsTrip"; |
| | | import {addTmsFinanceDetail, listTmsFinanceDetail, updateTmsFinanceDetail} from "@/api/tms/tmsFinanceDetail"; |
| | | import { |
| | | addTmsFinanceDetail, |
| | | listTmsFinanceDetail, |
| | | saveTmsFinanceDetail, |
| | | updateTmsFinanceDetail |
| | | } from "@/api/tms/tmsFinanceDetail"; |
| | | import {getTmsProductInfo, listTmsProductInfo} from "@/api/tms/tmsProductInfo"; |
| | | import {addTmsGoodsDetail, delTmsGoodsDetail, listTmsGoodsDetail, updateTmsGoodsDetail} from "@/api/tms/tmsGoodsDetail"; |
| | | import {getTransportRouteVi, listTransportRouteVi} from "@/api/tms/tmsTransportRouteVi"; |
| | | import {listTmsQuoteItem} from "@/api/tms/tmsQuotePlanItem"; |
| | | import {$DialogForm} from '@smallwei/avue' |
| | | import {$DialogForm, randomId} from '@smallwei/avue' |
| | | import {getTmsCustomerInfo, listTmsCustomerInfo} from "@/api/tms/tmsCustomerInfo"; |
| | | import {getAddressCode} from "@/api/tms/tmsRegion"; |
| | | import {mapRegeo} from "@/api/common"; |
| | | import {getDicts} from "@/api/system/dict/data"; |
| | | import {pushTmsQuoteFee} from "@/api/tms/tmsQuoteFee"; |
| | | |
| | | const {appContext} = getCurrentInstance(); |
| | | |
| | |
| | | actualForm: <any>{}, |
| | | isCustoms:<any> -1, |
| | | isLoad: -1, |
| | | open5:false, |
| | | }) |
| | | const { |
| | | queryParams, form, page, selectionList, open3, |
| | | boxTableData, optionType, |
| | | boxFormOption, boxForm, boxTableOption, title, open, open2, |
| | | goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad |
| | | goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad,open5 |
| | | } = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'TmsDispatchOrder', |
| | |
| | | ], |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | change: (val: any) => { |
| | | console.log(val) |
| | | const table = crudRef.value?.getPropRef?.('quoteDetailId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | console.log(active) |
| | | Object.assign(form.value, { |
| | | quoteDetailId: active.quoteDetailId, |
| | | transportLine: active.transportRoute, |
| | |
| | | requiredVehicleTypes: active.vehicleType, |
| | | quotePlanId: active.quotePlanId, |
| | | }); |
| | | form.value.shipperId = undefined; |
| | | form.value.shipperRegionLabel = undefined; |
| | | form.value.shipperAddress = undefined; |
| | | form.value.shipperMobile = undefined; |
| | | form.value.receiverId = undefined; |
| | | form.value.receiverAddress = undefined; |
| | | form.value.receiverMobile = undefined; |
| | | } |
| | | }, |
| | | children: { |
| | |
| | | search: true, |
| | | }, |
| | | isUrgent: { |
| | | label: '是否紧急否', |
| | | label: '是否紧急', |
| | | display: false, minWidth: 100, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | iscc: { |
| | | 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', |
| | |
| | | // display: false, |
| | | // search: true, |
| | | // }, |
| | | requiredVehicleTypes: { |
| | | label: '下单车型',minWidth: 130, |
| | | display: false, type: 'select', search: true, |
| | | dicUrl: '/system/dict/data/type/vehicle_type', |
| | | dataType: 'string', |
| | | |
| | | }, |
| | | actualVehicleType: { |
| | | label: '实际运输工具类型', minWidth: 130, |
| | | label: '派出车型', minWidth: 130, |
| | | display: false, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', |
| | | display: false, |
| | | hide: false, fixed: 'right', |
| | | search: true, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "状态不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | inStatusList: { |
| | | label: '状态', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', |
| | | display: false,multiple:true, |
| | | hide: true, |
| | | search: true, |
| | | |
| | | }, |
| | | confirmTime: { |
| | | label: '确认时间', minWidth: 180, |
| | |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | createBy: { |
| | | label: '创建人', minWidth: 150, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | createTimeRange: { |
| | | label: '创建时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | updateBy: { |
| | | label: '更新人', minWidth: 150, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: false, |
| | | search: true, |
| | | }, |
| | | updateTime: { |
| | | label: '更新时间', minWidth: 180, |
| | |
| | | tripType: { |
| | | label: '行程类型', |
| | | display: true, |
| | | change: function ({value}: any) { |
| | | if (value == '5'){ |
| | | itineraryOption.value.column.iscc.display = true |
| | | } |
| | | }, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/trip_type', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "行程类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | iscc: { |
| | | label: '是否查车', |
| | | display: false, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否查车不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | |
| | | display: true, |
| | | }, |
| | | voucherUrl: { |
| | | label: '行程凭证', |
| | | label: '凭证', |
| | | display: true, |
| | | span: 24, dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | type: 'img', |
| | | |
| | | }, |
| | | |
| | |
| | | } |
| | | ], |
| | | }, |
| | | voucherUrl: { |
| | | label: '行程凭证', |
| | | currency:{ |
| | | label: '币种', |
| | | display: true, |
| | | span: 24, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "币种不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | |
| | | }, |
| | | voucherUrl: { |
| | | label: '费用凭证', |
| | | display: true, |
| | | accept: 'string', dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | |
| | | }, |
| | | remark:{ |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, span: 24 |
| | | }, |
| | | dataSource: { |
| | | label: '数据来源', |
| | |
| | | label: '金额', |
| | | display: true, |
| | | }, |
| | | currency:{ |
| | | label: '币种', |
| | | display: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | }, |
| | | feeVoucherUrl: { |
| | | label: '费用凭证', |
| | | display: true, |
| | |
| | | accept: 'string', dataType: 'object', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | |
| | | }, |
| | | remark:{ |
| | | label: '备注', |
| | | }, |
| | | |
| | | } |
| | |
| | | }) |
| | | |
| | | |
| | | 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, |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | const goodsTableOption = ref({ |
| | |
| | | const itemsCrudRef = ref() |
| | | const itemsTableData = ref<any>([]) |
| | | |
| | | const tabsOption = ref({ |
| | | column: [ |
| | | { |
| | | label: '运输增值作业登记', |
| | | prop: 'tab1', |
| | | name: 'tab1', |
| | | value: '0', |
| | | |
| | | }, |
| | | { |
| | | label: '报关增值作业登记', |
| | | prop: 'tab2', |
| | | name: 'tab2', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '装卸增值作业登记', |
| | | prop: 'tab3', |
| | | name: 'tab3', |
| | | value: '2', |
| | | |
| | | }, |
| | | { |
| | | label: '实报实销费用登记', |
| | | prop: 'tab4', |
| | | name: 'tab4', |
| | | value: '3', |
| | | } |
| | | ] |
| | | }) |
| | | const tabsOptionRef = ref(); |
| | | const active = ref('tab1'); |
| | | const open4 = ref(false); |
| | | const zzItemsTableOption = ref({ |
| | | pageKey: 'zzItemsTable', |
| | | rowKey: 'rowKey', |
| | | header: false, |
| | | menu: false, |
| | | selection: false, |
| | | column: { |
| | | freeName:{ |
| | | label: '费用名称', |
| | | }, |
| | | unit:{ |
| | | label: '计量单位', |
| | | }, |
| | | count:{ |
| | | label : '计费数量' |
| | | }, |
| | | remark:{ |
| | | label: '备注' |
| | | } |
| | | } |
| | | }); |
| | | const zzItemsTableData = ref(); |
| | | |
| | | |
| | | |
| | | |
| | | const { |
| | | tableData, |
| | | pageF, |
| | |
| | | isLoad.value = isLoad.value == 0 && !pageF.single ? 0 : -1; |
| | | console.log(pageF.single) |
| | | }, |
| | | getBeginListFunc: () => { |
| | | getBeginListFunc: (params = {}) => { |
| | | queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.createTimeRange, 'createTime') || {}; |
| | | queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.updateTimeRange, 'updateTime') || {}; |
| | | queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.confirmTimeRange, 'confirmTime') || {}; |
| | | queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.okTimeRange, 'okTime') || {}; |
| | | queryParams.value = proxy.addDateRangeNew(queryParams.value, queryParams.value?.orderTimeRange, 'orderTime') || {}; |
| | | return params; |
| | | }, |
| | | handleBeforeOpenFunc:(type:string)=>{ |
| | | if(type == 'add'){ |
| | | form.value = {}; |
| | | } |
| | | } |
| | | |
| | | }) |
| | | const handleConfirm = (row: any) => { |
| | |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else if (optionType.value === 'customs') { |
| | | customsOrder({id:form.value.id}).then(res => { |
| | | customsOrder({id:form.value.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName, |
| | | }).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else if (optionType.value === 'loading') { |
| | | loadingOrder({id:form.value.id}).then(res => { |
| | | loadingOrder({id:form.value.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName, |
| | | }).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | |
| | | optionType.value = 'loading'; |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const quotationItems = ref(); |
| | | const getQuotationItems = async () => { |
| | | let res = await getDicts("sys_quotation_items"); |
| | | quotationItems.value = res.data || []; |
| | | } |
| | | getQuotationItems(); |
| | | |
| | | const getTabData = (val:string)=>{ |
| | | console.log(val) |
| | | let filter = quotationItems.value.filter((item:any)=>{ |
| | | return item.remark == val; |
| | | }); |
| | | if (filter.length > 0){ |
| | | zzItemsTableData.value = filter.map((item:any)=>{ |
| | | return { rowKey: randomId() ,freeName: item.dictLabel,free: item.dictValue,unit: '次'} |
| | | }) |
| | | }else{ |
| | | zzItemsTableData.value = [] |
| | | } |
| | | } |
| | | |
| | | const getTab4Data = ()=>{ |
| | | listTmsFinanceDetail({ |
| | | dispatchOrderId: form.value.id, financeType: 2, |
| | | pageNum: 1, pageSize: 999 |
| | | }).then(async res => { |
| | | boxTableData.value = res.rows || []; |
| | | |
| | | boxForm.value = { |
| | | dispatchOrderId: form.value.id, |
| | | dataSource: 0, |
| | | financeType: 2, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | const submitTabForm = ()=>{ |
| | | if (['tab1','tab2','tab3'].includes(active.value)){ |
| | | let quoteFeeItems = zzItemsTableData.value.filter((item:any)=>{ |
| | | return item.count && item.count > 0; |
| | | }) |
| | | console.log(quoteFeeItems) |
| | | pushTmsQuoteFee({...form.value,quoteFeeItems:quoteFeeItems}).then(res=>{ |
| | | ElMessage.success('保存成功'); |
| | | open4.value = false; |
| | | }) |
| | | }else if (active.value === 'tab4'){ |
| | | if (Array.isArray(boxForm.value.feeVoucherUrl)) { |
| | | boxForm.value.feeVoucherUrl = boxForm.value.feeVoucherUrl.toString(); |
| | | } |
| | | //boxForm.value.rowItems = boxTableData.value; |
| | | saveTmsFinanceDetail(boxForm.value).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | | }) |
| | | boxFormRef.value?.resetFields(); |
| | | getTab4Data(); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const handleChange = (column:any)=>{ |
| | | active.value = column.prop; |
| | | if (['tab1','tab2','tab3'].includes(column.prop)){ |
| | | getTabData(column.value) |
| | | }else if (column.prop === 'tab4'){ |
| | | getTab4Data() |
| | | } |
| | | } |
| | | |
| | | const handleZZ = () => { |
| | | open4.value = true; |
| | | form.value = selectionList.value[0]; |
| | | handleChange(tabsOption.value.column[0]); |
| | | |
| | | boxFormOption.value = financeOption.value; |
| | | boxTableOption.value = financeTableOption.value; |
| | | nextTick(()=>{ |
| | | tabsOptionRef.value.active = "0"; |
| | | |
| | | }) |
| | | } |
| | | |
| | | const handleClose = (row:any) => { |
| | | |
| | | if (row.status == 2){ |
| | | 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> |