| | |
| | | <template> |
| | | <basicContainer> |
| | | <avue-crud |
| | | :option="option" |
| | | :table-loading="pageF.loading" |
| | | :data="tableData" |
| | | :page="page" |
| | | :permission="permissionList" |
| | | :before-open="beforeOpen" |
| | | v-model="form" v-model:search="queryParams" |
| | | ref="crudRef" |
| | | @row-update="rowUpdate" |
| | | @row-save="rowSave" |
| | | @refresh-change="refreshChange" |
| | | @row-del="rowDel" |
| | | @search-change="searchChange" |
| | | @search-reset="searchReset" |
| | | @selection-change="selectionChange" |
| | | @current-change="currentChange" |
| | | @size-change="sizeChange" |
| | | @on-load="onLoad" |
| | | > |
| | | <avue-crud :option="option" :table-loading="pageF.loading" :data="tableData" :page="page" |
| | | :permission="permissionList" :before-open="beforeOpen" v-model="form" v-model:search="queryParams" ref="crudRef" |
| | | @row-update="rowUpdate" @row-save="rowSave" @refresh-change="refreshChange" @row-del="rowDel" |
| | | @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange" |
| | | @current-change="currentChange" @size-change="sizeChange" @on-load="onLoad"> |
| | | <template #licensePlate-form="{ row, disabled }"> |
| | | <el-input v-model="form.licensePlate" placeholder="请选择车牌号" readonly :disabled="disabled" |
| | | @click="handleVehicleSelect"> |
| | | <template #append> |
| | | <el-button icon="el-icon-search" @click="handleVehicleSelect" /> |
| | | </template> |
| | | </el-input> |
| | | </template> |
| | | <!-- template 中 --> |
| | | <template #requiredVehicleTypes-form="{ row, disabled }"> |
| | | <template v-if="disabled"> |
| | | <span>{{ dictFormat(vehicle_type, row?.requiredVehicleTypes || form?.requiredVehicleTypes) }}</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="form.requiredVehicleTypes" placeholder="请选择车型" style="width: 100%"> |
| | | <el-option v-for="item in vehicle_type" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | |
| | | <template #orderType-form="{ row, disabled }"> |
| | | <template v-if="disabled"> |
| | | <span>{{ dictFormat(order_type, row?.orderType || form?.orderType) }}</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="form.orderType" placeholder="请选择订单类型" @change="(val) => handleOrderTypeChange(val)" |
| | | style="width: 100%" clearable> |
| | | <el-option v-for="item in order_type" :key="item.value" :label="item.label" :value="parseInt(item.value)" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | |
| | | <template #actualVehicleType-form="{ row, disabled }"> |
| | | <template v-if="disabled"> |
| | | <span>{{ dictFormat(vehicle_type, row?.actualVehicleType || form?.actualVehicleType) }}</span> |
| | | </template> |
| | | <template v-else> |
| | | <el-select v-model="form.actualVehicleType" placeholder="请选择实际车型" style="width: 100%"> |
| | | <el-option v-for="item in vehicle_type" :key="item.value" :label="item.label" :value="item.value" /> |
| | | </el-select> |
| | | </template> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <template #menu-left> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:remove']"--> |
| | | <!-- >删除--> |
| | | <!-- </el-button>--> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | | icon="Download" |
| | | @click="handleExport" |
| | | v-hasPermi="['tms:tmsDispatchOrder:export']" |
| | | >导出 |
| | | <el-button type="warning" plain icon="Download" @click="handleExport" |
| | | v-hasPermi="['tms:tmsDispatchOrder:export']">导出 |
| | | </el-button> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | | <!-- icon="Promotion"--> |
| | | <!-- :disabled="pageF.multiple"--> |
| | | <!-- @click="handleGenerate"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:generate']"--> |
| | | <!-- >生成应收应付费用--> |
| | | <!-- </el-button>--> |
| | | <el-button |
| | | type="warning" |
| | | icon="Female" |
| | | :disabled="pageF.single" |
| | | @click="handleDropHook" |
| | | v-hasPermi="['tms:tmsDispatchOrder:dropHook']" |
| | | >甩挂 |
| | | <el-button type="info" icon="Upload" @click="handleImport" |
| | | v-hasPermi="['tms:tmsDispatchOrder:import']">导入</el-button> |
| | | <el-button type="info" plain icon="Document" @click="handleImportLog">导入日志</el-button> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | | <!-- icon="Promotion"--> |
| | | <!-- :disabled="pageF.multiple"--> |
| | | <!-- @click="handleGenerate"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:generate']"--> |
| | | <!-- >生成应收应付费用--> |
| | | <!-- </el-button>--> |
| | | <el-button type="warning" icon="Female" :disabled="pageF.single" @click="handleDropHook" |
| | | v-hasPermi="['tms:tmsDispatchOrder:dropHook']">甩挂 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="Male" |
| | | :disabled="pageF.single" |
| | | @click="handleConnectHang" |
| | | v-hasPermi="['tms:tmsDispatchOrder:connectHang']" |
| | | >接挂 |
| | | <el-button type="primary" icon="Male" :disabled="pageF.single" @click="handleConnectHang" |
| | | v-hasPermi="['tms:tmsDispatchOrder:connectHang']">接挂 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | type="warning" |
| | | icon="Avatar" |
| | | :disabled="!( isCustoms == 0)" |
| | | @click="handleCustoms" |
| | | v-hasPermi="['tms:tmsDispatchOrder:customs']" |
| | | >委托报关信息 |
| | | <el-button type="warning" icon="Avatar" :disabled="selectionList.length === 0" @click="handleCustoms" |
| | | v-hasPermi="['tms:tmsDispatchOrder:customs']">委托报关信息 |
| | | </el-button> |
| | | <el-button |
| | | type="primary" |
| | | icon="UserFilled" |
| | | :disabled="!( isLoad == 0)" |
| | | @click="handleLoading" |
| | | v-hasPermi="['tms:tmsDispatchOrder:loading']" |
| | | >委托卸货信息 |
| | | <el-button type="primary" icon="UserFilled" :disabled="selectionList.length === 0" @click="handleLoading" |
| | | 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 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-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-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']" |
| | | icon="el-icon-connection">复制 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="[1,2].includes(row.status)" @click="handleUploadItinerary(row)" |
| | | v-hasPermi="['tms:tmsTrip:add']" |
| | | class="link-btn" :underline="false" icon="el-icon-upload">上传行程 |
| | | </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">查看行程 |
| | | </el-link> |
| | | <el-link size="small" type="primary" v-if="[2].includes(row.status)" @click="handleOk(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:okOrder']" |
| | | :underline="false" icon="el-icon-circle-check">完成行程 |
| | | </el-link> |
| | | <!-- <el-link size="small" type="primary" v-if="[2,3].includes(row.status)" @click="handleAddFinance(row)"--> |
| | | <!-- class="link-btn" v-hasPermi="['tms:tmsFinanceDetail:add']"--> |
| | | <!-- :underline="false" icon="el-icon-edit-pen">费用登记--> |
| | | <!-- </el-link>--> |
| | | </template> |
| | | <template #menu="{row}"> |
| | | <el-link size="small" type="primary" @click="handleLog(row)" class="link-btn" :underline="false" |
| | | icon="el-icon-tickets">日志 |
| | | </el-link> |
| | | <el-button type="primary" icon="Printer" :disabled="pageF.single" @click="handlePrint" |
| | | v-hasPermi="['tms:tmsDispatchOrder:print']">承运单打印 |
| | | </el-button> |
| | | <el-button type="primary" icon="UserFilled" :disabled="!zxhdjSingle" @click="handleZXHDJ" |
| | | v-hasPermi="['tms:tmsDispatchOrder:zzdj']">装卸货点登记 |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template #shipperId-form="{disabled}"> |
| | | <template #loadingServiceProviderName="{ row }"> |
| | | <template v-if="String(row.isCustoms).trim() === '0' && !row.loadingServiceProviderName"> |
| | | <el-link type="primary" underline="never" @click="handleCustomsAdd(row)" |
| | | style="font-weight: bold; cursor: pointer; color: #409eff;"> |
| | | 待添加 |
| | | </el-link> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <span>{{ row.loadingServiceProviderName }}</span> |
| | | </template> |
| | | </template> |
| | | |
| | | <!-- 卸货服务 --> |
| | | <template #customsServiceProviderName="{ row }"> |
| | | <template v-if="String(row.isLoad).trim() === '0' && !row.customsServiceProviderName"> |
| | | <el-link type="primary" underline="never" @click="handleLoadingAdd(row)" |
| | | style="font-weight: bold; cursor: pointer; color: #409eff;"> |
| | | 待添加 |
| | | </el-link> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <span>{{ row.customsServiceProviderName }}</span> |
| | | </template> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <template #menu="{ row, index, size }"> |
| | | <el-tooltip content="查看" placement="top" :enterable="false"> |
| | | <el-link type="primary" icon="el-icon-view" underline="never" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:query']" @click="$refs.crudRef.rowView(row, index)"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="删除" placement="top" :enterable="false"> |
| | | <el-link type="primary" icon="el-icon-delete" underline="never" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:remove']" v-if="row.status == 0" |
| | | @click="$refs.crudRef.rowDel(row, index)"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | |
| | | <el-tooltip content="编辑" placement="top" :enterable="false"> |
| | | <el-link type="primary" icon="el-icon-edit" underline="never" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:edit']" v-if="[0, 1].includes(row.status)" |
| | | @click="$refs.crudRef.rowEdit(row, index)"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | |
| | | </template> |
| | | <template #menu-before="{ row }"> |
| | | |
| | | |
| | | <el-tooltip content="运输货品登记" placement="top"> |
| | | <el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsGoodsDetail:add']" v-if="[0, 1, 2].includes(row.status)" underline="never" |
| | | icon="el-icon-document-add"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="实际运输记录" placement="top"> |
| | | <el-link size="small" type="primary" @click="handleActual(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:update']" v-if="[0, 1, 2].includes(row.status)" underline="never" |
| | | icon="el-icon-set-up"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="确定" placement="top"> |
| | | <el-link size="small" type="primary" v-if="row.status == 0" @click="handleConfirm(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:confirmOrder']" underline="never" icon="el-icon-pointer"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="作废" placement="top"> |
| | | <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="never" icon="el-icon-close"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="复制" placement="top"> |
| | | <el-link size="small" type="primary" @click="handleCopy(row)" class="link-btn" underline="never" |
| | | v-hasPermi="['tms:tmsDispatchOrder:copyOrder']" icon="el-icon-connection"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="上传行程" placement="top"> |
| | | <el-link size="small" type="primary" v-if="[1, 2].includes(row.status)" @click="handleUploadItinerary(row)" |
| | | v-hasPermi="['tms:tmsTrip:add']" class="link-btn" underline="never" icon="el-icon-upload"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="查看行程" placement="top"> |
| | | <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="never" icon="Finished"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <el-tooltip content="完成行程" placement="top"> |
| | | <el-link size="small" type="primary" v-if="[2].includes(row.status)" @click="handleOk(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:okOrder']" underline="never" icon="el-icon-circle-check"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | <!-- |
| | | <el-tooltip content="完成行程" placement="top"> |
| | | <el-link size="small" type="primary" v-if="[2].includes(row.status)" @click="handleOk(row)" class="link-btn" |
| | | v-hasPermi="['tms:tmsDispatchOrder:okOrder']" underline="never" icon="el-icon-circle-check"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> --> |
| | | |
| | | <el-tooltip content="日志" placement="top"> |
| | | <el-link size="small" type="primary" @click="handleFlow(row)" class="link-btn" |
| | | v-hasPermi="['cwgl:estimatedReceivable:flog']" underline="never" icon="el-icon-document"> |
| | | |
| | | </el-link> |
| | | </el-tooltip> |
| | | |
| | | |
| | | </template> |
| | | |
| | | <!-- <template #menu="{row}"> |
| | | |
| | | </template> --> |
| | | |
| | | <template #shipperId-form="{ disabled }"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" dataType="string" |
| | | :children="consignorOption" :disabled="disabled" |
| | | :on-load="onShipperLoad" suffixIcon="search" |
| | | v-model="form.shipperId" style="width: 80%" |
| | | @change="changeShipper" |
| | | placeholder="请选择装货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddShipper"></el-button> |
| | | <avue-input-table :props="consignorProps" dataType="string" :children="consignorOption" :disabled="disabled" |
| | | :on-load="onShipperLoad" suffixIcon="search" v-model="form.shipperId" style="width: 80%" |
| | | @change="changeShipper" placeholder="请选择装货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddShipper"></el-button> |
| | | </div> |
| | | </template> |
| | | <template #receiverId-form="{disabled}"> |
| | | <template #receiverId-form="{ disabled }"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" |
| | | :children="consignorOption" dataType="string" |
| | | :on-load="onConsignorLoad" suffixIcon="search" |
| | | v-model="form.receiverId" :disabled="disabled" |
| | | @change="changeReceiver" style="width: 80%" |
| | | placeholder="请选择卸货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddReceiver"></el-button> |
| | | <avue-input-table :props="consignorProps" :children="consignorOption" dataType="string" |
| | | :on-load="onConsignorLoad" suffixIcon="search" v-model="form.receiverId" :disabled="disabled" |
| | | @change="changeReceiver" style="width: 80%" placeholder="请选择卸货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddReceiver"></el-button> |
| | | </div> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <h2 v-if="optionType == 'addFinance'">报价费用</h2> |
| | | <avue-crud v-if="optionType == 'addFinance'" |
| | | :option="itemsTableOption" |
| | | :data="itemsTableData" |
| | | @selection-change="selectionChange2" |
| | | > |
| | | <template #count="{row}"> |
| | | <avue-crud v-if="optionType == 'addFinance'" :option="itemsTableOption" :data="itemsTableData" |
| | | @selection-change="selectionChange2"> |
| | | <template #count="{ row }"> |
| | | <el-input-number v-model="row.count" @change="countChange(row)" placeholder="请输入计费数量" |
| | | min="0"></el-input-number> |
| | | min="0"></el-input-number> |
| | | </template> |
| | | </avue-crud> |
| | | <h2 v-if="optionType == 'addFinance'">实报实销费用</h2> |
| | | <avue-form v-if="optionType == 'addItinerary' || optionType == 'addFinance'" v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <avue-crud |
| | | :option="boxTableOption" |
| | | :data="boxTableData" |
| | | > |
| | | <avue-crud :option="boxTableOption" :data="boxTableData"> |
| | | </avue-crud> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" v-if="optionType == 'addItinerary' || optionType == 'addFinance'" |
| | | :loading="pageF.isUploading" @click="submitForm"> |
| | | :loading="pageF.isUploading" @click="submitForm"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button type="primary" v-if="optionType == 'generate' " :loading="pageF.isUploading" |
| | | @click="submitGenerate"> |
| | | <el-button type="primary" v-if="optionType == 'generate'" :loading="pageF.isUploading" |
| | | @click="submitGenerate"> |
| | | {{ pageF.isUploading ? '生成中' : '生成费用' }} |
| | | </el-button> |
| | | <el-button @click="cancelBox">取 消</el-button> |
| | |
| | | |
| | | <el-dialog :title="title" v-model="open" class="avue-dialog avue-dialog--top" width="40%"> |
| | | <div v-if="optionType === 'dropHook'"> |
| | | <el-descriptions |
| | | :column="2" |
| | | border |
| | | > |
| | | <el-descriptions :column="2" border> |
| | | <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> |
| | | </div> |
| | | <div v-if="optionType == 'connectHang'"> |
| | | <el-descriptions style="margin-bottom: 20px" |
| | | :column="2" |
| | | border |
| | | > |
| | | <el-descriptions style="margin-bottom: 20px" :column="2" border> |
| | | <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> |
| | |
| | | </div> |
| | | |
| | | <div v-if="optionType == 'customs'"> |
| | | <el-descriptions style="margin-bottom: 20px" |
| | | :column="2" |
| | | border |
| | | > |
| | | <el-descriptions v-if="optionNum == 'radio'" style="margin-bottom: 20px" :column="2" 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> |
| | | <el-table v-if="optionNum == 'checkbox'" :data="clearanceList" border size="small" |
| | | style="width: 100%; margin-bottom: 20px"> |
| | | <el-table-column prop="dispatchNo" label="调度单号" width="150" /> |
| | | <el-table-column prop="customerName" label="客户" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="transportLine" label="运输路线" min-width="150" show-overflow-tooltip /> |
| | | </el-table> |
| | | |
| | | <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | </div> |
| | | |
| | | <div v-if="optionType == 'loading'"> |
| | | <el-descriptions style="margin-bottom: 20px" |
| | | :column="2" |
| | | border |
| | | > |
| | | <el-descriptions v-if="optionNum == 'radio'" style="margin-bottom: 20px" :column="2" 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> |
| | | <el-table v-if="optionNum == 'checkbox'" :data="clearanceList" border size="small" |
| | | style="width: 100%; margin-bottom: 20px"> |
| | | <el-table-column prop="dispatchNo" label="调度单号" width="150" /> |
| | | <el-table-column prop="customerName" label="客户" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="projectName" label="项目名称" min-width="120" show-overflow-tooltip /> |
| | | <el-table-column prop="transportLine" label="运输路线" min-width="150" show-overflow-tooltip /> |
| | | </el-table> |
| | | <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitForm2"> |
| | | <el-button type="primary" v-if="optionType != 'view'" :loading="pageF.isUploading" @click="submitForm2"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | <el-button @click="cancelBox2">取 消</el-button> |
| | |
| | | |
| | | |
| | | <el-dialog title="货品信息登记" v-model="open2" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <avue-crud |
| | | :option="goodsTableOption" |
| | | v-model="goodsForm" |
| | | @row-update="rowGoodsUpdate" |
| | | @row-save="rowGoodsSave" |
| | | @row-del="rowGoodsDel" |
| | | :data="goodsTableData" ref="goodsCrudRef" |
| | | > |
| | | <avue-crud :option="goodsTableOption" v-model="goodsForm" @row-update="rowGoodsUpdate" @row-save="rowGoodsSave" |
| | | @row-del="rowGoodsDel" :data="goodsTableData" ref="goodsCrudRef"> |
| | | </avue-crud> |
| | | <!-- <template #footer>--> |
| | | <!-- <div class="dialog-footer">--> |
| | |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="实际运输信息" v-model="open3" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <avue-form v-model="actualForm" |
| | | ref="actualFormRef" |
| | | :option="actualFormOption"> |
| | | <avue-form v-model="actualForm" ref="actualFormRef" :option="actualFormOption"> |
| | | |
| | | </avue-form> |
| | | <template #footer> |
| | |
| | | |
| | | <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-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-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 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> |
| | | </avue-crud> |
| | | |
| | | <div v-if="active === 'tab4'"> |
| | | <h2>实报实销费用</h2> |
| | | <avue-form v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | <!-- <avue-form v-model="boxForm" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <avue-crud |
| | | :option="boxTableOption" |
| | | :data="boxTableData" |
| | | > |
| | | </avue-form> --> |
| | | <avue-crud :option="expenditureTableOption" :data="tmsFinanceDetails"> |
| | | <template #actualFeeAmount="{ row }"> |
| | | <el-input-number v-model="row.actualFeeAmount" :precision="2" :min="0" controls-position="right" |
| | | placeholder="输入金额" style="width: 100%" /> |
| | | </template> |
| | | <template #currency="{ row }"> |
| | | <el-radio-group v-model="row.currency"> |
| | | <el-radio v-for="item in sys_currency" :key="item.value" :label="item.value"> |
| | | {{ item.label }} |
| | | </el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | <template #voucherUrl="{ row }"> |
| | | <!-- <avue-upload v-model="row.voucherUrl" :action="'/common/upload2'" type="upload" accept="image/*" |
| | | @upload-after="(res, done, loading, column) => handleUploadAfter(res, done, loading, column, row)"></avue-upload> --> |
| | | |
| | | <!-- 凭证图片 --> |
| | | <el-upload class="upload-demo" ref="uploadRef" :limit="1" drag :action="urlApi + '/common/upload2'" multiple |
| | | :show-file-list="true" :on-success="(res) => handleUploadAfter(res, row)" |
| | | :on-exceed="(files) => handleExceed(files, row)"> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text"> |
| | | 点击或将图片拖拽到此区域上传 |
| | | </div> |
| | | |
| | | </el-upload> |
| | | </template> |
| | | <template #remark="{ row }"> |
| | | <el-input v-model="row.remark" placeholder="填写备注" clearable /> |
| | | </template> |
| | | </avue-crud> |
| | | <avue-crud :option="boxTableOption" :data="boxTableData" @selection-change="boxSelectionChange"> |
| | | <template #menu-left> |
| | | <el-button type="danger" plain icon="Delete" |
| | | :disabled="!(boxSelectionList.length === 1 && boxSelectionList[0]?.status === 0)" |
| | | @click="handleBatchBoxDel"> |
| | | 作废 |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="pageF.isUploading" @click="submitTabForm"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitTabForm"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | |
| | | |
| | | <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-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 v-model="boxForm" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="pageF.isUploading" @click="submitForm5"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitForm5"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="承运单打印" v-model="open6" class="avue-dialog avue-dialog--top cydprint" width="80%"> |
| | | <div v-if="print == 0"> |
| | | <el-descriptions :column="3" border> |
| | | <el-descriptions-item label="订单号">{{ form.dispatchNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="承运日期">{{ form.orderTime }}</el-descriptions-item> |
| | | <el-descriptions-item label="车牌">{{ form.licensePlate }}</el-descriptions-item> |
| | | <el-descriptions-item label="订车类型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | |
| | | <el-descriptions-item label="司机姓名">{{ form.mainDriverName }}</el-descriptions-item> |
| | | <el-descriptions-item label="电话">{{ form.mainDriverMobile }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号/柜号">{{ form.shelfCode }}/ {{ form.containerNo }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{ form.customerName }}</el-descriptions-item> |
| | | <el-descriptions-item label="起止路线">{{ form.transportLine }}</el-descriptions-item> |
| | | <el-descriptions-item label="调度员">{{ form.createBy }}</el-descriptions-item> |
| | | <el-descriptions-item label="是否打印">{{ form.$isPrint }}</el-descriptions-item> |
| | | <el-descriptions-item label="历史打印次数">{{ form.printCount }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <h3 class="title" style="color: #333;font-weight: bold;">单据信息</h3> |
| | | <avue-form v-model="boxForm" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | </div> |
| | | <div v-else> |
| | | <div id="print"> |
| | | <img src="@/assets/img.png" alt="" style="width: 168px;height: 68px"> |
| | | <h3 class="title">珠海市汇畅交通投资有限公司</h3> |
| | | <div class="header"> |
| | | <div class="order">订单号:{{ boxForm.dispatchNo }}</div> |
| | | <div class="sub-title">货物承运单证</div> |
| | | </div> |
| | | <table> |
| | | <tr> |
| | | <td>承运日期:{{ boxForm.orderTime }}</td> |
| | | <td>六联单号码:{{ boxForm.sixLinkNo }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>车牌:{{ boxForm.licensePlate }}</td> |
| | | <td>订车车型: {{ boxForm.$actualVehicleType }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>司机姓名:{{ boxForm.mainDriverName }}</td> |
| | | <td>电话:{{ boxForm.mainDriverMobile }}</td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td>托架号/柜号:{{ boxForm.shelfCode }}/ {{ boxForm.containerNo }}</td> |
| | | <td>行驶口岸:{{ boxForm.portName }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td>提单号S/O:{{ boxForm.billNo }}</td> |
| | | <td>码头名:{{ boxForm.terminalName }}</td> |
| | | </tr> |
| | | |
| | | <tr> |
| | | <td>客户:{{ boxForm.customerName }}</td> |
| | | <td>联络人:{{ boxForm.contactName }} {{ boxForm.contactPhone }} </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2"> |
| | | <span style="margin-right: 40px">货物名称:{{ boxForm.cargoName }} </span> |
| | | <span style="margin-right: 40px">件数:{{ boxForm.pieceCount }} </span> |
| | | <span style="margin-right: 40px">重量:{{ boxForm.weight }}KG</span> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td colspan="2">起止路线:{{ boxForm.transportLine }}</td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <div style="line-height: 24px">调度员:{{ boxForm.createBy }}</div> |
| | | <div style="line-height: 42px">承运司机:{{ boxForm.mainDriverName }}</div> |
| | | </td> |
| | | <td>收货人签字/盖章:</td> |
| | | </tr> |
| | | </table> |
| | | |
| | | <div>托运须知:</div> |
| | | <div>1.如因托运者携带违规禁品,违反当地法例而引致车辆及司机扣留或处罚,托人人必赔偿一切损失,直至事件完满解决为止。</div> |
| | | <div>2.货物装卸及运输期间,一切交通意外引致路不能行驶或车辆损失而令货物不能如期交货及一切风、火、盗窃及其它意外均由货主负责。</div> |
| | | <div>3.一切交易均按本公司之标准经营条款为准,本公司之责任在某些情况下会被豁免或限 (制如有须要,欢迎索取)!</div> |
| | | |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | |
| | | |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="print = 0" v-if="print == 1">重新填写</el-button> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitForm6"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button @click="open6 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 用户导入对话框 --> |
| | | <el-dialog title="调度单导入" v-model="upload.open" width="400px" append-to-body> |
| | | <el-upload ref="uploadRef" :limit="1" accept=".xlsx, .xls" :headers="upload.headers" |
| | | :action="upload.url + '?updateSupport=' + upload.updateSupport" :disabled="upload.isUploading" |
| | | :on-progress="handleFileUploadProgress" :on-success="handleFileSuccess" :auto-upload="false" drag> |
| | | <el-icon class="el-icon--upload"><upload-filled /></el-icon> |
| | | <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> |
| | | <template #tip> |
| | | <div class="el-upload__tip text-center"> |
| | | <span>仅允许导入xls、xlsx格式文件。</span> |
| | | <el-link type="primary" underline="never" style="font-size:12px;vertical-align: baseline;" |
| | | @click="importTemplate">下载模板</el-link> |
| | | </div> |
| | | </template> |
| | | </el-upload> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" @click="submitFileForm">确 定</el-button> |
| | | <el-button @click="upload.open = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | <el-dialog title="预配订单装卸货点登记" v-model="open7" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <avue-form v-model="shipperReceiverForm" ref="shipperReceiverFormRef" :option="shipperReceiverFormOption"> |
| | | <template #dispatchNos="{ disabled }"> |
| | | <div class="dispatchNos"> |
| | | <el-tag v-for="tag in shipperReceiverForm.dispatchNos" :key="tag" closable |
| | | @close="handleCloseDispatchNo(tag)"> |
| | | {{ tag }} |
| | | </el-tag> |
| | | </div> |
| | | |
| | | </template> |
| | | <template #shipperId="{ disabled }"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" dataType="string" :children="consignorOption" :disabled="disabled" |
| | | :on-load="onShipperLoad" suffixIcon="search" v-model="shipperReceiverForm.shipperId" style="width: 80%" |
| | | @change="changeShipper2" placeholder="请选择装货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddShipper2"></el-button> |
| | | </div> |
| | | </template> |
| | | <template #receiverId="{ disabled }"> |
| | | <div style="display:flex; align-items: center;justify-content: space-between"> |
| | | <avue-input-table :props="consignorProps" :children="consignorOption" dataType="string" |
| | | :on-load="onConsignorLoad" suffixIcon="search" v-model="shipperReceiverForm.receiverId" |
| | | :disabled="disabled" @change="changeReceiver2" style="width: 80%" placeholder="请选择卸货点"></avue-input-table> |
| | | <el-button icon="plus" :disabled="disabled" @click="handleAddReceiver2"></el-button> |
| | | </div> |
| | | </template> |
| | | </avue-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitZxForm"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button @click="open7 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="导入日志" v-model="importLogVisible" width="80%"> |
| | | <avue-crud :data="importLogData" :option="importLogOption" :table-loading="importLogLoading" |
| | | @on-load="getImportLogList"></avue-crud> |
| | | </el-dialog> |
| | | |
| | | <flowLog ref="flowLogIshow" :isShow="false" :flowParams="flowParams"></flowLog> |
| | | |
| | | </basicContainer> |
| | | <el-dialog title="选择车辆" v-model="vehicleDialogVisible" width="70%" append-to-body :close-on-click-modal="false"> |
| | | <avue-crud ref="vehicleCrudRef" :option="vehicleOption" :data="vehicleData" :page="vehiclePage" |
| | | @on-load="loadVehicleList" @search-change="vehicleSearchChange" @search-reset="vehicleSearchReset" |
| | | @current-change="vehicleCurrentChange" @size-change="vehicleSizeChange" @row-click="handleVehicleRowClick"> |
| | | </avue-crud> |
| | | |
| | | <template #footer> |
| | | <el-button @click="vehicleDialogVisible = false">取 消</el-button> |
| | | <el-button type="primary" @click="confirmVehicleSelection">确 定</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | </template> |
| | | |
| | | <script setup name="tmsDispatchOrder" lang="ts"> |
| | | import { listTmsDispatchOrderLog } from "@/api/tms/tmsDispatchOrderLog"; |
| | | import { |
| | | TmsDispatchOrderI, |
| | | addTmsDispatchOrder, |
| | |
| | | getTmsDispatchOrder, |
| | | listTmsDispatchOrder, |
| | | updateTmsDispatchOrder, |
| | | confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, |
| | | connectHang,customsOrder,loadingOrder,checkCloseOrder,closeOrder |
| | | tmsDispatchOrderRecord, |
| | | confirmOrder, |
| | | copyOrder, |
| | | okOrder, |
| | | initGenerate, |
| | | generateTmsDispatchOrder, |
| | | dropHook, |
| | | connectHang, |
| | | customsOrder, |
| | | loadingOrder, |
| | | checkCloseOrder, |
| | | closeOrder, |
| | | printDispatchOrder, |
| | | importTemplateTmsDispatchOrder, ypdddjSumbit, |
| | | tmsTmsDispatchOrderImportLog, |
| | | saveTmsFinanceDetail2, |
| | | getLastLicensePlate, |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | 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 {getTmsProject, listTmsProject} from "@/api/tms/tmsProject"; |
| | | import {getTmsServiceProvider, listTmsServiceProvider} from "@/api/tms/tmsServiceProvider"; |
| | | import {getTmsLoadingServiceProvider, listTmsLoadingServiceProvider} from "@/api/tms/tmsLoadingServiceProvider"; |
| | | import {getTmsCustomsServiceProvider, listTmsCustomsServiceProvider} from "@/api/tms/tmsCustomsServiceProvider"; |
| | | import {getTmsDriver, listTmsDriver} from "@/api/tms/tmsDriver"; |
| | | import {getTmsVehicle, listTmsVehicle} from "@/api/tms/tmsVehicle"; |
| | | import {getTmsContainer, listTmsContainer} from "@/api/tms/tmsContainer"; |
| | | import {getTmsShelf, listTmsShelf} from "@/api/tms/tmsShelf"; |
| | | import {addTmsConsignor, getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | import {addTmsTrip, listTmsTrip} from "@/api/tms/tmsTrip"; |
| | | import { computed, onMounted, onBeforeUnmount, 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 { getTmsProject, listTmsProject } from "@/api/tms/tmsProject"; |
| | | import { getTmsServiceProvider, listTmsServiceProvider } from "@/api/tms/tmsServiceProvider"; |
| | | import { getTmsLoadingServiceProvider, listTmsLoadingServiceProvider } from "@/api/tms/tmsLoadingServiceProvider"; |
| | | import { getTmsCustomsServiceProvider, listTmsCustomsServiceProvider } from "@/api/tms/tmsCustomsServiceProvider"; |
| | | import { getTmsDriver, listTmsDriver } from "@/api/tms/tmsDriver"; |
| | | import { getTmsVehicle, listTmsVehicle } from "@/api/tms/tmsVehicle"; |
| | | import { getTmsContainer, listTmsContainer } from "@/api/tms/tmsContainer"; |
| | | import { getTmsShelf, listTmsShelf } from "@/api/tms/tmsShelf"; |
| | | import { addTmsConsignor, getTmsConsignor, listTmsConsignor } from "@/api/tms/tmsConsignor"; |
| | | import { ElMessage, ElMessageBox, type ElUpload } from "element-plus"; |
| | | import { addTmsTrip, listTmsTrip } from "@/api/tms/tmsTrip"; |
| | | 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, 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"; |
| | | 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, 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"; |
| | | import { $Print } from '@smallwei/avue' |
| | | import { getToken } from "@/utils/auth"; |
| | | import { useAvueTableShowHide } from "@/hooks/useAvueTableShowHide"; |
| | | import { |
| | | tmsFinanceDetail |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | const { appContext } = getCurrentInstance() as any; |
| | | |
| | | const {appContext} = getCurrentInstance(); |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const { proxy } = useCurrentInstance( |
| | | ); |
| | | // 定义类型 |
| | | interface VehicleRow { |
| | | id?: string; |
| | | licensePlate?: string; |
| | | serviceProviderName?: string; |
| | | vehicleType?: string; |
| | | internalCode?: string; |
| | | licenseHk?: string; |
| | | licenseMo?: string; |
| | | [key: string]: any; |
| | | } |
| | | const { fee_type, sys_currency, vehicle_type, order_type } = proxy.useDict('fee_type', 'sys_currency', 'vehicle_type', 'order_type') |
| | | const crudRef = ref(); |
| | | const boxFormRef = ref(); |
| | | const goodsCrudRef = ref(); |
| | | const actualFormRef = ref(); |
| | | |
| | | const isAutoSettingVehicle = ref(false); |
| | | /** |
| | | * 字典公共转换函数 |
| | | */ |
| | | const dictFormat = (dict: any, value: any) => { |
| | | const dictData = Array.isArray(dict) ? dict : (dict?.value || []); |
| | | if (value === undefined || value === null || value === '') return ''; |
| | | return proxy.selectDictLabel(dictData, value); |
| | | }; |
| | | |
| | | const permissionList = (key: any, row: any, index: any) => { |
| | | if (key == 'addBtn') { |
| | |
| | | return true; |
| | | } |
| | | }; |
| | | const getNextDayMidnight = () => { |
| | | const date = new Date(); |
| | | |
| | | // 1. 将日期推进到明天 |
| | | date.setDate(date.getDate() + 1); |
| | | |
| | | // 2. 将时分秒毫秒全部清零 |
| | | date.setHours(0, 0, 0, 0); |
| | | |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); |
| | | const day = String(date.getDate()).padStart(2, '0'); |
| | | const hours = String(date.getHours()).padStart(2, '0'); |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); |
| | | |
| | | // 返回格式:2024-01-20 00:00:00 |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | }; |
| | | const data = reactive({ |
| | | form: <TmsDispatchOrderI>{}, |
| | | boxSelectionList: <any>[], |
| | | queryParams: <TmsDispatchOrderI & PageQueryInterface>{}, |
| | | page: <PagesInterface>{ |
| | | pageSize: 10, |
| | | pageSize: 30, |
| | | total: 0, |
| | | currentPage: 1, |
| | | }, |
| | |
| | | goodsForm: <any>{}, |
| | | open3: false, |
| | | actualForm: <any>{}, |
| | | isCustoms:<any> -1, |
| | | isCustoms: <any>-1, |
| | | isLoad: -1, |
| | | open5:false, |
| | | open5: false, |
| | | open6: false, |
| | | open7: false, |
| | | zxhdjSingle: false, |
| | | }) |
| | | const { |
| | | queryParams, form, page, selectionList, open3, |
| | | boxTableData, optionType, |
| | | boxFormOption, boxForm, boxTableOption, title, open, open2, |
| | | goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad,open5 |
| | | goodsTableData, goodsForm, actualForm, selectionList2, isCustoms, isLoad, open5, open6, open7, zxhdjSingle, boxSelectionList |
| | | } = toRefs(data); |
| | | const option = ref({ |
| | | menuType: 'icon', |
| | | |
| | | viewBtn: false, // 关闭原生查看 |
| | | editBtn: false, // 关闭原生编辑 |
| | | delBtn: false, // 关闭原生编辑 |
| | | |
| | | searchIndex: 7, // 关键:折叠时显示的个数(根据你的字段数量调整) |
| | | searchIcon: true, // 关键:显示折叠/展开按钮 |
| | | searchMenuSpan: 6, // 搜索按钮栏占位(可选) |
| | | |
| | | pageKey: 'TmsDispatchOrder', |
| | | rowKey: 'id', |
| | | labelWidth: 130, |
| | | searchSpan: 6, |
| | | searchLabelWidth: 150, |
| | | menuWidth: 300, |
| | | menuWidth: 350, |
| | | height: 530, |
| | | group: [ |
| | | { |
| | |
| | | message: "请选择运输路线", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('quoteDetailId')?.$refs?.temp; |
| | | if (!table) return; |
| | |
| | | customerCode: active.customerCode, |
| | | contractId: active.contractId, |
| | | contractName: active.contractName, |
| | | requiredVehicleTypes: active.vehicleType, |
| | | requiredVehicleTypes: active.vehicleType + '', |
| | | quotePlanId: active.quotePlanId, |
| | | }); |
| | | form.value.shipperId = undefined; |
| | |
| | | label: 'transportRoute', |
| | | value: 'quoteDetailId' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTransportRouteVi({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTransportRouteVi({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | display: true, disabled: true |
| | | }, |
| | | requiredVehicleTypes: { |
| | | label: '下单车型', disabled: true, |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "下单车型不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | label: '下单车型', |
| | | minWidth: 130, |
| | | display: true, // ✅ 改为 true 在表格显示 |
| | | type: 'select', |
| | | search: true, |
| | | dicUrl: '/system/dict/data/type/vehicle_type', |
| | | dataType: 'string', |
| | | |
| | | }, |
| | | |
| | | orderType: { |
| | | label: '订单类型', |
| | | display: true, |
| | |
| | | message: "订单类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: ({value}: any) => { |
| | | change: ({ value }: any) => { |
| | | |
| | | option.value.group.forEach((item: any) => { |
| | | |
| | | if (item.prop == 'pcxx') { |
| | | item.column.shipperId.rules.forEach((cItem: any) => { |
| | | |
| | | |
| | | cItem.required = !(value == 1); |
| | | }); |
| | | item.column.receiverId.rules.forEach((cItem: any) => { |
| | |
| | | ], |
| | | }, |
| | | isUrgent: { |
| | | label: '是否紧急',value: '1', |
| | | label: '是否紧急', value: '1', |
| | | display: true, |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | rules: [ |
| | |
| | | // }, |
| | | orderTime: { |
| | | label: '下单时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | type: 'date', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "下单时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | latestDeparture: { |
| | | label: '要求最晚出发时间', |
| | | value: getNextDayMidnight(), |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', labelWidth: 150, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | |
| | | }, |
| | | latestArrival: { |
| | | label: '要求最晚到达时间', labelWidth: 150, |
| | | value: getNextDayMidnight(), |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | |
| | | message: "是否是自营车队不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: ({value}: any) => { |
| | | console.log(value) |
| | | change: ({ value }: any) => { |
| | | option.value.group.forEach((item: any) => { |
| | | if (item.prop == 'pcxx') { |
| | | item.column.commissionModel.display = value != 1; |
| | |
| | | |
| | | }, |
| | | }, |
| | | commissionModel:{ |
| | | commissionModel: { |
| | | label: '提成模式', |
| | | display: true, type: 'radio', dicUrl: '/system/dict/data/type/commission_model', dataType: 'string', |
| | | rules: [ |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | label: 'serviceShortName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsServiceProvider({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | message: "主驾驶员不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: (val: any) => { |
| | | // 在 mainDriverId 的 change 事件中 |
| | | change: async (val: any) => { |
| | | if (data.isChanging) return; |
| | | data.isChanging = true; |
| | | isAutoSettingVehicle.value = true; |
| | | |
| | | const table = crudRef.value?.getPropRef?.('mainDriverId')?.$refs?.temp; |
| | | if (!table) return; |
| | | if (!table) { |
| | | data.isChanging = false; |
| | | isAutoSettingVehicle.value = false; |
| | | return; |
| | | } |
| | | |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | mainDriverId: active.id, |
| | | mainDriverName: active.driverName, |
| | | }); |
| | | console.log('自动填充成功:', active); |
| | | if (active && active.driverName) { |
| | | try { |
| | | |
| | | await nextTick(); // 等待清空生效 |
| | | const res = await getLastLicensePlate(active.driverName); |
| | | |
| | | if (res.code === 200 && res.data) { |
| | | const vehicleData = res.data; |
| | | nextTick(() => { |
| | | Object.assign(form.value, { |
| | | licensePlate: vehicleData.licensePlate, |
| | | vehicleId: vehicleData.vehicleId, |
| | | actualVehicleType: vehicleData.actualVehicleType, |
| | | mainDriverName: active.driverName |
| | | |
| | | |
| | | }); |
| | | }) |
| | | await nextTick(); |
| | | console.log('自动填充成功:', form.value); |
| | | } |
| | | } catch (e) { |
| | | console.error("自动获取车牌失败", e); |
| | | } finally { |
| | | data.isChanging = false; |
| | | setTimeout(() => { |
| | | // isAutoSettingVehicle.value = false; |
| | | }, 500); // 稍微延长一点时间,防止 vehicleId 的 change 事件误触 |
| | | } |
| | | } else { |
| | | data.isChanging = false; |
| | | // isAutoSettingVehicle.value = false; |
| | | } |
| | | }, |
| | | // change: (val: any) => { |
| | | // const table = crudRef.value?.getPropRef?.('mainDriverId')?.$refs?.temp; |
| | | // if (!table) return; |
| | | // let active = table.active; |
| | | // if (Array.isArray(active)) active = active[0]; |
| | | // console.log(active,'888'); |
| | | |
| | | // if (active) { |
| | | // Object.assign(form.value, { |
| | | // mainDriverId: active.id, |
| | | // mainDriverName: active.driverName, |
| | | // }); |
| | | // console.log(active.driverName,'44'); |
| | | // getLastLicensePlate(active.driverName).then(res => { |
| | | // console.log(res); |
| | | |
| | | // }) |
| | | // } |
| | | // }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | |
| | | label: 'driverName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | listTmsDriver({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, ...data, |
| | | carrierType: form.value.operationMode,vehicleProviderId:form.value.vehicleProviderId |
| | | carrierType: form.value.operationMode, vehicleProviderId: form.value.vehicleProviderId |
| | | }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | |
| | | label: 'driverName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | console.log(98521); |
| | | |
| | | getTmsDriver(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsDriver({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, ...data,vehicleProviderId:form.value.vehicleProviderId, |
| | | pageNum: page.currentPage, ...data, vehicleProviderId: form.value.vehicleProviderId, |
| | | carrierType: form.value.operationMode |
| | | }).then(res => { |
| | | return callback({ |
| | |
| | | } |
| | | |
| | | }, |
| | | vehicleId: { |
| | | licensePlate: { |
| | | label: '车牌号', dataType: 'string', |
| | | display: true, |
| | | readonly: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | required: false, |
| | | message: "车牌号不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('vehicleId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | vehicleId: active.id, |
| | | licensePlate: active.licensePlate, |
| | | actualVehicleType: active.vehicleType, |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | serviceProviderName: { |
| | | label: '车辆服务商', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | vehicleType: { |
| | | label: '车辆类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type', |
| | | |
| | | search: true, |
| | | }, |
| | | internalCode: { |
| | | label: '车辆内部编码', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | licensePlate: { |
| | | label: '车牌号', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | licenseHk: { |
| | | label: '香港牌照', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | licenseMo: { |
| | | label: '澳门牌照', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'licensePlate', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsVehicle(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsVehicle({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, ...data, |
| | | carrierType: form.value.operationMode,serviceProviderId:form.value.vehicleProviderId |
| | | }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | click: ({ value, column }) => { |
| | | // 点击输入框时触发选择弹窗 |
| | | handleVehicleSelect(); |
| | | } |
| | | |
| | | }, |
| | | // vehicleId: { |
| | | // label: '车牌号', dataType: 'string', |
| | | // display: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "车牌号不能为空", trigger: "change" |
| | | // } |
| | | // ], |
| | | // change: (val: any) => { |
| | | // if (isAutoSettingVehicle.value) { |
| | | // return; |
| | | // } |
| | | |
| | | // const table = crudRef.value?.getPropRef?.('vehicleId')?.$refs?.temp; |
| | | // if (!table) return; |
| | | // let active = table.active; |
| | | // if (Array.isArray(active)) active = active[0]; |
| | | // console.log(9852); |
| | | |
| | | // if (active) { |
| | | // Object.assign(form.value, { |
| | | // vehicleId: active.id, |
| | | // licensePlate: active.licensePlate, |
| | | // actualVehicleType: active.vehicleType, |
| | | // }); |
| | | // } |
| | | // }, |
| | | // type: 'table', suffixIcon: 'search', |
| | | // children: { |
| | | // border: true, |
| | | // searchLabelWidth: 100, |
| | | // searchMenuSpan: 5, |
| | | // column: { |
| | | // serviceProviderName: { |
| | | // label: '车辆服务商', minWidth: 130, |
| | | // search: true, |
| | | // }, |
| | | // vehicleType: { |
| | | // label: '车辆类型', minWidth: 120, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type', |
| | | |
| | | // search: true, |
| | | // }, |
| | | // internalCode: { |
| | | // label: '车辆内部编码', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // licensePlate: { |
| | | // label: '车牌号', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // licenseHk: { |
| | | // label: '香港牌照', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // licenseMo: { |
| | | // label: '澳门牌照', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // }, |
| | | |
| | | // }, |
| | | // props: { |
| | | // label: 'licensePlate', |
| | | // value: 'id' |
| | | // }, |
| | | // onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | // if (value) { |
| | | // let id = value; |
| | | // if (Array.isArray(value)) { |
| | | // id = value[0] |
| | | // } |
| | | // console.log(555, 'xq1'); |
| | | |
| | | // getTmsVehicle(id).then(res => { |
| | | // return callback(res.data || {}) |
| | | // }) |
| | | // } else { |
| | | // console.log(444, 'xq1'); |
| | | |
| | | // listTmsVehicle({ |
| | | // pageSize: page.pageSize, |
| | | // pageNum: page.currentPage, ...data, |
| | | // carrierType: form.value.operationMode, serviceProviderId: form.value.vehicleProviderId |
| | | // }).then(res => { |
| | | // return callback({ |
| | | // total: res.total, |
| | | // data: res.rows || [], |
| | | // }) |
| | | // }) |
| | | // } |
| | | |
| | | // } |
| | | |
| | | // }, |
| | | actualVehicleType: { |
| | | label: '派出车型', |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | label: 'containerCode', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsContainer({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsContainer({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | label: 'shelfCode', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsShelf({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsShelf({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | column: { |
| | | |
| | | dispatchNo: { |
| | | label: '调度单号', minWidth: 120, |
| | | label: '调度单号', minWidth: 180, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | licensePlate: { |
| | | label: '车牌号', minWidth: 120, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | customerName: { |
| | | label: '客户', |
| | | display: false, minWidth: 250, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | mainDriverName: { |
| | | label: '主驾驶员', |
| | | display: false, minWidth: 120, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | requiredVehicleTypes: { |
| | | label: '下单车型', minWidth: 130, |
| | | display: false, type: 'select', search: true, |
| | | dicUrl: '/system/dict/data/type/vehicle_type', |
| | | dataType: 'string', |
| | | |
| | | projectName: { |
| | | label: '项目名称', |
| | | display: false, minWidth: 120, |
| | | search: true, |
| | | }, |
| | | contractName: { |
| | | label: '关联合同名称', minWidth: 120, |
| | | // createTimeRange: { |
| | | // label: '创建时间', display: false, searchRange: true, type: 'date', |
| | | // format: 'YYYY-MM-DD', hide: true, searchSpan: 6, |
| | | // valueFormat: 'YYYY-MM-DD', |
| | | // overHidden: true |
| | | // }, |
| | | createTimeRangeArray: { |
| | | label: '创建时间', |
| | | minWidth: 150, |
| | | search: true, |
| | | searchRange: true, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | viewDisplay: false, |
| | | type: 'daterange', |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | hide: true |
| | | }, |
| | | updateTimeRange: { |
| | | label: '更新时间', display: false, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 6, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | overHidden: true |
| | | }, |
| | | updateTimeRangeArray: { |
| | | label: '更新时间', |
| | | minWidth: 150, |
| | | search: true, |
| | | searchRange: true, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // |
| | | viewDisplay: false, |
| | | type: 'daterange', |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | hide: true |
| | | }, |
| | | loadingServiceProviderName: { |
| | | label: '装货服务商名称', minWidth: 150, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | customsServiceProviderName: { |
| | | label: '报关服务商名称', minWidth: 150, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | projectName: { |
| | | label: '项目名称', |
| | | display: false, minWidth: 250, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | |
| | | contractName: { |
| | | label: '关联合同名称', minWidth: 250, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | orderType: { |
| | | label: '订单类型', |
| | |
| | | label: '车辆服务商名称', minWidth: 150, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | |
| | | loadingServiceProviderName: { |
| | | label: '装货服务商名称', minWidth: 150, |
| | | display: false, |
| | | search: true, |
| | | }, |
| | | customsServiceProviderName: { |
| | | label: '报关服务商名称', minWidth: 150, |
| | | display: false, |
| | | search: true, |
| | | }, |
| | | |
| | | isUrgent: { |
| | | label: '是否紧急', |
| | | display: false, minWidth: 100, |
| | |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | mainDriverName: { |
| | | label: '主驾驶员', |
| | | isPrint: { |
| | | label: '是否打印承运单', |
| | | display: false, minWidth: 120, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | |
| | | // requiredVehicleTypes: { |
| | |
| | | // 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, |
| | | display: false, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | |
| | | }, |
| | | |
| | | licensePlate: { |
| | | label: '车牌号', minWidth: 120, |
| | | display: false, |
| | | search: true, |
| | | }, |
| | | |
| | | |
| | | shipperName: { |
| | | label: '装货点名称', |
| | | display: false, minWidth: 120, |
| | | display: false, minWidth: 200, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | receiverName: { |
| | | label: '卸货点名称', minWidth: 120, |
| | | label: '卸货点名称', minWidth: 200, |
| | | display: false, |
| | | search: true, |
| | | overHidden: true |
| | | }, |
| | | // accountsReceivableStatus: { |
| | | // label: '应收费用生成状态', minWidth: 160, |
| | |
| | | inStatusList: { |
| | | label: '状态', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', |
| | | display: false,multiple:true, |
| | | display: false, multiple: true, |
| | | hide: true, |
| | | search: true, |
| | | |
| | | }, |
| | | confirmTime: { |
| | | label: '确认时间', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | orderTime: { |
| | | label: '下单时间', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | |
| | | |
| | | createBy: { |
| | | label: '创建人', minWidth: 150, |
| | | addDisplay: false, |
| | |
| | | label: '创建时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: false, |
| | | overHidden: true, |
| | | searchSpan: 6, |
| | | }, |
| | | 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, |
| | |
| | | label: '更新时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: false, |
| | | overHidden: true, |
| | | searchSpan: 6, |
| | | |
| | | }, |
| | | updateTimeRange: { |
| | | label: '更新时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | confirmTime: { |
| | | label: '确认时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | overHidden: true, |
| | | searchSpan: 6, |
| | | }, |
| | | confirmTimeRange: { |
| | | label: '确认时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | label: '确认时间', display: false, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 6, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | okTimeRange: { |
| | | label: '完成时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | confirmTimeRangeArray: { |
| | | label: '确认时间', |
| | | minWidth: 150, |
| | | search: true, |
| | | searchRange: true, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | viewDisplay: false, |
| | | type: 'daterange', |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | hide: true |
| | | }, |
| | | orderTimeRange: { |
| | | label: '下单时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | okTime: { |
| | | label: '完成时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | searchSpan: 6, |
| | | }, |
| | | // okTimeRange: { |
| | | // label: '完成时间2', display: false, searchRange: true, type: 'date', |
| | | // viewDisplay: true, |
| | | // format: 'YYYY-MM-DD', hide: true, searchSpan: 6, |
| | | // valueFormat: 'YYYY-MM-DD', |
| | | // }, |
| | | |
| | | okTimeRangeArray: { |
| | | label: '完成时间', |
| | | minWidth: 150, |
| | | search: true, |
| | | searchRange: true, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | viewDisplay: false, |
| | | type: 'daterange', |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | hide: true |
| | | }, |
| | | orderTime: { |
| | | label: '下单时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | searchSpan: 6, |
| | | }, |
| | | loadingDate: { |
| | | bind: 'orderTime', |
| | | label: '装货日期', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | searchSpan: 6, |
| | | }, |
| | | // orderTimeRange: { |
| | | // label: '下单时间', display: false, searchRange: true, type: 'date', |
| | | // format: 'YYYY-MM-DD', hide: true, searchSpan: 6, |
| | | // valueFormat: 'YYYY-MM-DD', |
| | | // }, |
| | | orderTimeRangeArray: { |
| | | label: '下单时间', |
| | | minWidth: 150, |
| | | search: true, |
| | | searchRange: true, |
| | | addDisplay: false, // 新增时不显示 |
| | | editDisplay: false, // 修改时不显示 |
| | | viewDisplay: false, |
| | | type: 'daterange', |
| | | startPlaceholder: '开始日期', |
| | | endPlaceholder: '结束日期', |
| | | valueFormat: 'YYYY-MM-DD', |
| | | hide: true |
| | | }, |
| | | |
| | | } |
| | |
| | | tripType: { |
| | | label: '行程类型', |
| | | display: true, |
| | | change: function ({value}: any) { |
| | | if (value == '5'){ |
| | | change: function ({ value }: any) { |
| | | if (value == '5') { |
| | | itineraryOption.value.column.iscc.display = true |
| | | } |
| | | }, |
| | |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | const urlApi = ref(import.meta.env.VITE_APP_BASE_API) |
| | | const itineraryTableOption = ref({ |
| | | menu: false, |
| | | addBtn: false, |
| | |
| | | } |
| | | ], |
| | | }, |
| | | currency:{ |
| | | label: '币种', |
| | | currency: { |
| | | label: '币制', |
| | | display: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "币种不能为空", trigger: "change" |
| | | message: "币制不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | |
| | | }, |
| | | voucherUrl: { |
| | | label: '费用凭证', |
| | | label: '费用凭证1', |
| | | display: true, |
| | | accept: 'string', dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | |
| | | }, |
| | | remark:{ |
| | | remark: { |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, span: 24 |
| | | }, |
| | |
| | | const financeTableOption = ref({ |
| | | menu: false, |
| | | addBtn: false, |
| | | header: false, selection: false, |
| | | selection: true, |
| | | header: true, |
| | | title: '历史垫付费用', |
| | | column: { |
| | | dataSource: { |
| | |
| | | label: '金额', |
| | | display: true, |
| | | }, |
| | | currency:{ |
| | | label: '币种', |
| | | currency: { |
| | | label: '币制', |
| | | display: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | }, |
| | |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | }, |
| | | remark:{ |
| | | remark: { |
| | | label: '备注', |
| | | }, |
| | | |
| | | status: { |
| | | label: '状态', |
| | | display: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_cancel_word', dataType: 'string', |
| | | }, |
| | | } |
| | | }) |
| | | |
| | |
| | | label: 'licensePlate', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | console.log(998, 'xq1'); |
| | | |
| | | getTmsVehicle(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsVehicle({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | console.log(669, 'xq2'); |
| | | |
| | | listTmsVehicle({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | label: 'driverName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsDriver({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | labelWidth: 120, |
| | | column: { |
| | | customsServiceProviderId: { |
| | | label: '报关服务商', span:24, |
| | | label: '报关服务商', span: 24, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column:{ |
| | | column: { |
| | | serviceCode: { |
| | | label: '服务商编码', |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称',minWidth:150, |
| | | label: '服务商简称', minWidth: 150, |
| | | search: true, |
| | | }, |
| | | serviceName: { |
| | | label: '服务商全称',search: true, |
| | | label: '服务商全称', search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型',minWidth:150, |
| | | label: '服务类型', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | multiple:true, |
| | | multiple: true, |
| | | search: true, |
| | | }, |
| | | } |
| | |
| | | label: 'serviceShortName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsCustomsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsCustomsServiceProvider({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | labelWidth: 120, |
| | | column: { |
| | | loadingServiceProviderId: { |
| | | label: '装卸服务商',span:24, |
| | | label: '装卸服务商', span: 24, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column:{ |
| | | column: { |
| | | serviceCode: { |
| | | label: '服务商编码', |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称',minWidth:150, |
| | | label: '服务商简称', minWidth: 150, |
| | | search: true, |
| | | }, |
| | | serviceName: { |
| | | label: '服务商全称',search: true, |
| | | label: '服务商全称', search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型',minWidth:150, |
| | | label: '服务类型', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | multiple:true, |
| | | multiple: true, |
| | | search: true, |
| | | }, |
| | | } |
| | |
| | | label: 'serviceShortName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsLoadingServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsLoadingServiceProvider({ pageSize: page.pageSize, pageNum: page.currentPage, ...data }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | menuBtn: false, |
| | | labelWidth: 120, |
| | | column: { |
| | | closeWhy:{ |
| | | label: '作废原因',span:24, |
| | | closeWhy: { |
| | | label: '作废原因', span: 24, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/close_why', |
| | | rules: [ |
| | | { |
| | |
| | | } |
| | | ], |
| | | }, |
| | | closeWhyRemark:{ |
| | | closeWhyRemark: { |
| | | label: '作废原因说明', |
| | | type: 'textarea', |
| | | span:24, |
| | | span: 24, |
| | | }, |
| | | } |
| | | }) |
| | |
| | | label: 'productName', |
| | | value: 'id' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | onLoad: ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | name: 'tab4', |
| | | value: '3', |
| | | } |
| | | ] |
| | | ] |
| | | }) |
| | | const tabsOptionRef = ref(); |
| | | const active = ref('tab1'); |
| | |
| | | menu: false, |
| | | selection: false, |
| | | column: { |
| | | freeName:{ |
| | | freeName: { |
| | | label: '费用名称', |
| | | }, |
| | | unit:{ |
| | | unit: { |
| | | label: '计量单位', |
| | | }, |
| | | count:{ |
| | | label : '计费数量' |
| | | count: { |
| | | label: '计费数量' |
| | | }, |
| | | remark:{ |
| | | remark: { |
| | | label: '备注' |
| | | } |
| | | } |
| | | }); |
| | | const zzItemsTableData = ref(); |
| | | |
| | | |
| | | |
| | | /* 报关列表 */ |
| | | const clearanceList = ref([]); |
| | | const optionNum = ref(''); // 用于区分是报关还是装卸 |
| | | |
| | | const { |
| | | tableData, |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | if (selection.length > 0){ |
| | | clearanceList.value = selection; |
| | | if (selection.length > 0) { |
| | | isCustoms.value = selection[0].isCustoms; |
| | | isLoad.value = selection[0].isLoad ; |
| | | }else{ |
| | | isLoad.value = selection[0].isLoad; |
| | | } else { |
| | | isCustoms.value = -1; |
| | | isLoad.value = -1; |
| | | } |
| | | isCustoms.value = isCustoms.value == 0 && !pageF.single ? 0 : -1; |
| | | isLoad.value = isLoad.value == 0 && !pageF.single ? 0 : -1; |
| | | console.log(pageF.single) |
| | | zxhdjSingle.value = pageF.multiple || true; |
| | | let yp = selection.filter((item: any) => { |
| | | return item.orderType == 0 |
| | | }); |
| | | if (yp.length > 0) { |
| | | zxhdjSingle.value = false; |
| | | } |
| | | }, |
| | | |
| | | 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; |
| | | // 1. 使用浅拷贝,不影响原始查询对象 |
| | | // 关键点:从原始 queryParams.value 取值,确保分页时依然能拿到数组 |
| | | let newParams = { ...queryParams.value, ...params }; |
| | | |
| | | // 2. 定义日期字段映射 (数组名 : 接口需要的前缀) |
| | | const dateMap = { |
| | | confirmTimeRangeArray: 'confirmTimeRange', |
| | | createTimeRangeArray: 'createTime', |
| | | updateTimeRangeArray: 'updateTimeRange', |
| | | okTimeRangeArray: 'okTime', |
| | | orderTimeRangeArray: 'orderTime' |
| | | }; |
| | | |
| | | // 3. 遍历处理日期 |
| | | Object.keys(dateMap).forEach(arrayKey => { |
| | | const prefix = dateMap[arrayKey]; |
| | | const range = newParams[arrayKey]; |
| | | |
| | | if (Array.isArray(range) && range.length === 2) { |
| | | // 赋值接口需要的 Begin 和 End |
| | | newParams[`${prefix}Begin`] = range[0]; |
| | | newParams[`${prefix}End`] = range[1]; |
| | | } |
| | | |
| | | // 只在给接口的参数中删除数组,不影响页面显示的 queryParams |
| | | delete newParams[arrayKey]; |
| | | }); |
| | | |
| | | // 4. 清洗参数:过滤空值 |
| | | const finalParams = {}; |
| | | Object.keys(newParams).forEach(key => { |
| | | const val = newParams[key]; |
| | | if (val !== '' && val !== null && val !== undefined) { |
| | | finalParams[key] = val; |
| | | } |
| | | }); |
| | | |
| | | |
| | | // 【核心修改】:直接返回,不要赋值给 queryParams.value |
| | | return finalParams; |
| | | }, |
| | | handleBeforeOpenFunc:(type:string)=>{ |
| | | if(type == 'add'){ |
| | | handleBeforeOpenFunc: (type: string) => { |
| | | |
| | | if (type == 'add') { |
| | | form.value = {}; |
| | | } else if (type == 'edit') { |
| | | // form.value = row; |
| | | |
| | | } |
| | | } |
| | | |
| | | }) |
| | | |
| | | useAvueTableShowHide(option.value); |
| | | |
| | | const handleConfirm = (row: any) => { |
| | | ElMessageBox.confirm("是否对调度单号" + row.dispatchNo + "确定 ?", '系统提示', { |
| | | confirmButtonText: '确定', |
| | |
| | | const handleUploadItinerary = (row: any) => { |
| | | optionType.value = 'addItinerary'; |
| | | boxFormOption.value = itineraryOption.value; |
| | | |
| | | boxTableOption.value = itineraryTableOption.value; |
| | | listTmsTrip({dispatchOrderId: row.id, pageNum: 1, pageSize: 999}).then(res => { |
| | | listTmsTrip({ dispatchOrderId: row.id, pageNum: 1, pageSize: 999 }).then(res => { |
| | | boxTableData.value = res.rows || []; |
| | | pageF.open = true; |
| | | pageF.title = '上传行程'; |
| | |
| | | vehicleNumber: row.licensePlate, |
| | | vehicleId: row.vehicleId, |
| | | } |
| | | |
| | | }) |
| | | } |
| | | const cancelBox = () => { |
| | |
| | | const handleLogItinerary = (row: any) => { |
| | | optionType.value = 'view'; |
| | | boxTableOption.value = itineraryTableOption.value; |
| | | listTmsTrip({dispatchOrderId: row.id, pageNum: 1, pageSize: 999}).then(res => { |
| | | listTmsTrip({ dispatchOrderId: row.id, pageNum: 1, pageSize: 999 }).then(res => { |
| | | boxTableData.value = res.rows || []; |
| | | pageF.open = true; |
| | | pageF.title = '查看行程'; |
| | |
| | | optionType.value = 'addFinance'; |
| | | boxFormOption.value = financeOption.value; |
| | | boxTableOption.value = financeTableOption.value; |
| | | const quotePlanItemRes = await listTmsQuoteItem({quotePlanId: row.quotePlanId, pageNum: 1, pageSize: 999}); |
| | | const quotePlanItemRes = await listTmsQuoteItem({ quotePlanId: row.quotePlanId, pageNum: 1, pageSize: 999 }); |
| | | let items = quotePlanItemRes.rows || []; |
| | | itemsTableData.value = items.map((item: any) => { |
| | | return { |
| | |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else if (optionType.value === 'customs') { |
| | | customsOrder({id:form.value.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName, |
| | | }).then(res => { |
| | | } else if (optionType.value === 'customs') { |
| | | let result = <any>[]; |
| | | if (optionNum.value == 'checkbox') { |
| | | result = clearanceList.value.map(item => { |
| | | return { |
| | | id: item.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName |
| | | }; |
| | | }); |
| | | } else if (optionNum.value == 'radio') { |
| | | result = [{ |
| | | id: form.value.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName |
| | | }] |
| | | } |
| | | |
| | | customsOrder(result).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else if (optionType.value === 'loading') { |
| | | loadingOrder({id:form.value.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName, |
| | | }).then(res => { |
| | | } else if (optionType.value === 'loading') { |
| | | |
| | | let result = <any>[]; |
| | | if (optionNum.value == 'checkbox') { |
| | | result = clearanceList.value.map(item => { |
| | | return { |
| | | id: item.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName |
| | | }; |
| | | }); |
| | | } else if (optionNum.value == 'radio') { |
| | | result = [{ |
| | | id: form.value.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName |
| | | }] |
| | | } |
| | | |
| | | loadingOrder(result).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else { |
| | | } else { |
| | | connectHang({ |
| | | dispatchId: form.value.id, |
| | | vehicleId: form.value.vehicleId, |
| | |
| | | } |
| | | |
| | | const handleAddGoods = (row: any) => { |
| | | listTmsGoodsDetail({dispatchId: row.id, pageSize: 999, pageNum: 1}).then(res => { |
| | | listTmsGoodsDetail({ dispatchId: row.id, pageSize: 999, pageNum: 1 }).then(res => { |
| | | goodsTableData.value = res.rows || []; |
| | | form.value = row; |
| | | open2.value = true; |
| | |
| | | } |
| | | |
| | | const submitForm3 = () => { |
| | | updateTmsDispatchOrder(actualForm.value).then(res => { |
| | | tmsDispatchOrderRecord(actualForm.value).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | |
| | | selectionList2.value = selection; |
| | | } |
| | | |
| | | const onShipperLoad = ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | const onShipperLoad = ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | if (districtId) data.districtId = districtId; |
| | | if (streetId) data.streetId = streetId; |
| | | } |
| | | listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data,customerId: form.value.customerId}).then(res => { |
| | | if (shipperReceiverForm.value.customerId) { |
| | | form.value.customerId = shipperReceiverForm.value.customerId; |
| | | } |
| | | listTmsConsignor({ pageSize: page.pageSize, pageNum: page.currentPage, ...data, customerId: form.value.customerId }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | }) |
| | | } |
| | | } |
| | | const onConsignorLoad = ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | const onConsignorLoad = ({ page, value, data }: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | |
| | | if (districtId) data.districtId = districtId; |
| | | if (streetId) data.streetId = streetId; |
| | | } |
| | | listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data,customerId: form.value.customerId}).then(res => { |
| | | if (shipperReceiverForm.value.customerId) { |
| | | form.value.customerId = shipperReceiverForm.value.customerId; |
| | | } |
| | | listTmsConsignor({ pageSize: page.pageSize, pageNum: page.currentPage, ...data, customerId: form.value.customerId }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | }) |
| | | } |
| | | } |
| | | const changeShipper = ({value}: any) => { |
| | | const changeShipper = ({ value }: any) => { |
| | | |
| | | if (value) { |
| | | let id = value; |
| | |
| | | }) |
| | | } |
| | | } |
| | | const changeReceiver = ({value}: any) => { |
| | | const changeReceiver = ({ value }: any) => { |
| | | |
| | | if (value) { |
| | | let id = value; |
| | |
| | | }) |
| | | } |
| | | } |
| | | const consignorAddOption =ref({ |
| | | const consignorAddOption = ref({ |
| | | labelWidth: 120, |
| | | group: [ |
| | | { |
| | | label: '基础信息', |
| | | prop: 'jcxx', |
| | | column:{ |
| | | column: { |
| | | // consignorCode: { |
| | | // label: '装卸货点编码',minWidth: 150, |
| | | // addDisplay: false, disabled: true, |
| | |
| | | // ], |
| | | // }, |
| | | consignorName: { |
| | | label: '装卸货点名称',minWidth: 150, |
| | | label: '装卸货点名称', minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | } |
| | | ], |
| | | }, |
| | | customerName:{ |
| | | label: '所属客户',minWidth: 150,disabled: true, |
| | | customerName: { |
| | | label: '所属客户', minWidth: 150, disabled: true, |
| | | }, |
| | | // customerId: { |
| | | // label: '所属客户',minWidth: 150, |
| | |
| | | // ], |
| | | // }, |
| | | consignorType: { |
| | | label: '装卸货点类型',minWidth: 150, |
| | | label: '装卸货点类型', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | |
| | | { |
| | | label: '联系人信息', |
| | | prop: 'lxrxx', |
| | | column:{ |
| | | column: { |
| | | contactName: { |
| | | label: '联系人姓名',minWidth: 150, |
| | | label: '联系人姓名', minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | ], |
| | | }, |
| | | contactPhone: { |
| | | label: '联系人电话',minWidth: 150, |
| | | label: '联系人电话', minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | search: false, |
| | | }, |
| | | contactEmail: { |
| | | label: '联系人邮箱',minWidth: 150, |
| | | label: '联系人邮箱', minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | |
| | | { |
| | | label: '地址信息', |
| | | prop: 'dzxx', |
| | | column:{ |
| | | column: { |
| | | |
| | | mapLocationDetail: { |
| | | label: '地图位置',minWidth: 150, |
| | | label: '地图位置', minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | editDisplay: true, span: 24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | |
| | | // console.log(form2.value,"form2") |
| | | // } |
| | | // }, |
| | | change: async ({value}:any)=>{ |
| | | if (Array.isArray(value) && value.length === 3){ |
| | | mapRegeo(value[1], value[0]).then(async res => { |
| | | let params = res.data || {}; |
| | | if (params.info === "OK") { |
| | | let {province, city, district, township} = params.regeocode.addressComponent || {}; |
| | | const res = await getAddressCode({province, city, district, township}); |
| | | const {provinceCode, cityCode, districtCode, townshipCode} = res.data || {}; |
| | | form2.value.regionLabel = province + " / " + city + " / " + district + " / " + township; |
| | | form2.value.provinceId = provinceCode; |
| | | form2.value.cityId = cityCode; |
| | | form2.value.districtId = districtCode; |
| | | form2.value.streetId = townshipCode; |
| | | form2.value.dispatchTransportArea = params.regeocode.formatted_address || params.regeocode.formattedAddress; |
| | | console.log(form2.value, "form2") |
| | | } |
| | | }); |
| | | change: async ({ value }: any) => { |
| | | if (Array.isArray(value) && value.length === 3) { |
| | | mapRegeo(value[1], value[0]).then(async res => { |
| | | let params = res.data || {}; |
| | | if (params.info === "OK") { |
| | | let { province, city, district, township } = params.regeocode.addressComponent || {}; |
| | | const res = await getAddressCode({ province, city, district, township }); |
| | | const { provinceCode, cityCode, districtCode, townshipCode } = res.data || {}; |
| | | form2.value.regionLabel = province + " / " + city + " / " + district + " / " + township; |
| | | form2.value.provinceId = provinceCode; |
| | | form2.value.cityId = cityCode; |
| | | form2.value.districtId = districtCode; |
| | | form2.value.streetId = townshipCode; |
| | | form2.value.dispatchTransportArea = params.regeocode.formatted_address || params.regeocode.formattedAddress; |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | |
| | | // }, |
| | | electronicFenceRange: { |
| | | label: '电子围栏范围', |
| | | addDisplay: true,minWidth: 150, |
| | | addDisplay: true, minWidth: 150, |
| | | editDisplay: true, |
| | | viewDisplay: true,append:'米', |
| | | viewDisplay: true, append: '米', |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | |
| | | { |
| | | label: '其他信息', |
| | | prop: 'qtyxx', |
| | | column:{ |
| | | column: { |
| | | remark: { |
| | | label: '备注',minWidth: 150, |
| | | label: '备注', minWidth: 150, |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | editDisplay: true, span: 24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | |
| | | const dialForm = ref(); |
| | | |
| | | const handleAddShipper = () => { |
| | | if (!form.value.customerId){ |
| | | if (!form.value.customerId) { |
| | | return ElMessage.error('请先选择运输路线'); |
| | | } |
| | | form2.value = { |
| | |
| | | }; |
| | | dialForm.value = $DialogForm(appContext)({ |
| | | title: '新增装货地', |
| | | data:form2.value, |
| | | data: form2.value, |
| | | width: '80%', |
| | | option: consignorAddOption.value, |
| | | menuPosition: 'right', |
| | | callback: (res:any,) => { |
| | | callback: (res: any,) => { |
| | | let data1 = res.data; |
| | | if (data1.mapLocationDetail){ |
| | | data1.mapLocation = data1.mapLocationDetail[0]+','+data1.mapLocationDetail[1]; |
| | | if (data1.mapLocationDetail) { |
| | | data1.mapLocation = data1.mapLocationDetail[0] + ',' + data1.mapLocationDetail[1]; |
| | | data1.addressDetail = data1.mapLocationDetail[2] |
| | | } |
| | | addTmsConsignor({...form2.value,...data1}).then(res2=>{ |
| | | addTmsConsignor({ ...form2.value, ...data1 }).then(res2 => { |
| | | let active = res2.data || {}; |
| | | if (active) { |
| | | let shipperRegionCode = ''; |
| | | if (active.provinceId){ |
| | | if (active.provinceId) { |
| | | shipperRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId){ |
| | | shipperRegionCode =shipperRegionCode+ ","+active.cityId; |
| | | if (active.cityId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId){ |
| | | shipperRegionCode =shipperRegionCode+ ","+active.districtId; |
| | | if (active.districtId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId){ |
| | | shipperRegionCode =shipperRegionCode+ ","+active.streetId; |
| | | if (active.streetId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.streetId; |
| | | } |
| | | Object.assign(form.value, { |
| | | shipperId: active.id, |
| | |
| | | shipperRegionLabel: active.regionLabel, |
| | | shipperAddress: active.addressDetail, |
| | | shipperMobile: active.contactPhone, |
| | | shipperRegionCode:shipperRegionCode |
| | | shipperRegionCode: shipperRegionCode |
| | | }); |
| | | } |
| | | dialForm.value.close(); |
| | | res.done(); |
| | | }).catch(err=>{ |
| | | }).catch(err => { |
| | | res.done(); |
| | | }) |
| | | }, |
| | |
| | | } |
| | | |
| | | const handleAddReceiver = () => { |
| | | if (!form.value.customerId){ |
| | | if (!form.value.customerId) { |
| | | return ElMessage.error('请先选择运输路线'); |
| | | } |
| | | form2.value = { |
| | |
| | | }; |
| | | dialForm.value = $DialogForm(appContext)({ |
| | | title: '新增卸货地', |
| | | data:form2.value, |
| | | data: form2.value, |
| | | width: '80%', |
| | | option: consignorAddOption.value, |
| | | menuPosition: 'right', |
| | | callback: (res:any,) => { |
| | | callback: (res: any,) => { |
| | | let data1 = res.data; |
| | | if (data1.mapLocationDetail){ |
| | | data1.mapLocation = data1.mapLocationDetail[0]+','+data1.mapLocationDetail[1]; |
| | | if (data1.mapLocationDetail) { |
| | | data1.mapLocation = data1.mapLocationDetail[0] + ',' + data1.mapLocationDetail[1]; |
| | | data1.addressDetail = data1.mapLocationDetail[2] |
| | | } |
| | | addTmsConsignor({...form2.value,...data1}).then(res2=>{ |
| | | addTmsConsignor({ ...form2.value, ...data1 }).then(res2 => { |
| | | let active = res2.data || {}; |
| | | if (active) { |
| | | let receiverRegionCode = ''; |
| | | if (active.provinceId){ |
| | | if (active.provinceId) { |
| | | receiverRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId){ |
| | | receiverRegionCode =receiverRegionCode+ ","+active.cityId; |
| | | if (active.cityId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId){ |
| | | receiverRegionCode =receiverRegionCode+ ","+active.districtId; |
| | | if (active.districtId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId){ |
| | | receiverRegionCode =receiverRegionCode+ ","+active.streetId; |
| | | if (active.streetId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.streetId; |
| | | } |
| | | |
| | | Object.assign(form.value, { |
| | |
| | | receiverRegionLabel: active.regionLabel, |
| | | receiverAddress: active.addressDetail, |
| | | receiverMobile: active.contactPhone, |
| | | receiverRegionCode:receiverRegionCode, |
| | | receiverRegionCode: receiverRegionCode, |
| | | }); |
| | | } |
| | | dialForm.value.close(); |
| | | res.done(); |
| | | }).catch(err=>{ |
| | | }).catch(err => { |
| | | res.done(); |
| | | }) |
| | | }, |
| | |
| | | const handleCustoms = () => { |
| | | title.value = '补充委托报关信息'; |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | form.value = clearanceList.value[0]; |
| | | optionType.value = 'customs'; |
| | | optionNum.value = 'checkbox' |
| | | boxFormOption.value = customsOption.value; |
| | | |
| | | } |
| | | |
| | | const handleCustomsAdd = (row) => { |
| | | title.value = '补充委托装卸信息'; |
| | | |
| | | clearanceList.value = []; |
| | | // 2. 清除表格视觉上的选中状态 |
| | | if (crudRef.value) { |
| | | crudRef.value.clearSelection(); |
| | | } |
| | | |
| | | // 3. 重置表单 |
| | | form.value = {}; |
| | | |
| | | // 4. 将当前点击的行数据赋值给 form,用于弹窗编辑 |
| | | Object.assign(form.value, row); |
| | | |
| | | open.value = true; |
| | | optionType.value = 'loading'; |
| | | optionNum.value = 'radio'; |
| | | |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const handleLoading = () => { |
| | | title.value = '补充委托装卸信息'; |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | optionType.value = 'loading'; |
| | | optionNum.value = 'checkbox' |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const handleLoadingAdd = (row: any) => { |
| | | // 1. 清空批量选中的数据列表,导致顶部按钮 disabled (length === 0) |
| | | clearanceList.value = []; |
| | | // 2. 清除表格视觉上的选中状态 |
| | | if (crudRef.value) { |
| | | crudRef.value.clearSelection(); |
| | | } |
| | | |
| | | // 3. 重置表单 |
| | | form.value = {}; |
| | | |
| | | // 4. 将当前点击的行数据赋值给 form,用于弹窗编辑 |
| | | Object.assign(form.value, row); |
| | | |
| | | // 5. 设置弹窗配置 |
| | | title.value = '补充委托报关信息'; |
| | | optionType.value = 'customs'; |
| | | optionNum.value = 'radio'; |
| | | boxFormOption.value = customsOption.value; |
| | | |
| | | // 6. 打开弹窗 |
| | | open.value = true; |
| | | |
| | | // 【调试】此时打印,长度应为 0 |
| | | } |
| | | const quotationItems = ref(); |
| | | const getQuotationItems = async () => { |
| | | let res = await getDicts("sys_quotation_items"); |
| | | 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)=>{ |
| | | const getTabData = (val: string) => { |
| | | 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: '次'} |
| | | if (filter.length > 0) { |
| | | zzItemsTableData.value = filter.map((item: any) => { |
| | | return { rowKey: randomId(), freeName: item.dictLabel, free: item.dictValue, unit: '次' } |
| | | }) |
| | | }else{ |
| | | } else { |
| | | zzItemsTableData.value = [] |
| | | } |
| | | } |
| | | |
| | | const getTab4Data = ()=>{ |
| | | 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, |
| | |
| | | |
| | | |
| | | |
| | | const submitTabForm = ()=>{ |
| | | if (['tab1','tab2','tab3'].includes(active.value)){ |
| | | let quoteFeeItems = zzItemsTableData.value.filter((item:any)=>{ |
| | | 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=>{ |
| | | 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(); |
| | | } |
| | | } 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 => { |
| | | // console.log(tmsFinanceDetails.value); |
| | | // console.log(boxForm.value); |
| | | // 1. 提取填写了金额的数据(金额大于0) |
| | | const validDetails = tmsFinanceDetails.value.filter(item => item.actualFeeAmount && item.actualFeeAmount > 0); |
| | | |
| | | if (validDetails.length === 0) { |
| | | ElMessage.warning('请至少填写一项费用金额'); |
| | | return; |
| | | } |
| | | |
| | | // 2. 校验:填写了金额的是否都选了币制 |
| | | const incomplete = validDetails.find(item => !item.currency); |
| | | if (incomplete) { |
| | | ElMessage.error(`费用类型【${incomplete.feeTypeName}】已填写金额,请选择币制!`); |
| | | return; // 拦截提交 |
| | | } |
| | | |
| | | // 3. 处理凭证 URL (如果有单张或多张上传的逻辑) |
| | | // 假设后端需要的是逗号分隔的字符串 |
| | | const submitData = validDetails.map((item: any) => { |
| | | let url = item.voucherUrl; |
| | | item.dispatchOrderId = form.value.id; |
| | | item.financeType = 2; |
| | | item.status = 0; |
| | | item.dataSource = 1; |
| | | if (Array.isArray(url)) { |
| | | url = url.join(','); |
| | | } |
| | | return { ...item, voucherUrl: url }; |
| | | }); |
| | | |
| | | |
| | | saveTmsFinanceDetail2(submitData).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | | }) |
| | | // open4.value = false; |
| | | onLoad(page.value) |
| | | initExpenditureData(); |
| | | boxFormRef.value?.resetFields(); |
| | | getTab4Data(); |
| | | }) |
| | | // saveTmsFinanceDetail(boxForm.value).then(res => { |
| | | // ElMessage({ |
| | | // message: "操作成功!", |
| | | // type: 'success' |
| | | // }) |
| | | // boxFormRef.value?.resetFields(); |
| | | // getTab4Data(); |
| | | // }) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const handleChange = (column:any)=>{ |
| | | const handleChange = (column: any) => { |
| | | active.value = column.prop; |
| | | if (['tab1','tab2','tab3'].includes(column.prop)){ |
| | | if (['tab1', 'tab2', 'tab3'].includes(column.prop)) { |
| | | getTabData(column.value) |
| | | }else if (column.prop === 'tab4'){ |
| | | } else if (column.prop === 'tab4') { |
| | | getTab4Data() |
| | | } |
| | | } |
| | |
| | | |
| | | boxFormOption.value = financeOption.value; |
| | | boxTableOption.value = financeTableOption.value; |
| | | nextTick(()=>{ |
| | | nextTick(() => { |
| | | tabsOptionRef.value.active = "0"; |
| | | |
| | | }) |
| | | } |
| | | |
| | | const handleClose = (row:any) => { |
| | | const handleClose = (row: any) => { |
| | | |
| | | if (row.status == 2){ |
| | | checkCloseOrder(row.id).then(res=>{ |
| | | if (row.status == 2) { |
| | | checkCloseOrder(row.id).then(res => { |
| | | open5.value = true; |
| | | form.value = row; |
| | | boxFormOption.value = closeOption.value; |
| | | }); |
| | | }else{ |
| | | } 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){ |
| | | const submitForm5 = () => { |
| | | boxFormRef.value.validate((valid: boolean, done: any) => { |
| | | if (valid) { |
| | | boxForm.value.id = form.value.id; |
| | | closeOrder(boxForm.value).then(res=>{ |
| | | closeOrder(boxForm.value).then(res => { |
| | | ElMessage.success('操作成功'); |
| | | open5.value = false; |
| | | done(); |
| | | onLoad(page.value) |
| | | }).catch(err=>{ |
| | | }).catch(err => { |
| | | done(); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | const printOption = ref({ |
| | | menuBtn: false, |
| | | labelWidth: 120, |
| | | column: { |
| | | sixLinkNo: { |
| | | label: '六联单号', |
| | | }, |
| | | portName: { |
| | | label: '行驶口岸', |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_port', |
| | | }, |
| | | billNo: { |
| | | label: '提单号S/O', |
| | | }, |
| | | terminalName: { |
| | | label: '码头名', |
| | | }, |
| | | cargoName: { |
| | | label: '货物名', |
| | | }, |
| | | pieceCount: { |
| | | label: '件数', |
| | | }, |
| | | weight: { |
| | | label: '重量', |
| | | }, |
| | | contactName: { |
| | | label: '客户联络人', |
| | | }, |
| | | contactPhone: { |
| | | label: '联络人手机号', |
| | | } |
| | | } |
| | | }) |
| | | const print = ref(0) |
| | | const handlePrint = () => { |
| | | form.value = selectionList.value[0]; |
| | | boxFormOption.value = printOption.value; |
| | | boxForm.value = form.value |
| | | |
| | | </script> |
| | | getTmsDriver(boxForm.value.mainDriverId).then(res => { |
| | | open6.value = true; |
| | | const driver = res.data || {}; |
| | | boxForm.value.mainDriverMobile = driver.mobile; |
| | | print.value = 0 |
| | | }) |
| | | |
| | | } |
| | | |
| | | const submitForm6 = () => { |
| | | print.value = 1; |
| | | printDispatchOrder(boxForm.value).then(res => { |
| | | $Print('#print'); |
| | | onLoad(page.value) |
| | | }) |
| | | |
| | | |
| | | } |
| | | const upload = reactive({ |
| | | // 是否显示弹出层(用户导入) |
| | | open: false, |
| | | // 是否禁用上传 |
| | | isUploading: false, |
| | | // 是否更新已经存在的用户数据 |
| | | updateSupport: 0, |
| | | // 设置上传的请求头部 |
| | | headers: { Authorization: "Bearer " + getToken() }, |
| | | // 上传的地址 |
| | | url: import.meta.env.VITE_APP_BASE_API + "/tms/tmsDispatchOrder/importData" |
| | | }); |
| | | |
| | | |
| | | const uploadRef = ref(); |
| | | |
| | | function handleImport() { |
| | | upload.open = true; |
| | | } |
| | | |
| | | |
| | | /** 下载模板操作 */ |
| | | function importTemplate() { |
| | | importTemplateTmsDispatchOrder(); |
| | | |
| | | } |
| | | const handleFileUploadProgress = (event: any, file: any) => { |
| | | upload.isUploading = true; |
| | | }; |
| | | /** 文件上传成功处理 */ |
| | | const handleFileSuccess = (response: any, file: any) => { |
| | | upload.open = false; |
| | | upload.isUploading = false; |
| | | uploadRef.value!.clearFiles(); |
| | | proxy.$alert("<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + response.msg + "</div>", "导入结果", { dangerouslyUseHTMLString: true }); |
| | | onLoad(page.value); |
| | | }; |
| | | /** 提交上传文件 */ |
| | | function submitFileForm() { |
| | | uploadRef.value!.submit(); |
| | | } |
| | | const shipperReceiverForm = ref<any>({}); |
| | | const shipperReceiverFormRef = ref(); |
| | | const shipperReceiverFormOption = ref({ |
| | | menuBtn: false, labelWidth: 140, |
| | | column: { |
| | | dispatchNos: { |
| | | label: '调度单号', span: 24, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "调度单号不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | shipperId: { |
| | | label: '装货点', dataType: 'string', disabled: false, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "装货点不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | |
| | | }, |
| | | shipperRegionLabel: { |
| | | label: '装货点行政区域', |
| | | display: true, disabled: true |
| | | |
| | | }, |
| | | shipperAddress: { |
| | | label: '装货点详细地址', |
| | | display: true, disabled: true |
| | | }, |
| | | shipperMobile: { |
| | | label: '装货点联系方式', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverId: { |
| | | label: '卸货点', |
| | | display: true, dataType: 'string', disabled: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "卸货点不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | receiverRegionLabel: { |
| | | label: '卸货点行政区域', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverAddress: { |
| | | label: '卸货点详细地址', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverMobile: { |
| | | label: '卸货点联系方式', |
| | | display: true, disabled: true |
| | | }, |
| | | } |
| | | }); |
| | | |
| | | const changeShipper2 = ({ value }: any) => { |
| | | |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | let active = res.data || {}; |
| | | let shipperRegionCode = ''; |
| | | if (active.provinceId) { |
| | | shipperRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.streetId; |
| | | } |
| | | Object.assign(shipperReceiverForm.value, { |
| | | shipperId: active.id, |
| | | shipperName: active.consignorName, |
| | | shipperRegionLabel: active.regionLabel, |
| | | shipperAddress: active.addressDetail, |
| | | shipperMobile: active.contactPhone, |
| | | shipperRegionCode: shipperRegionCode |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | const changeReceiver2 = ({ value }: any) => { |
| | | |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | let active = res.data || {}; |
| | | let receiverRegionCode = ''; |
| | | if (active.provinceId) { |
| | | receiverRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.streetId; |
| | | } |
| | | |
| | | Object.assign(shipperReceiverForm.value, { |
| | | receiverId: active.id, |
| | | receiverName: active.consignorName, |
| | | receiverRegionLabel: active.regionLabel, |
| | | receiverAddress: active.addressDetail, |
| | | receiverMobile: active.contactPhone, |
| | | receiverRegionCode: receiverRegionCode, |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | const hasDifferentCustomer = (() => { |
| | | const customerSet = new Set( |
| | | selectionList.value.map((item: any) => item.customerId) |
| | | ); |
| | | return customerSet.size > 1; |
| | | })(); |
| | | const handleZXHDJ = () => { |
| | | if (hasDifferentCustomer) { |
| | | ElMessage.error('单次操作只能操作一个客户的数据'); |
| | | return; |
| | | } |
| | | let filter = selectionList.value.filter((item: any) => !item.shipperId); |
| | | let filter2 = selectionList.value.filter((item: any) => !item.receiverId); |
| | | let zLen = filter.length || 0; |
| | | let xLen = filter2.length || 0; |
| | | if (zLen == 0 && xLen == 0) { |
| | | ElMessage.error('选择的数据已完成对装卸货点登记'); |
| | | return; |
| | | } |
| | | if (zLen > 0 && xLen > 0) { |
| | | if (zLen > xLen) { |
| | | ElMessage.error('选择的数据已填写卸货点数据,请单独编辑'); |
| | | return; |
| | | } |
| | | if (zLen < xLen) { |
| | | ElMessage.error('选择的数据已填写装货点数据,请单独编辑'); |
| | | return; |
| | | } |
| | | } |
| | | let item: any = selectionList.value[0]; |
| | | shipperReceiverForm.value.customerId = item?.customerId |
| | | shipperReceiverForm.value.customerCode = item?.customerCode |
| | | shipperReceiverForm.value.customerName = item?.customerName; |
| | | shipperReceiverForm.value.dispatchNos = selectionList.value.map((item: any) => item.dispatchNo) || []; |
| | | |
| | | shipperReceiverFormOption.value.column.shipperId.disabled = zLen == 0; |
| | | shipperReceiverFormOption.value.column.shipperId.rules[0].required = zLen != 0; |
| | | shipperReceiverFormOption.value.column.receiverId.disabled = xLen == 0; |
| | | shipperReceiverFormOption.value.column.receiverId.rules[0].required = xLen != 0; |
| | | |
| | | |
| | | open7.value = true; |
| | | } |
| | | |
| | | const handleAddShipper2 = () => { |
| | | |
| | | form2.value = { |
| | | customerId: shipperReceiverForm.value.customerId, |
| | | customerSysCode: shipperReceiverForm.value.customerCode, |
| | | customerName: shipperReceiverForm.value.customerName, |
| | | }; |
| | | dialForm.value = $DialogForm(appContext)({ |
| | | title: '新增装货地', |
| | | data: form2.value, |
| | | width: '80%', |
| | | option: consignorAddOption.value, |
| | | menuPosition: 'right', |
| | | callback: (res: any,) => { |
| | | let data1 = res.data; |
| | | if (data1.mapLocationDetail) { |
| | | data1.mapLocation = data1.mapLocationDetail[0] + ',' + data1.mapLocationDetail[1]; |
| | | data1.addressDetail = data1.mapLocationDetail[2] |
| | | } |
| | | addTmsConsignor({ ...form2.value, ...data1 }).then(res2 => { |
| | | let active = res2.data || {}; |
| | | if (active) { |
| | | let shipperRegionCode = ''; |
| | | if (active.provinceId) { |
| | | shipperRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId) { |
| | | shipperRegionCode = shipperRegionCode + "," + active.streetId; |
| | | } |
| | | Object.assign(shipperReceiverForm.value, { |
| | | shipperId: active.id, |
| | | shipperName: active.consignorName, |
| | | shipperRegionLabel: active.regionLabel, |
| | | shipperAddress: active.addressDetail, |
| | | shipperMobile: active.contactPhone, |
| | | shipperRegionCode: shipperRegionCode |
| | | }); |
| | | } |
| | | dialForm.value.close(); |
| | | res.done(); |
| | | }).catch(err => { |
| | | res.done(); |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | const handleAddReceiver2 = () => { |
| | | if (!form.value.customerId) { |
| | | return ElMessage.error('请先选择运输路线'); |
| | | } |
| | | form2.value = { |
| | | customerId: shipperReceiverForm.value.customerId, |
| | | customerSysCode: shipperReceiverForm.value.customerCode, |
| | | customerName: shipperReceiverForm.value.customerName, |
| | | }; |
| | | dialForm.value = $DialogForm(appContext)({ |
| | | title: '新增卸货地', |
| | | data: form2.value, |
| | | width: '80%', |
| | | option: consignorAddOption.value, |
| | | menuPosition: 'right', |
| | | callback: (res: any,) => { |
| | | let data1 = res.data; |
| | | if (data1.mapLocationDetail) { |
| | | data1.mapLocation = data1.mapLocationDetail[0] + ',' + data1.mapLocationDetail[1]; |
| | | data1.addressDetail = data1.mapLocationDetail[2] |
| | | } |
| | | addTmsConsignor({ ...form2.value, ...data1 }).then(res2 => { |
| | | let active = res2.data || {}; |
| | | if (active) { |
| | | let receiverRegionCode = ''; |
| | | if (active.provinceId) { |
| | | receiverRegionCode = active.provinceId; |
| | | } |
| | | if (active.cityId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.cityId; |
| | | |
| | | } |
| | | if (active.districtId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.districtId; |
| | | |
| | | } |
| | | if (active.streetId) { |
| | | receiverRegionCode = receiverRegionCode + "," + active.streetId; |
| | | } |
| | | |
| | | Object.assign(shipperReceiverForm.value, { |
| | | receiverId: active.id, |
| | | receiverName: active.consignorName, |
| | | receiverRegionLabel: active.regionLabel, |
| | | receiverAddress: active.addressDetail, |
| | | receiverMobile: active.contactPhone, |
| | | receiverRegionCode: receiverRegionCode, |
| | | }); |
| | | } |
| | | dialForm.value.close(); |
| | | res.done(); |
| | | }).catch(err => { |
| | | res.done(); |
| | | }) |
| | | }, |
| | | }) |
| | | } |
| | | |
| | | const handleCloseDispatchNo = (tag: string) => { |
| | | let indexOf = shipperReceiverForm.value.dispatchNos.indexOf(tag); |
| | | shipperReceiverForm.value.dispatchNos.splice(indexOf, 1); |
| | | } |
| | | |
| | | const submitZxForm = () => { |
| | | shipperReceiverFormRef.value.validate((valid: boolean, done: any) => { |
| | | if (valid) { |
| | | ypdddjSumbit(shipperReceiverForm.value).then(res => { |
| | | ElMessage.success('登记成功'); |
| | | open7.value = false; |
| | | onLoad(page.value); |
| | | |
| | | done(); |
| | | }).catch(err => { |
| | | done(); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | const importLogVisible = ref(false); |
| | | const importLogLoading = ref(false); |
| | | const importLogData = ref([]); |
| | | |
| | | // 弹窗表格配置 |
| | | const importLogOption = { |
| | | header: false, |
| | | addBtn: false, |
| | | menu: false, // 仅展示,不需要操作列 |
| | | column: [ |
| | | { label: '导入时间', prop: 'importTime', type: 'datetime', format: 'YYYY-MM-DD HH:mm:ss' }, |
| | | { label: '导入文件名称', prop: 'fileName' }, |
| | | { label: '操作人', prop: 'operator' }, |
| | | { label: '成功行数', prop: 'successCount' }, |
| | | { label: '失败行数', prop: 'failureCount' }, |
| | | { label: '失败说明', prop: 'failureDescription', overHidden: true } |
| | | ] |
| | | }; |
| | | |
| | | // 打开日志弹窗 |
| | | const handleImportLog = () => { |
| | | importLogVisible.value = true; |
| | | }; |
| | | |
| | | // 获取日志列表数据(需根据实际 API 调整) |
| | | const getImportLogList = () => { |
| | | importLogData.value = [] |
| | | // 假设有一个 getLogApi 的接口 |
| | | tmsTmsDispatchOrderImportLog().then(res => { |
| | | if (res.code == 200) { |
| | | importLogLoading.value = true; |
| | | importLogData.value = res.data; |
| | | importLogLoading.value = false; |
| | | } |
| | | }); |
| | | |
| | | }; |
| | | // 1. 定义唯一的变量名 |
| | | const tmsFinanceDetails = ref([]); // 数据源 |
| | | const expenditureTableOption = ref({ |
| | | addBtn: false, |
| | | menu: false, |
| | | header: false, |
| | | border: true, |
| | | index: false, |
| | | selection: false, |
| | | column: [ |
| | | { |
| | | label: '费用类型', |
| | | prop: 'feeTypeName', |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: '费用金额', |
| | | prop: 'actualFeeAmount', |
| | | slot: true, |
| | | width: 150 |
| | | }, |
| | | { |
| | | label: '币制', |
| | | prop: 'currency', |
| | | slot: true, |
| | | width: 200 |
| | | }, |
| | | { |
| | | |
| | | label: '费用凭证', |
| | | display: true, |
| | | span: 24, |
| | | accept: 'string', dataType: 'object', |
| | | type: 'upload', |
| | | // action: '/common/upload2', |
| | | prop: 'voucherUrl', // 这里改成 prop 属性 |
| | | slot: true, // 开启插槽 |
| | | width: 200 |
| | | }, |
| | | { |
| | | label: '备注', |
| | | prop: 'remark', |
| | | slot: true |
| | | } |
| | | ] |
| | | }); |
| | | // 3. 回显初始化 |
| | | const initExpenditureData = () => { |
| | | tmsFinanceDetails.value = [] |
| | | if (fee_type.value && fee_type.value.length > 0 && tmsFinanceDetails.value.length === 0) { |
| | | tmsFinanceDetails.value = fee_type.value.map(item => ({ |
| | | feeType: item.value, |
| | | feeTypeName: item.label, |
| | | feeAmount: undefined, |
| | | currency: '', |
| | | voucherUrl: '', |
| | | remark: '' |
| | | })); |
| | | } |
| | | }; |
| | | // 4. 监听切换 |
| | | watch(() => active.value, (val) => { |
| | | if (val === 'tab4') { |
| | | initExpenditureData(); |
| | | } |
| | | }); |
| | | const handleUploadAfter = (res: any, row: any) => { |
| | | // res 是接口返回的完整数据 |
| | | if (res.code === 200) { |
| | | // 手动给这一行的数据赋值 |
| | | row.voucherUrl = res.data.url; |
| | | } else if (res.data && res.data.url) { |
| | | // 如果返回的数据包裹在 data 里 |
| | | row.voucherUrl = res.data.url; |
| | | } |
| | | }; |
| | | /** 当文件超出限制时(实现自动替换逻辑) */ |
| | | const handleExceed = (files: any, row: any) => { |
| | | // 1. 清除当前显示的文件列表 |
| | | uploadRef.value.clearFiles(); |
| | | // 2. 手动把新选择的文件添加进去重新上传 |
| | | const file = files[0]; |
| | | uploadRef.value.handleStart(file); |
| | | uploadRef.value.submit(); |
| | | }; |
| | | |
| | | const flowLogIshow = ref() |
| | | const flowParams = ref([]) |
| | | |
| | | const handleFlow = (row: string) => { |
| | | let data = { |
| | | headId: row.id, |
| | | } |
| | | listTmsDispatchOrderLog(data).then((res) => { |
| | | flowParams.value = res.rows |
| | | flowLogIshow.value.openModel() |
| | | |
| | | }) |
| | | } |
| | | |
| | | const boxSelectionChange = (selection: any[]) => { |
| | | boxSelectionList.value = selection; |
| | | } |
| | | const handleBatchBoxDel = () => { |
| | | if (boxSelectionList.value.length === 0) { |
| | | ElMessage.warning('请选择要作废的费用明细'); |
| | | return; |
| | | } |
| | | |
| | | ElMessageBox.confirm(`确认要作废选中的 ${boxSelectionList.value.length} 条费用明细吗?`, '警告', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | let data = { |
| | | id: boxSelectionList.value[0].id, |
| | | status: 1 |
| | | } |
| | | tmsFinanceDetail(data).then(res => { |
| | | ElMessage.success('作废成功'); |
| | | getTab4Data(); // 刷新数据 |
| | | }).catch(err => { |
| | | ElMessage.error('作废失败'); |
| | | }); |
| | | }).catch(() => { |
| | | // 取消操作 |
| | | }); |
| | | } |
| | | |
| | | const handleOrderTypeChange = (value: any) => { |
| | | // 防止 value 为 null 或 undefined 时出错 (当清空选择时) |
| | | if (value === null || value === undefined) { |
| | | return; |
| | | } |
| | | |
| | | option.value.group.forEach((item: any) => { |
| | | if (item.prop == 'pcxx') { |
| | | // 处理装货点必填规则 |
| | | if (item.column.shipperId && item.column.shipperId.rules) { |
| | | item.column.shipperId.rules.forEach((cItem: any) => { |
| | | cItem.required = !(value == 1); |
| | | }); |
| | | } |
| | | |
| | | // 处理卸货点必填规则 |
| | | if (item.column.receiverId && item.column.receiverId.rules) { |
| | | item.column.receiverId.rules.forEach((cItem: any) => { |
| | | cItem.required = !(value == 1); |
| | | }); |
| | | } |
| | | } |
| | | }); |
| | | |
| | | // 【新增逻辑】如果切换到了非必填状态 (value == 1),则清除这两个字段的校验提示 |
| | | if (value == 1) { |
| | | // 确保 crudRef 存在且暴露了 clearValidate 方法 |
| | | if (crudRef.value && typeof crudRef.value.clearValidate === 'function') { |
| | | // 清除指定字段的校验状态 |
| | | crudRef.value.clearValidate(['shipperId', 'receiverId']); |
| | | } |
| | | } |
| | | }; |
| | | /* 车牌号 */ |
| | | // --- 状态管理 --- |
| | | const vehicleDialogVisible = ref(false); |
| | | const vehicleData = ref<VehicleRow[]>([]); |
| | | const vehicleQuery = ref<any>({}); |
| | | const selectedVehicleRow = ref<VehicleRow>({}); |
| | | |
| | | const vehiclePage = ref({ |
| | | currentPage: 1, |
| | | pageSize: 10, |
| | | total: 0 |
| | | }); |
| | | |
| | | // --- 弹窗配置 --- |
| | | const vehicleOption = ref({ |
| | | header: true, |
| | | menu: false, |
| | | addBtn: false, |
| | | refreshBtn: true, |
| | | columnBtn: false, |
| | | index: false, |
| | | selection: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | searchLabelWidth: 100, |
| | | highlightCurrentRow: true, |
| | | column: [ |
| | | { label: '车辆服务商', prop: 'serviceProviderName', search: true }, |
| | | { |
| | | label: '车辆类型', |
| | | prop: 'vehicleType', |
| | | type: 'select', |
| | | dataType: 'string', |
| | | dicUrl: '/system/dict/data/type/vehicle_type', |
| | | search: true |
| | | }, |
| | | { label: '车辆内部编码', prop: 'internalCode', search: true }, |
| | | { label: '车牌号', prop: 'licensePlate', search: true }, |
| | | { label: '香港牌照', prop: 'licenseHk' }, |
| | | { label: '澳门牌照', prop: 'licenseMo' } |
| | | ] |
| | | }); |
| | | |
| | | // --- 方法 --- |
| | | |
| | | /** |
| | | * 加载数据:默认强制传 carrierType: '0' |
| | | */ |
| | | const loadVehicleList = async (page?: any, params?: any) => { |
| | | const query = { |
| | | pageNum: vehiclePage.value.currentPage, |
| | | pageSize: vehiclePage.value.pageSize, |
| | | carrierType: '0', // 默认强制传0 |
| | | ...vehicleQuery.value, |
| | | ...params |
| | | }; |
| | | |
| | | try { |
| | | const res = await listTmsVehicle(query); |
| | | if (res.code === 200) { |
| | | // const { records, total } = res.rows; |
| | | vehicleData.value = res.rows; |
| | | vehiclePage.value.total = res.total; |
| | | } |
| | | } catch (error) { |
| | | console.error("加载车辆列表失败", error); |
| | | } |
| | | }; |
| | | |
| | | /** |
| | | * 搜索:带入搜索参数并强制 carrierType 为 0 |
| | | */ |
| | | const vehicleSearchChange = (params: any, done: Function) => { |
| | | vehicleQuery.value = params; |
| | | vehiclePage.value.currentPage = 1; |
| | | loadVehicleList(); |
| | | done(); |
| | | }; |
| | | |
| | | /** |
| | | * 重置:清空搜索条件,但依然保留 carrierType 为 0 |
| | | */ |
| | | const vehicleSearchReset = () => { |
| | | vehicleQuery.value = {}; // 清空搜索 |
| | | vehiclePage.value.currentPage = 1; |
| | | loadVehicleList(); // loadVehicleList 内部已经写死 carrierType: '0' |
| | | }; |
| | | |
| | | const vehicleCurrentChange = (val: number) => { |
| | | vehiclePage.value.currentPage = val; |
| | | loadVehicleList(); |
| | | }; |
| | | |
| | | const vehicleSizeChange = (val: number) => { |
| | | vehiclePage.value.pageSize = val; |
| | | loadVehicleList(); |
| | | }; |
| | | |
| | | const handleVehicleRowClick = (row: VehicleRow) => { |
| | | selectedVehicleRow.value = row; |
| | | }; |
| | | |
| | | // 打开弹窗方法 |
| | | const handleVehicleSelect = () => { |
| | | selectedVehicleRow.value = {}; |
| | | vehicleDialogVisible.value = true; |
| | | }; |
| | | |
| | | /** |
| | | * 确认选择:回显到主表单 |
| | | */ |
| | | const confirmVehicleSelection = () => { |
| | | if (!selectedVehicleRow.value.licensePlate) { |
| | | appContext.$message.warning("请点击选择一行记录"); |
| | | return; |
| | | } |
| | | // 1. 赋值 (确保主表单 data.form 存在) |
| | | |
| | | |
| | | data.form.vehicleId = selectedVehicleRow.value.id; |
| | | data.form.licensePlate = selectedVehicleRow.value.licensePlate; |
| | | data.form.actualVehicleType= selectedVehicleRow.value.vehicleType; |
| | | |
| | | // 如果需要其他字段也可以一并带回,比如服务商等 |
| | | // data.form.serviceProviderName = selectedVehicleRow.value.serviceProviderName; |
| | | |
| | | vehicleDialogVisible.value = false; |
| | | |
| | | // 2. 强制视图更新 |
| | | nextTick(() => { |
| | | appContext.$forceUpdate(); |
| | | }); |
| | | }; |
| | | |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | ::v-deep .cydprint .el-dialog__body { |
| | | overflow: hidden; |
| | | //padding: 0; |
| | | margin: 0; |
| | | } |
| | | |
| | | #print { |
| | | .title { |
| | | text-align: center; |
| | | font-size: 14pt; |
| | | color: #000; |
| | | line-height: 23pt; |
| | | font-weight: bold; |
| | | margin: 0; |
| | | } |
| | | |
| | | .header { |
| | | position: relative; |
| | | |
| | | .order { |
| | | font-size: 12pt; |
| | | color: #000; |
| | | line-height: 23pt; |
| | | } |
| | | |
| | | .sub-title { |
| | | position: absolute; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | top: 0; |
| | | font-size: 12pt; |
| | | color: #000; |
| | | line-height: 23pt; |
| | | text-decoration: underline; |
| | | } |
| | | |
| | | } |
| | | |
| | | table { |
| | | width: 100%; |
| | | border-collapse: collapse; |
| | | /* 合并边框 */ |
| | | font-size: 12px; |
| | | table-layout: fixed; |
| | | /* 关键点 */ |
| | | } |
| | | |
| | | table, |
| | | td { |
| | | border: 1px solid #000; |
| | | |
| | | } |
| | | |
| | | td { |
| | | padding: 4px; |
| | | vertical-align: middle; |
| | | width: 50%; |
| | | /* 强制等宽 */ |
| | | word-break: break-all; |
| | | } |
| | | } |
| | | |
| | | .dispatchNos { |
| | | //border: 1px solid #ebeef5; |
| | | border-radius: 4px; |
| | | min-height: 73px; |
| | | padding: 1px 11px; |
| | | box-shadow: 0 0 0 1px var(--el-disabled-border-color) inset; |
| | | } |
| | | |
| | | .link-btn { |
| | | font-size: 18px; |
| | | } |
| | | |
| | | /* */ |
| | | /* 现有的样式保持不变... */ |
| | | .specific-drag-area { |
| | | width: 100%; |
| | | |
| | | :deep(.full-width-drag) { |
| | | |
| | | // 1. 核心:隐藏 Avue 默认在 dragger 下方生成的那个“点击上传”按钮 |
| | | // 在 3.x 版本中,它是 el-upload 后的一个兄弟节点或者是内部节点 |
| | | .el-button--primary { |
| | | display: none !important; |
| | | } |
| | | |
| | | .el-upload { |
| | | width: 100%; |
| | | display: block; // 确保块级显示 |
| | | |
| | | .el-upload-dragger { |
| | | width: 100%; |
| | | height: 120px; |
| | | background-color: #fcfdfe; |
| | | border: 2px dashed #dcdfe6; |
| | | border-radius: 8px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | justify-content: center; |
| | | padding: 0 !important; |
| | | |
| | | // 覆盖 Element Plus 默认的内部文字排版,防止冲突 |
| | | .el-upload__text { |
| | | display: none !important; |
| | | } |
| | | |
| | | &:hover { |
| | | border-color: #409eff; |
| | | background-color: #f5f7fa; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 3. 自定义内容的样式(确保它不被 display:none 影响) |
| | | .drag-zone-inner { |
| | | pointer-events: none; |
| | | text-align: center; |
| | | |
| | | .upload-icon { |
| | | font-size: 32px !important; |
| | | color: #909399; |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .drag-text { |
| | | .main-title { |
| | | font-size: 14px; |
| | | color: #606266; |
| | | font-weight: bold; |
| | | line-height: 1.5; |
| | | } |
| | | |
| | | .sub-title { |
| | | font-size: 12px; |
| | | color: #a8abb2; |
| | | margin-top: 4px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |