| | |
| | | <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-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> |
| | |
| | | <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" |
| | | <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" |
| | | <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" |
| | |
| | | </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> |
| | |
| | | importTemplateTmsDispatchOrder, ypdddjSumbit, |
| | | tmsTmsDispatchOrderImportLog, |
| | | saveTmsFinanceDetail2, |
| | | getLastLicensePlate |
| | | getLastLicensePlate, |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import { computed, onMounted, onBeforeUnmount, reactive, ref, toRefs, watch, getCurrentInstance, nextTick } from "vue"; |
| | |
| | | } |
| | | }); |
| | | const zzItemsTableData = ref(); |
| | | |
| | | |
| | | |
| | | /* 报关列表 */ |
| | | const clearanceList = ref([]); |
| | | const optionNum = ref(''); // 用于区分是报关还是装卸 |
| | | |
| | | const { |
| | | tableData, |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | clearanceList.value = selection; |
| | | if (selection.length > 0) { |
| | | isCustoms.value = selection[0].isCustoms; |
| | | isLoad.value = selection[0].isLoad; |
| | |
| | | pageF.isUploading = false; |
| | | }) |
| | | } else if (optionType.value === 'customs') { |
| | | customsOrder({ |
| | | id: form.value.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName, |
| | | }).then(res => { |
| | | 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' |
| | |
| | | pageF.isUploading = false; |
| | | }) |
| | | } else if (optionType.value === 'loading') { |
| | | loadingOrder({ |
| | | id: form.value.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName, |
| | | }).then(res => { |
| | | |
| | | 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' |
| | |
| | | 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 = (selectionList) => { |
| | | 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; |
| | | form.value = selectionList; |
| | | optionType.value = 'loading'; |
| | | optionNum.value = 'radio'; |
| | | |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const handleLoading = () => { |
| | |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | optionType.value = 'loading'; |
| | | optionNum.value = 'checkbox' |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const handleLoadingAdd = (selectionList) => { |
| | | title.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; |
| | | form.value = selectionList; |
| | | optionType.value = 'loading'; |
| | | boxFormOption.value = loadingOption.value; |
| | | |
| | | // 【调试】此时打印,长度应为 0 |
| | | } |
| | | const quotationItems = ref(); |
| | | const getQuotationItems = async () => { |
| | |
| | | const handleOrderTypeChange = (value: any) => { |
| | | // 防止 value 为 null 或 undefined 时出错 (当清空选择时) |
| | | if (value === null || value === undefined) { |
| | | return; |
| | | return; |
| | | } |
| | | |
| | | option.value.group.forEach((item: any) => { |
| | |
| | | cItem.required = !(value == 1); |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 处理卸货点必填规则 |
| | | if (item.column.receiverId && item.column.receiverId.rules) { |
| | | item.column.receiverId.rules.forEach((cItem: any) => { |