| | |
| | | @on-load="onLoad" |
| | | > |
| | | <template #menu-left> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | | <!-- icon="Edit"--> |
| | | <!-- :disabled="pageF.single"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:edit']"--> |
| | | <!-- @click="handleUpdate">修改--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- type="danger"--> |
| | | <!-- icon="Delete"--> |
| | | <!-- :disabled="pageF.multiple"--> |
| | | <!-- @click="handleDelete"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:remove']"--> |
| | | <!-- >删除--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- type="success"--> |
| | | <!-- icon="Edit"--> |
| | | <!-- :disabled="pageF.single"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:edit']"--> |
| | | <!-- @click="handleUpdate">修改--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button--> |
| | | <!-- type="danger"--> |
| | | <!-- icon="Delete"--> |
| | | <!-- :disabled="pageF.multiple"--> |
| | | <!-- @click="handleDelete"--> |
| | | <!-- v-hasPermi="['tms:tmsDispatchOrder:remove']"--> |
| | | <!-- >删除--> |
| | | <!-- </el-button>--> |
| | | <el-button |
| | | type="warning" |
| | | plain |
| | |
| | | >导出 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | icon="Promotion" |
| | | :disabled="pageF.multiple" |
| | | @click="handleGenerate" |
| | | v-hasPermi="['tms:tmsDispatchOrder:generate']" |
| | | >生成应收应付费用 |
| | | </el-button> |
| | | type="info" |
| | | icon="Upload" |
| | | @click="handleImport" |
| | | v-hasPermi="['tms:tmsDispatchOrder:import']">导入</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" |
| | |
| | | >接挂 |
| | | </el-button> |
| | | |
| | | <el-button |
| | | type="warning" |
| | | icon="Avatar" |
| | | :disabled="!( isCustoms == 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> |
| | | <el-button |
| | | type="primary" |
| | | icon="UserFilled" |
| | | :disabled="pageF.single" |
| | | @click="handleZZ" |
| | | v-hasPermi="['tms:tmsDispatchOrder:zzdj']" |
| | | >增值作业登记 |
| | | </el-button> |
| | | <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 #menu-before="{row}"> |
| | | <el-link size="small" type="primary" @click="handleAddGoods(row)" class="link-btn" |
| | | <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" |
| | | <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" |
| | | :underline="false" icon="el-icon-edit-pen">费用登记 |
| | | </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> |
| | | </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> |
| | | </div> |
| | | </template> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <el-dialog :title="pageF.title" v-model="pageF.open" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <avue-form v-if="optionType == 'addItinerary' || optionType == 'addFinance'" v-model="boxForm" ref="boxFormRef" :option="boxFormOption"> |
| | | <h2 v-if="optionType == 'addFinance'">报价费用</h2> |
| | | <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> |
| | | </template> |
| | | </avue-crud> |
| | | <h2 v-if="optionType == 'addFinance'">实报实销费用</h2> |
| | | <avue-form v-if="optionType == 'addItinerary' || optionType == 'addFinance'" v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <avue-crud |
| | |
| | | </avue-crud> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" v-if="optionType == 'addItinerary' || optionType == 'addFinance'" :loading="pageF.isUploading" @click="submitForm"> |
| | | <el-button type="primary" v-if="optionType == 'addItinerary' || optionType == 'addFinance'" |
| | | :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> |
| | |
| | | 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-item label="运输工具号码" >{{ form.licensePlate }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号" >{{ form.shelfCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="主驾驶员" >{{ form.mainDriverName }}</el-descriptions-item> |
| | | <el-descriptions-item label="副驾驶员" >{{ form.assistantDriverName }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item> |
| | | <el-descriptions-item label="派出车型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="运输工具号码">{{ form.licensePlate }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号">{{ form.shelfCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="主驾驶员">{{ form.mainDriverName }}</el-descriptions-item> |
| | | <el-descriptions-item label="副驾驶员">{{ form.assistantDriverName }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | <div v-if="optionType == 'connectHang'"> |
| | | <div v-if="optionType == 'connectHang'"> |
| | | <el-descriptions style="margin-bottom: 20px" |
| | | :column="2" |
| | | border |
| | | :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-item label="托架号" >{{ form.shelfCode }}</el-descriptions-item> |
| | | <el-descriptions-item label="客户">{{ form.customerName }}</el-descriptions-item> |
| | | <el-descriptions-item label="派出车型">{{ form.$actualVehicleType }}</el-descriptions-item> |
| | | <el-descriptions-item label="托架号">{{ form.shelfCode }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | </div> |
| | | |
| | | <div v-if="optionType == 'customs'"> |
| | | <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.projectName }}</el-descriptions-item> |
| | | <el-descriptions-item label="运输路线">{{ form.transportLine }}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <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-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> |
| | | <avue-form v-model="form" ref="boxFormRef" :option="boxFormOption"> |
| | | |
| | |
| | | </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> |
| | |
| | | :data="goodsTableData" ref="goodsCrudRef" |
| | | > |
| | | </avue-crud> |
| | | <!-- <template #footer>--> |
| | | <!-- <div class="dialog-footer">--> |
| | | <!-- <el-button type="primary" :loading="pageF.isUploading" @click="submitForm2">--> |
| | | <!-- {{ pageF.isUploading ? '提交中' : '确 定' }}--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button @click="open2 = false">取 消</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | <!-- <template #footer>--> |
| | | <!-- <div class="dialog-footer">--> |
| | | <!-- <el-button type="primary" :loading="pageF.isUploading" @click="submitForm2">--> |
| | | <!-- {{ pageF.isUploading ? '提交中' : '确 定' }}--> |
| | | <!-- </el-button>--> |
| | | <!-- <el-button @click="open2 = false">取 消</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </template>--> |
| | | </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> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitForm3"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | <el-button @click="open3 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" :loading="pageF.isUploading" @click="submitForm3"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | <el-button @click="open3 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | |
| | | |
| | | <el-dialog title="增值作业登记" v-model="open4" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <el-descriptions :column="3" border> |
| | | <el-descriptions-item label="调度单号">{{form.dispatchNo}}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{form.customerName}}</el-descriptions-item> |
| | | <el-descriptions-item label="项目名称">{{form.projectName}}</el-descriptions-item> |
| | | <el-descriptions-item label="运输路线">{{form.transportLine}}</el-descriptions-item> |
| | | <el-descriptions-item label="车型">{{form.$actualVehicleType}}</el-descriptions-item> |
| | | <el-descriptions-item label="车牌">{{form.licensePlate}}</el-descriptions-item> |
| | | </el-descriptions> |
| | | <avue-tabs :option="tabsOption" ref="tabsOptionRef" |
| | | @change="handleChange"></avue-tabs> |
| | | |
| | | <avue-crud v-if="active !== 'tab4'" |
| | | :option="zzItemsTableOption" ref="itemsTableRef" |
| | | :data="zzItemsTableData" |
| | | > |
| | | <template #count="{row}"> |
| | | <el-input-number v-model="row.count" placeholder="计费数量" |
| | | :min="0"></el-input-number> |
| | | </template> |
| | | <template #remark="{row}"> |
| | | <el-input v-model="row.remark" placeholder="备注" ></el-input> |
| | | </template> |
| | | |
| | | |
| | | </avue-crud> |
| | | |
| | | <div v-if="active === 'tab4'"> |
| | | <h2>实报实销费用</h2> |
| | | <avue-form v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <avue-crud |
| | | :option="boxTableOption" |
| | | :data="boxTableData" |
| | | > |
| | | </avue-crud> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="pageF.isUploading" @click="submitTabForm"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button @click="open4 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <el-dialog title="调度单作废" v-model="open5" class="avue-dialog avue-dialog--top" width="80%"> |
| | | <el-descriptions :column="3" border> |
| | | <el-descriptions-item label="调度单号">{{form.dispatchNo}}</el-descriptions-item> |
| | | <el-descriptions-item label="客户名称">{{form.customerName}}</el-descriptions-item> |
| | | <el-descriptions-item label="项目名称">{{form.projectName}}</el-descriptions-item> |
| | | <el-descriptions-item label="运输路线">{{form.transportLine}}</el-descriptions-item> |
| | | <el-descriptions-item label="车型">{{form.$actualVehicleType}}</el-descriptions-item> |
| | | <el-descriptions-item label="车牌">{{form.licensePlate}}</el-descriptions-item> |
| | | </el-descriptions> |
| | | |
| | | <avue-form v-model="boxForm" ref="boxFormRef" |
| | | :option="boxFormOption"> |
| | | |
| | | </avue-form> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button type="primary" |
| | | :loading="pageF.isUploading" @click="submitForm5"> |
| | | {{ pageF.isUploading ? '提交中' : '确 定' }} |
| | | </el-button> |
| | | |
| | | <el-button @click="open5 = false">取 消</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <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="false" 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> |
| | | |
| | | </basicContainer> |
| | | </template> |
| | |
| | | getTmsDispatchOrder, |
| | | listTmsDispatchOrder, |
| | | updateTmsDispatchOrder, |
| | | confirmOrder, copyOrder, okOrder, initGenerate, generateTmsDispatchOrder, dropHook, connectHang |
| | | confirmOrder, |
| | | copyOrder, |
| | | okOrder, |
| | | initGenerate, |
| | | generateTmsDispatchOrder, |
| | | dropHook, |
| | | connectHang, |
| | | customsOrder, |
| | | loadingOrder, |
| | | checkCloseOrder, |
| | | closeOrder, |
| | | printDispatchOrder, |
| | | importTemplateTmsDispatchOrder,ypdddjSumbit |
| | | } from "@/api/tms/tmsDispatchOrder"; |
| | | import useCurrentInstance from "@/utils/useCurrentInstance"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch} from "vue"; |
| | | import {computed, onMounted, reactive, ref, toRefs, watch, getCurrentInstance, nextTick} from "vue"; |
| | | import {PagesInterface, PageQueryInterface} from "@/utils/globalInterface"; |
| | | import {usePagePlus} from "@/hooks/usePagePlus"; |
| | | import {hasPermission} from "@/utils/permissionUtils"; |
| | |
| | | import {getTmsVehicle, listTmsVehicle} from "@/api/tms/tmsVehicle"; |
| | | import {getTmsContainer, listTmsContainer} from "@/api/tms/tmsContainer"; |
| | | import {getTmsShelf, listTmsShelf} from "@/api/tms/tmsShelf"; |
| | | import {getTmsConsignor, listTmsConsignor} from "@/api/tms/tmsConsignor"; |
| | | import {ElMessage, ElMessageBox} from "element-plus"; |
| | | 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, updateTmsFinanceDetail} from "@/api/tms/tmsFinanceDetail"; |
| | | import { |
| | | addTmsFinanceDetail, |
| | | listTmsFinanceDetail, |
| | | saveTmsFinanceDetail, |
| | | updateTmsFinanceDetail |
| | | } from "@/api/tms/tmsFinanceDetail"; |
| | | import {getTmsProductInfo, listTmsProductInfo} from "@/api/tms/tmsProductInfo"; |
| | | import {addTmsGoodsDetail, delTmsGoodsDetail, listTmsGoodsDetail, updateTmsGoodsDetail} from "@/api/tms/tmsGoodsDetail"; |
| | | import {getTransportRouteVi, listTransportRouteVi} from "@/api/tms/tmsTransportRouteVi"; |
| | | import {listTmsQuoteItem} from "@/api/tms/tmsQuotePlanItem"; |
| | | import {$DialogForm, 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"; |
| | | |
| | | const {appContext} = getCurrentInstance(); |
| | | |
| | | const {proxy} = useCurrentInstance(); |
| | | const crudRef = ref(); |
| | |
| | | } else if (key == 'delBtn') { |
| | | return hasPermission(["tms:tmsDispatchOrder:remove"]) && row?.status == 0 |
| | | } else if (key == 'editBtn') { |
| | | return hasPermission(["tms:tmsDispatchOrder:edit"]) && [0,1].includes(row?.status) |
| | | return hasPermission(["tms:tmsDispatchOrder:edit"]) && [0, 1].includes(row?.status) |
| | | } else if (key == 'viewBtn') { |
| | | return hasPermission(["tms:tmsDispatchOrder:query"]) |
| | | } else { |
| | |
| | | boxTableOption: <any>{}, |
| | | title: '', |
| | | open: false, |
| | | open2:false, |
| | | open2: false, |
| | | goodsTableData: <any>[], |
| | | goodsForm:<any>{}, |
| | | selectionList2: <any>[], |
| | | goodsForm: <any>{}, |
| | | open3: false, |
| | | actualForm:<any>{}, |
| | | actualForm: <any>{}, |
| | | isCustoms:<any> -1, |
| | | isLoad: -1, |
| | | open5:false, |
| | | open6:false, |
| | | open7:false, |
| | | zxhdjSingle:false, |
| | | }) |
| | | const {queryParams, form, page, selectionList,open3, |
| | | const { |
| | | queryParams, form, page, selectionList, open3, |
| | | boxTableData, optionType, |
| | | boxFormOption,boxForm,boxTableOption,title,open,open2, |
| | | goodsTableData,goodsForm,actualForm |
| | | boxFormOption, boxForm, boxTableOption, title, open, open2, |
| | | goodsTableData, goodsForm, actualForm, selectionList2,isCustoms,isLoad,open5,open6,open7,zxhdjSingle |
| | | } = toRefs(data); |
| | | const option = ref({ |
| | | pageKey: 'TmsDispatchOrder', |
| | |
| | | searchSpan: 6, |
| | | searchLabelWidth: 150, |
| | | menuWidth: 300, |
| | | height: 530, |
| | | group: [ |
| | | { |
| | | label: '基本信息', |
| | | prop: 'jbxx', |
| | | column: { |
| | | projectId: { |
| | | label: '关联项目', |
| | | |
| | | quoteDetailId: { |
| | | label: '运输线路', span: 24, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "关联项目不能为空", trigger: "change" |
| | | message: "请选择运输路线", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('projectId')?.$refs?.temp; |
| | | const table = crudRef.value?.getPropRef?.('quoteDetailId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | projectId: active.id, |
| | | quoteDetailId: active.quoteDetailId, |
| | | transportLine: active.transportRoute, |
| | | startRegionCode: active.startRegionCode, |
| | | endRegionCode: active.endRegionCode, |
| | | projectId: active.projectId, |
| | | projectName: active.projectName, |
| | | customerId: active.relatedCustomerId, |
| | | customerName: active.relatedCustomerName, |
| | | customerCode: active.relatedCustomerCode, |
| | | contractId: active.relatedContractId, |
| | | contractName: active.relatedContractName, |
| | | customerId: active.customerId, |
| | | customerName: active.customerFullName, |
| | | customerCode: active.customerCode, |
| | | contractId: active.contractId, |
| | | contractName: active.contractName, |
| | | requiredVehicleTypes: active.vehicleType, |
| | | quotePlanId: active.quotePlanId, |
| | | }); |
| | | form.value.shipperId = undefined; |
| | | form.value.shipperRegionLabel = undefined; |
| | | form.value.shipperAddress = undefined; |
| | | form.value.shipperMobile = undefined; |
| | | form.value.receiverId = undefined; |
| | | form.value.receiverAddress = undefined; |
| | | form.value.receiverMobile = undefined; |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | transportRoute: { |
| | | label: '运输路线', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | customerFullName: { |
| | | label: '客户全称', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | projectName: { |
| | | label: '项目名称', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | projectCode: { |
| | | label: '项目编号', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | relatedContractName: { |
| | | label: '关联合同', |
| | | label: '关联项目', |
| | | display: false, minWidth: 150, |
| | | search: true, |
| | | }, |
| | | |
| | | relatedCustomerName: { |
| | | label: '关联客户', |
| | | contractName: { |
| | | label: '关联合同', |
| | | display: false, minWidth: 150, |
| | | search: true, |
| | | }, |
| | | status: { |
| | | label: '状态', dataType: 'string', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/data_status', |
| | | addDisplay: false, minWidth: 150, |
| | | editDisplay: false, |
| | | viewDisplay: true, |
| | | vehicleType: { |
| | | label: '车型', dataType: 'string', |
| | | type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', minWidth: 150, |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "状态不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'projectName', |
| | | value: 'id' |
| | | label: 'transportRoute', |
| | | value: 'quoteDetailId' |
| | | }, |
| | | onLoad: ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsProject(id).then(res => { |
| | | getTransportRouteVi(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsProject({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 || [], |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | customerName: { |
| | | label: '客户名称', |
| | | display: true, disabled: true |
| | | }, |
| | | projectName: { |
| | | label: '关联项目', |
| | | display: true, disabled: true |
| | | }, |
| | | // customerCode: { |
| | |
| | | // display: true,disabled:true |
| | | // }, |
| | | contractName: { |
| | | label: '关联合同名称', |
| | | label: '关联合同', |
| | | 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" |
| | | } |
| | | ], |
| | | }, |
| | | orderType: { |
| | | label: '订单类型', |
| | | display: true, |
| | |
| | | message: "订单类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | 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) => { |
| | | cItem.required = !(value == 1); |
| | | }); |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | signType: { |
| | | label: '签收类型', |
| | | // signType: { |
| | | // label: '签收类型', |
| | | // display: true, |
| | | // type: 'select', dataType: 'string', |
| | | // dicUrl: '/system/dict/data/type/sign_type', |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "签收类型不能为空", trigger: "change" |
| | | // } |
| | | // ], |
| | | // }, |
| | | |
| | | // loadingServiceProviderId: { |
| | | // label: '装货服务商', |
| | | // display: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "装货服务商不能为空", trigger: "change" |
| | | // } |
| | | // ], |
| | | // change: (val: any) => { |
| | | // const table = crudRef.value?.getPropRef?.('loadingServiceProviderId')?.$refs?.temp; |
| | | // if (!table) return; |
| | | // let active = table.active; |
| | | // if (Array.isArray(active)) active = active[0]; |
| | | // if (active) { |
| | | // Object.assign(form.value, { |
| | | // loadingServiceProviderId: active.id, |
| | | // loadingServiceProviderName: active.serviceShortName, |
| | | // }); |
| | | // } |
| | | // }, |
| | | // type: 'table', suffixIcon: 'search', |
| | | // children: { |
| | | // border: true, |
| | | // searchLabelWidth: 100, |
| | | // searchMenuSpan: 5, |
| | | // column: { |
| | | // serviceCode: { |
| | | // label: '服务商编码', minWidth: 130, |
| | | // search: true, |
| | | // }, |
| | | // serviceShortName: { |
| | | // label: '服务商简称', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // serviceType: { |
| | | // label: '服务类型', multiple: true, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | // minWidth: 150, |
| | | // }, |
| | | // contactName: { |
| | | // label: '联系人姓名', minWidth: 120, |
| | | // }, |
| | | // }, |
| | | // |
| | | // }, |
| | | // props: { |
| | | // label: 'serviceShortName', |
| | | // 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] |
| | | // } |
| | | // getTmsLoadingServiceProvider(id).then(res => { |
| | | // return callback(res.data || {}) |
| | | // }) |
| | | // } else { |
| | | // listTmsLoadingServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | // return callback({ |
| | | // total: res.total, |
| | | // data: res.rows || [], |
| | | // }) |
| | | // }) |
| | | // } |
| | | // |
| | | // } |
| | | // |
| | | // }, |
| | | // customsServiceProviderId: { |
| | | // label: '报关服务商', |
| | | // display: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "报关服务商不能为空", trigger: "change" |
| | | // } |
| | | // ], |
| | | // change: (val: any) => { |
| | | // const table = crudRef.value?.getPropRef?.('customsServiceProviderId')?.$refs?.temp; |
| | | // if (!table) return; |
| | | // let active = table.active; |
| | | // if (Array.isArray(active)) active = active[0]; |
| | | // if (active) { |
| | | // Object.assign(form.value, { |
| | | // customsServiceProviderId: active.id, |
| | | // customsServiceProviderName: active.serviceShortName, |
| | | // }); |
| | | // } |
| | | // }, |
| | | // type: 'table', suffixIcon: 'search', |
| | | // children: { |
| | | // border: true, |
| | | // searchLabelWidth: 100, |
| | | // searchMenuSpan: 5, |
| | | // column: { |
| | | // serviceCode: { |
| | | // label: '服务商编码', minWidth: 130, |
| | | // search: true, |
| | | // }, |
| | | // serviceShortName: { |
| | | // label: '服务商简称', minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // serviceType: { |
| | | // label: '服务类型', multiple: true, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | // minWidth: 150, |
| | | // }, |
| | | // contactName: { |
| | | // label: '联系人姓名', minWidth: 120, |
| | | // }, |
| | | // }, |
| | | // |
| | | // }, |
| | | // props: { |
| | | // label: 'serviceShortName', |
| | | // 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] |
| | | // } |
| | | // getTmsCustomsServiceProvider(id).then(res => { |
| | | // return callback(res.data || {}) |
| | | // }) |
| | | // } else { |
| | | // listTmsCustomsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | // return callback({ |
| | | // total: res.total, |
| | | // data: res.rows || [], |
| | | // }) |
| | | // }) |
| | | // } |
| | | // |
| | | // } |
| | | // }, |
| | | isCustoms: { |
| | | label: '委托报关', |
| | | display: true, |
| | | type: 'select', dataType: 'string', |
| | | dicUrl: '/system/dict/data/type/sign_type', |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "签收类型不能为空", trigger: "change" |
| | | message: "委托报关不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | isLoad: { |
| | | label: '委托装卸', |
| | | display: true, |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "委托装卸不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | isUrgent: { |
| | | label: '是否紧急',value: '1', |
| | | display: true, |
| | | type: 'radio', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否紧急不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | // transportType: { |
| | | // label: '运输方式', |
| | | // display: true, type: 'select', dicUrl: '/system/dict/data/type/dispatch_transport_mode', dataType: 'string', |
| | | // |
| | | // }, |
| | | // loadMethod: { |
| | | // label: '配载方式', |
| | | // display: true, type: 'select', dicUrl: '/system/dict/data/type/load_method', dataType: 'string', |
| | | // }, |
| | | orderTime: { |
| | | label: '下单时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "下单时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | latestDeparture: { |
| | | label: '要求最晚出发时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', labelWidth: 150, |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "要求最晚出发时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | latestArrival: { |
| | | label: '要求最晚到达时间', labelWidth: 150, |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "要求最晚到达时间不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | |
| | | |
| | | } |
| | | }, |
| | | { |
| | | label: '派车信息', |
| | | prop: 'pcxx', |
| | | column: { |
| | | operationMode: { |
| | | label: '是否是自营车队', value: 0, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否是自营车队不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: ({value}: any) => { |
| | | console.log(value) |
| | | option.value.group.forEach((item: any) => { |
| | | if (item.prop == 'pcxx') { |
| | | item.column.commissionModel.display = value != 1; |
| | | item.column.containerId.display = value != 1; |
| | | item.column.shelfId.display = value != 1; |
| | | item.column.vehicleProviderId.display = value == 1; |
| | | item.column.containerNo.display = value == 1; |
| | | item.column.shelfCode.display = value == 1; |
| | | // item.column.vehicleProviderId.rules.forEach((cItem: any) => { |
| | | // cItem.required = value == 1; |
| | | // }); |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | }, |
| | | commissionModel:{ |
| | | label: '提成模式', |
| | | display: true, type: 'radio', dicUrl: '/system/dict/data/type/commission_model', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "提成模式不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | } |
| | | |
| | | }, |
| | | loadingServiceProviderId: { |
| | | label: '装货服务商', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "装货服务商不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('loadingServiceProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | loadingServiceProviderId: active.id, |
| | | loadingServiceProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | serviceCode: { |
| | | label: '服务商编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型', multiple: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | minWidth: 150, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 120, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'serviceShortName', |
| | | 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] |
| | | } |
| | | getTmsLoadingServiceProvider(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsLoadingServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | customsServiceProviderId: { |
| | | label: '报关服务商', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "报关服务商不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('customsServiceProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | customsServiceProviderId: active.id, |
| | | customsServiceProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | serviceCode: { |
| | | label: '服务商编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称', minWidth: 120, |
| | | search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型', multiple: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | minWidth: 150, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 120, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'serviceShortName', |
| | | 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] |
| | | } |
| | | getTmsCustomsServiceProvider(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsCustomsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | isUrgent: { |
| | | label: '是否紧急', |
| | | display: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否紧急不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | transportType: { |
| | | label: '运输方式', |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/dispatch_transport_mode', dataType: 'string', |
| | | |
| | | }, |
| | | loadMethod: { |
| | | label: '配载方式', |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/load_method', dataType: 'string', |
| | | }, |
| | | mainDriverId: { |
| | | label: '主驾驶员', |
| | | display: true,dataType: 'string', |
| | | display: true, dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | licenseType: { |
| | | label: '准驾车型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type', |
| | | search: true,multiple:true, |
| | | search: true, multiple: true, |
| | | }, |
| | | }, |
| | | |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsDriver({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, ...data, |
| | | carrierType: form.value.operationMode,vehicleProviderId:form.value.vehicleProviderId |
| | | }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | }, |
| | | assistantDriverId: { |
| | | label: '副驾驶员', |
| | | display: true,dataType: 'string', |
| | | display: true, dataType: 'string', |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('assistantDriverId')?.$refs?.temp; |
| | | if (!table) return; |
| | |
| | | search: true, |
| | | }, |
| | | licenseType: { |
| | | label: '准驾车型', minWidth: 120,multiple:true, |
| | | label: '准驾车型', minWidth: 120, multiple: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type', |
| | | search: true, |
| | | }, |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsDriver({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | listTmsDriver({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, ...data,vehicleProviderId:form.value.vehicleProviderId, |
| | | carrierType: form.value.operationMode |
| | | }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | |
| | | } |
| | | |
| | | }, |
| | | requiredVehicleTypes: { |
| | | label: '要求车型', |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "要求车型不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | actualVehicleType: { |
| | | label: '实际运输工具类型', |
| | | display: true, type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | }, |
| | | vehicleId: { |
| | | label: '车牌号',dataType: 'string', |
| | | label: '车牌号', dataType: 'string', |
| | | display: true, |
| | | rules: [ |
| | | { |
| | |
| | | Object.assign(form.value, { |
| | | vehicleId: active.id, |
| | | licensePlate: active.licensePlate, |
| | | actualVehicleType: active.vehicleType, |
| | | }); |
| | | } |
| | | }, |
| | |
| | | }, |
| | | vehicleType: { |
| | | label: '车辆类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/vehicle_type', |
| | | |
| | | search: true, |
| | | }, |
| | | internalCode: { |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsVehicle({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | 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', |
| | | }, |
| | | shipperId: { |
| | | label: '装货点', dataType: 'string', |
| | | display: true, |
| | | |
| | | rules: [ |
| | | { |
| | | required: false, |
| | | 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', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "卸货点不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | receiverRegionLabel: { |
| | | label: '卸货点行政区域', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverAddress: { |
| | | label: '卸货点详细地址', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverMobile: { |
| | | label: '卸货点联系方式', |
| | | display: true, disabled: true |
| | | }, |
| | | containerNo: { |
| | | label: '集装箱号', |
| | | display: false, |
| | | }, |
| | | containerId: { |
| | | label: '关联集装箱信息', |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | containerUseType: { |
| | | label: '集装箱用途类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/container_use_type', |
| | | search: true, |
| | | }, |
| | | selfLeasType: { |
| | | label: '自租类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type', |
| | | search: true, |
| | | }, |
| | | containerSize: { |
| | |
| | | } |
| | | |
| | | }, |
| | | shelfCode: { |
| | | label: '托板号', |
| | | display: false, |
| | | }, |
| | | shelfId: { |
| | | label: '托板号', |
| | | display: true, |
| | |
| | | }); |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | search: true, |
| | | }, |
| | | shelfType: { |
| | | label: '托架类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/shelf_type', |
| | | search: true, |
| | | }, |
| | | selfLeasType: { |
| | | label: '自租类型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/self_leas_type', |
| | | search: true, |
| | | }, |
| | | compatibleContainerType: { |
| | |
| | | } |
| | | |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '收发货人信息', |
| | | prop: 'shffxrxx', |
| | | column: { |
| | | shipperId: { |
| | | label: '发货人',dataType:'string', |
| | | display: true, |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('shipperId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | 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(form.value, { |
| | | shipperId: active.id, |
| | | shipperName: active.consignorName, |
| | | shipperRegionLabel: active.regionLabel, |
| | | shipperAddress: active.addressDetail, |
| | | shipperMobile: active.contactPhone, |
| | | shipperRegionCode:shipperRegionCode |
| | | }); |
| | | form.value.transportLine = form.value.shipperRegionLabel |
| | | + (form.value.receiverRegionLabel ? '>' + form.value.receiverRegionLabel : ''); |
| | | } |
| | | }, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "发货人不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | consignorCode: { |
| | | label: '收发货人编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorName: { |
| | | label: '收发货人名称', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorType: { |
| | | label: '收发货人类型', minWidth: 80, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type', |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactPhone: { |
| | | label: '联系人电话', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | regionLabel: { |
| | | label: '行政区域', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'consignorName', |
| | | 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] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | shipperRegionLabel: { |
| | | label: '发货人行政区域', |
| | | display: true, disabled: true |
| | | |
| | | }, |
| | | shipperAddress: { |
| | | label: '发货人详细地址', |
| | | display: true, disabled: true |
| | | }, |
| | | shipperMobile: { |
| | | label: '发货人联系方式', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverId: { |
| | | label: '收货人', |
| | | display: true, dataType:'string', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "收货人不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | change: (val: any) => { |
| | | const table = crudRef.value?.getPropRef?.('receiverId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | 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(form.value, { |
| | | receiverId: active.id, |
| | | receiverName: active.consignorName, |
| | | receiverRegionLabel: active.regionLabel, |
| | | receiverAddress: active.addressDetail, |
| | | receiverMobile: active.contactPhone, |
| | | receiverRegionCode:receiverRegionCode, |
| | | }); |
| | | form.value.transportLine = |
| | | (form.value.shipperRegionLabel ? form.value.shipperRegionLabel + '>' : '') + form.value.receiverRegionLabel; |
| | | |
| | | } |
| | | }, |
| | | type: 'table', suffixIcon: 'search', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | consignorCode: { |
| | | label: '收发货人编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorName: { |
| | | label: '收发货人名称', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorType: { |
| | | label: '收发货人类型', minWidth: 80, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type', |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactPhone: { |
| | | label: '联系人电话', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | regionLabel: { |
| | | label: '行政区域', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | }, |
| | | |
| | | }, |
| | | props: { |
| | | label: 'consignorName', |
| | | 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] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsConsignor({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | }, |
| | | receiverRegionLabel: { |
| | | label: '收货人行政区域', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverAddress: { |
| | | label: '收货人详细地址', |
| | | display: true, disabled: true |
| | | }, |
| | | receiverMobile: { |
| | | label: '收货人联系方式', |
| | | display: true, disabled: true |
| | | }, |
| | | transportLine: { |
| | | label: '运输线路', span: 24, |
| | | display: true, disabled: true |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '运输要求信息', |
| | | prop: 'ysyqxx', |
| | | column: { |
| | | earliestDeparture: { |
| | | label: '要求最早出发时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | }, |
| | | latestDeparture: { |
| | | label: '要求最晚出发时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | }, |
| | | earliestArrival: { |
| | | label: '要求最早到达时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | }, |
| | | latestArrival: { |
| | | label: '要求最晚到达时间', |
| | | type: 'datetime', // 改为 datetime 类型 |
| | | format: 'YYYY-MM-DD HH:mm:ss', |
| | | valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | display: true, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '车辆信息', |
| | | prop: 'clxx', |
| | | column: { |
| | | emptyMileage: { |
| | | label: '空载里程', append: 'Km', |
| | | display: true, |
| | | }, |
| | | emptyFuel: { |
| | | label: '空载油耗', append: 'L', |
| | | display: true, |
| | | }, |
| | | loadedMileage: { |
| | | label: '重载里程', append: 'Km', |
| | | display: true, |
| | | }, |
| | | loadedFuel: { |
| | | label: '重载油耗', append: 'L', |
| | | display: true, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '其他信息', |
| | | prop: 'qtyxx', |
| | | column: { |
| | | shiftNo: { |
| | | label: '班次号', |
| | | display: true, |
| | | }, |
| | | lineNo: { |
| | | label: '线路号', |
| | | display: true, |
| | | }, |
| | | remark: { |
| | | label: '备注', span: 24, |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | display: true, |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | |
| | | // { |
| | | // label: '运输要求信息', |
| | | // prop: 'ysyqxx', |
| | | // column: { |
| | | // earliestDeparture: { |
| | | // label: '要求最早出发时间', |
| | | // type: 'datetime', // 改为 datetime 类型 |
| | | // format: 'YYYY-MM-DD HH:mm:ss', |
| | | // valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | // display: true, |
| | | // }, |
| | | // latestDeparture: { |
| | | // label: '要求最晚出发时间', |
| | | // type: 'datetime', // 改为 datetime 类型 |
| | | // format: 'YYYY-MM-DD HH:mm:ss', |
| | | // valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | // display: true, |
| | | // }, |
| | | // earliestArrival: { |
| | | // label: '要求最早到达时间', |
| | | // type: 'datetime', // 改为 datetime 类型 |
| | | // format: 'YYYY-MM-DD HH:mm:ss', |
| | | // valueFormat: 'YYYY-MM-DD HH:mm:ss', |
| | | // display: true, |
| | | // }, |
| | | // |
| | | // } |
| | | // }, |
| | | // { |
| | | // label: '车辆信息', |
| | | // prop: 'clxx', |
| | | // column: { |
| | | // emptyMileage: { |
| | | // label: '空载里程', append: 'Km', |
| | | // display: true, |
| | | // }, |
| | | // emptyFuel: { |
| | | // label: '空载油耗', append: 'L', |
| | | // display: true, |
| | | // }, |
| | | // loadedMileage: { |
| | | // label: '重载里程', append: 'Km', |
| | | // display: true, |
| | | // }, |
| | | // loadedFuel: { |
| | | // label: '重载油耗', append: 'L', |
| | | // display: true, |
| | | // }, |
| | | // } |
| | | // }, |
| | | // { |
| | | // label: '其他信息', |
| | | // prop: 'qtyxx', |
| | | // column: { |
| | | // shiftNo: { |
| | | // label: '班次号', |
| | | // display: true, |
| | | // }, |
| | | // lineNo: { |
| | | // label: '线路号', |
| | | // display: true, |
| | | // }, |
| | | // remark: { |
| | | // label: '备注', span: 24, |
| | | // type: 'textarea', minRows: 3, maxRows: 5, |
| | | // display: true, |
| | | // }, |
| | | // } |
| | | // } |
| | | ], |
| | | column: { |
| | | |
| | |
| | | type: 'select', dataType: 'string', |
| | | dicUrl: '/system/dict/data/type/order_type', |
| | | }, |
| | | signType: { |
| | | label: '订单类型', |
| | | display: false, |
| | | search: true, minWidth: 120, |
| | | type: 'select', dataType: 'string', |
| | | dicUrl: '/system/dict/data/type/order_type', |
| | | }, |
| | | // signType: { |
| | | // label: '订单类型', |
| | | // display: false, |
| | | // search: true, minWidth: 120, |
| | | // type: 'select', dataType: 'string', |
| | | // dicUrl: '/system/dict/data/type/order_type', |
| | | // }, |
| | | |
| | | transportLine: { |
| | | label: '运输线路', |
| | |
| | | search: true, |
| | | }, |
| | | isUrgent: { |
| | | label: '是否紧急否', |
| | | label: '是否紧急', |
| | | display: false, minWidth: 100, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | iscc: { |
| | | label: '是否查车', |
| | | display: false, minWidth: 100, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | isfk: { |
| | | label: '是否放空', |
| | | display: false, minWidth: 100, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | | |
| | | }, |
| | | isPrint: { |
| | | label: '是否打印承运单', |
| | | display: false, minWidth: 100, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/sys_number_is', dataType: 'string', |
| | |
| | | // display: false, |
| | | // search: true, |
| | | // }, |
| | | requiredVehicleTypes: { |
| | | label: '下单车型',minWidth: 130, |
| | | display: false, type: 'select', search: true, |
| | | dicUrl: '/system/dict/data/type/vehicle_type', |
| | | dataType: 'string', |
| | | |
| | | }, |
| | | actualVehicleType: { |
| | | label: '实际运输工具类型', minWidth: 130, |
| | | label: '派出车型', minWidth: 130, |
| | | display: false, |
| | | search: true, |
| | | type: 'select', dicUrl: '/system/dict/data/type/license_type', dataType: 'string', |
| | | type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | shipperName: { |
| | | label: '发货人名称', |
| | | label: '装货点名称', |
| | | display: false, minWidth: 120, |
| | | search: true, |
| | | }, |
| | | receiverName: { |
| | | label: '收货人名称', minWidth: 120, |
| | | label: '卸货点名称', minWidth: 120, |
| | | display: false, |
| | | search: true, |
| | | }, |
| | | accountsReceivableStatus: { |
| | | label: '应收费用生成状态', minWidth: 160, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status', |
| | | |
| | | }, |
| | | accountsPayableStatus: { |
| | | label: '应付费用生成状态', minWidth: 160, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status', |
| | | |
| | | }, |
| | | // accountsReceivableStatus: { |
| | | // label: '应收费用生成状态', minWidth: 160, |
| | | // display: false, |
| | | // hide: false, |
| | | // search: true, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status', |
| | | // |
| | | // }, |
| | | // accountsPayableStatus: { |
| | | // label: '应付费用生成状态', minWidth: 160, |
| | | // display: false, |
| | | // hide: false, |
| | | // search: true, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/accounts_status', |
| | | // |
| | | // }, |
| | | |
| | | status: { |
| | | label: '状态', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', |
| | | display: false, |
| | | hide: false, fixed: 'right', |
| | | search: true, |
| | | search: false, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | } |
| | | ], |
| | | }, |
| | | inStatusList: { |
| | | label: '状态', minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/tms_dispatch_order_status', |
| | | display: false,multiple:true, |
| | | hide: true, |
| | | search: true, |
| | | |
| | | }, |
| | | confirmTime: { |
| | | label: '确认时间', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | orderTime: { |
| | | label: '下单时间', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | createBy: { |
| | | label: '创建人', minWidth: 150, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | createTime: { |
| | | label: '创建时间', minWidth: 180, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | createTimeRange: { |
| | | label: '创建时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | updateBy: { |
| | | label: '更新人', minWidth: 150, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | viewDisplay: false, |
| | | hide: false, |
| | | search: false, |
| | | search: true, |
| | | }, |
| | | updateTime: { |
| | | label: '更新时间', minWidth: 180, |
| | |
| | | hide: false, |
| | | search: false, |
| | | }, |
| | | |
| | | updateTimeRange: { |
| | | label: '更新时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | confirmTimeRange: { |
| | | label: '确认时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | okTimeRange: { |
| | | label: '完成时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | orderTimeRange: { |
| | | label: '下单时间', display: false, search: true, searchRange: true, type: 'date', |
| | | format: 'YYYY-MM-DD', hide: true, searchSpan: 5, |
| | | valueFormat: 'YYYY-MM-DD', |
| | | }, |
| | | |
| | | } |
| | | }) |
| | |
| | | tripType: { |
| | | label: '行程类型', |
| | | display: true, |
| | | change: function ({value}: any) { |
| | | if (value == '5'){ |
| | | itineraryOption.value.column.iscc.display = true |
| | | } |
| | | }, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/trip_type', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "行程类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | iscc: { |
| | | label: '是否查车', |
| | | display: false, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/sys_number_is', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "是否查车不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | |
| | | voucherUrl: { |
| | | label: '行程凭证', |
| | | display: true, |
| | | span: 24, |
| | | accept:'string',dataType: 'string', |
| | | span: 24, dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | propsHttp:{ |
| | | home:'url', |
| | | name:'newFileName', |
| | | }, |
| | | |
| | | }, |
| | | dataSource: { |
| | | label: '数据来源', |
| | |
| | | display: true, |
| | | }, |
| | | voucherUrl: { |
| | | label: '行程凭证', |
| | | label: '凭证', |
| | | display: true, |
| | | span: 24, |
| | | accept:'string',dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | propsHttp:{ |
| | | home:'url', |
| | | name:'newFileName', |
| | | }, |
| | | span: 24, dataType: 'string', |
| | | type: 'img', |
| | | |
| | | }, |
| | | |
| | | } |
| | |
| | | } |
| | | ], |
| | | }, |
| | | voucherUrl: { |
| | | label: '行程凭证', |
| | | currency:{ |
| | | label: '币种', |
| | | display: true, |
| | | span: 24, |
| | | accept:'string',dataType: 'string', |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "币种不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | |
| | | }, |
| | | voucherUrl: { |
| | | label: '费用凭证', |
| | | display: true, |
| | | accept: 'string', dataType: 'string', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | propsHttp:{ |
| | | home:'url', |
| | | name:'newFileName', |
| | | }, |
| | | |
| | | }, |
| | | remark:{ |
| | | label: '备注', |
| | | type: 'textarea', minRows: 3, maxRows: 5, span: 24 |
| | | }, |
| | | dataSource: { |
| | | label: '数据来源', |
| | |
| | | label: '金额', |
| | | display: true, |
| | | }, |
| | | currency:{ |
| | | label: '币种', |
| | | display: true, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/sys_currency', |
| | | }, |
| | | feeVoucherUrl: { |
| | | label: '费用凭证', |
| | | display: true, |
| | | span: 24, |
| | | accept:'string',dataType: 'string', |
| | | accept: 'string', dataType: 'object', |
| | | type: 'upload', |
| | | action: '/common/upload2', |
| | | propsHttp:{ |
| | | home:'url', |
| | | name:'newFileName', |
| | | }, |
| | | }, |
| | | remark:{ |
| | | label: '备注', |
| | | }, |
| | | |
| | | } |
| | |
| | | display: false, |
| | | }, |
| | | shipperName: { |
| | | label: '发货人名称', |
| | | label: '装货点名称', |
| | | display: false, minWidth: 120, |
| | | }, |
| | | receiverName: { |
| | | label: '收货人名称', minWidth: 120, |
| | | label: '卸货点名称', minWidth: 120, |
| | | display: false, |
| | | }, |
| | | transportLine: { |
| | | label: '运输线路', |
| | | display: false,minWidth: 180, overHidden: true |
| | | display: false, minWidth: 180, overHidden: true |
| | | }, |
| | | actualVehicleType: { |
| | | label: '车型', minWidth: 130, |
| | | display: false, |
| | | type: 'select', dicUrl: '/system/dict/data/type/license_type', dataType: 'string', |
| | | type: 'select', dicUrl: '/system/dict/data/type/vehicle_type', dataType: 'string', |
| | | |
| | | }, |
| | | licensePlate: { |
| | |
| | | message: "接挂车辆号码不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | message: "接挂司机不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchMenuSpan: 5, |
| | |
| | | licenseType: { |
| | | label: '准驾车型', minWidth: 120, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/license_type', |
| | | search: true,multiple:true, |
| | | search: true, multiple: true, |
| | | }, |
| | | }, |
| | | |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | const customsOption = ref({ |
| | | menuBtn: false, |
| | | labelWidth: 120, |
| | | column: { |
| | | customsServiceProviderId: { |
| | | label: '报关服务商', span:24, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "报关服务商不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | change: (val: any) => { |
| | | const table = boxFormRef.value?.getPropRef?.('customsServiceProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | customsServiceProviderId: active.id, |
| | | customsServiceProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }, |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column:{ |
| | | serviceCode: { |
| | | label: '服务商编码', |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称',minWidth:150, |
| | | search: true, |
| | | }, |
| | | serviceName: { |
| | | label: '服务商全称',search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型',minWidth:150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | multiple:true, |
| | | search: true, |
| | | }, |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'serviceShortName', |
| | | 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] |
| | | } |
| | | getTmsCustomsServiceProvider(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsCustomsServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | |
| | | const loadingOption = ref({ |
| | | menuBtn: false, |
| | | labelWidth: 120, |
| | | column: { |
| | | loadingServiceProviderId: { |
| | | label: '装卸服务商',span:24, |
| | | display: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "装卸服务商不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | change: (val: any) => { |
| | | const table = boxFormRef.value?.getPropRef?.('loadingServiceProviderId')?.$refs?.temp; |
| | | if (!table) return; |
| | | let active = table.active; |
| | | if (Array.isArray(active)) active = active[0]; |
| | | if (active) { |
| | | Object.assign(form.value, { |
| | | loadingServiceProviderId: active.id, |
| | | loadingServiceProviderName: active.serviceShortName, |
| | | }); |
| | | } |
| | | }, |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column:{ |
| | | serviceCode: { |
| | | label: '服务商编码', |
| | | search: true, |
| | | }, |
| | | serviceShortName: { |
| | | label: '服务商简称',minWidth:150, |
| | | search: true, |
| | | }, |
| | | serviceName: { |
| | | label: '服务商全称',search: true, |
| | | }, |
| | | serviceType: { |
| | | label: '服务类型',minWidth:150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/service_type', |
| | | multiple:true, |
| | | search: true, |
| | | }, |
| | | } |
| | | }, |
| | | props: { |
| | | label: 'serviceShortName', |
| | | 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] |
| | | } |
| | | getTmsLoadingServiceProvider(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsLoadingServiceProvider({pageSize: page.pageSize, pageNum: page.currentPage, ...data}).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | | data: res.rows || [], |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | |
| | | const closeOption = ref({ |
| | | menuBtn: false, |
| | | labelWidth: 120, |
| | | column: { |
| | | closeWhy:{ |
| | | label: '作废原因',span:24, |
| | | type: 'radio', dataType: 'string', dicUrl: '/system/dict/data/type/close_why', |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "作废原因不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | closeWhyRemark:{ |
| | | label: '作废原因说明', |
| | | type: 'textarea', |
| | | span:24, |
| | | }, |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | const goodsTableOption = ref({ |
| | | pageKey: 'TmsGoodsDetail', |
| | | rowKey: 'id', |
| | |
| | | viewBtn: false, |
| | | column: { |
| | | productId: { |
| | | label: '货品名称',hide:true, |
| | | display: true,minWidth: 120, type: 'table', suffixIcon: 'search',dataType: 'string', |
| | | label: '货品名称', hide: true, |
| | | display: true, minWidth: 120, type: 'table', suffixIcon: 'search', dataType: 'string', |
| | | children: { |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | listTmsProductInfo({pageSize: page.pageSize, |
| | | listTmsProductInfo({ |
| | | pageSize: page.pageSize, |
| | | pageNum: page.currentPage, |
| | | ...data, |
| | | customerId:form.value.customerId |
| | | // customerId:form.value.customerId |
| | | }).then(res => { |
| | | return callback({ |
| | | total: res.total, |
| | |
| | | packUnit: active.packUnit, |
| | | }); |
| | | |
| | | goodsForm.value.sumWeight = active.grossWeight|| 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumNetWeight = active.netWeight || 0* goodsForm.value.quantity; |
| | | goodsForm.value.sumVolume = active.volume|| 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumWeight = active.grossWeight || 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumNetWeight = active.netWeight || 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumVolume = active.volume || 0 * goodsForm.value.quantity; |
| | | |
| | | } |
| | | }, |
| | | }, |
| | | productName: { |
| | | label: '货品名称',minWidth: 120, |
| | | display :false, |
| | | label: '货品名称', minWidth: 120, |
| | | display: false, |
| | | hide: false, |
| | | }, |
| | | quantity: { |
| | | label: '数量', |
| | | addDisplay :true,minWidth: 100, |
| | | editDisplay :true, |
| | | viewDisplay :true, |
| | | addDisplay: true, minWidth: 100, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | value: 1, |
| | | change:()=>{ |
| | | change: () => { |
| | | goodsForm.value.sumWeight = goodsForm.value.grossWeight || 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumNetWeight = goodsForm.value.netWeight || 0* goodsForm.value.quantity; |
| | | goodsForm.value.sumNetWeight = goodsForm.value.netWeight || 0 * goodsForm.value.quantity; |
| | | goodsForm.value.sumVolume = goodsForm.value.volume || 0 * goodsForm.value.quantity; |
| | | } |
| | | }, |
| | | sumWeight: { |
| | | label: '重量(kg)', |
| | | addDisplay :true,minWidth: 100,append: 'Kg', |
| | | editDisplay :true, |
| | | viewDisplay :true, |
| | | addDisplay: true, minWidth: 100, append: 'Kg', |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | }, |
| | | sumNetWeight: { |
| | | label: '净重(kg)', |
| | | addDisplay :true, |
| | | editDisplay :true,minWidth: 100,append: 'Kg', |
| | | viewDisplay :true, |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 100, append: 'Kg', |
| | | viewDisplay: true, |
| | | }, |
| | | sumVolume: { |
| | | label: '体积(m³)', |
| | | addDisplay :true, |
| | | editDisplay :true,minWidth: 100,append: 'm³', |
| | | viewDisplay :true, |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 100, append: 'm³', |
| | | viewDisplay: true, |
| | | }, |
| | | |
| | | |
| | | loosePieces: { |
| | | label: '散件数', |
| | | addDisplay :true, |
| | | editDisplay :true,minWidth: 100, |
| | | viewDisplay :true, |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 100, |
| | | viewDisplay: true, |
| | | }, |
| | | |
| | | fullContainers: { |
| | | label: '整箱数', |
| | | addDisplay :true, |
| | | editDisplay :true,minWidth: 100, |
| | | viewDisplay :true, |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 100, |
| | | viewDisplay: true, |
| | | }, |
| | | containerNo: { |
| | | label: '集装箱号', |
| | | addDisplay :true, |
| | | editDisplay :true,minWidth: 100, |
| | | viewDisplay :true, |
| | | addDisplay: true, |
| | | editDisplay: true, minWidth: 100, |
| | | viewDisplay: true, |
| | | }, |
| | | palletCount: { |
| | | label: '托数', |
| | | addDisplay :true,minWidth: 100, |
| | | editDisplay :true, |
| | | viewDisplay :true, |
| | | addDisplay: true, minWidth: 100, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | } |
| | | }}) |
| | | } |
| | | }) |
| | | |
| | | const actualFormOption = ref({ |
| | | menuBtn: false, labelWidth: 140, |
| | | column:{ |
| | | departureAddress:{ |
| | | menuBtn: false, labelWidth: 140, |
| | | column: { |
| | | departureAddress: { |
| | | label: '实际出发地地址', |
| | | span:24, |
| | | span: 24, |
| | | }, |
| | | destinationAddress:{ |
| | | destinationAddress: { |
| | | label: '实际目的地地址', |
| | | span:24, |
| | | span: 24, |
| | | }, |
| | | actualLoadStart: { |
| | | label: '实际装车开始时间', |
| | |
| | | display: true, |
| | | }, |
| | | actualQuantity: { |
| | | label: '实发数量',type: 'number', |
| | | label: '实发数量', type: 'number', |
| | | }, |
| | | actualWeight: { |
| | | label: '实发重量',type: 'number', |
| | | label: '实发重量', type: 'number', |
| | | }, |
| | | actualVolume: { |
| | | label: '实发体积',type: 'number', |
| | | label: '实发体积', type: 'number', |
| | | }, |
| | | reweighWeight: { |
| | | label: '复磅重量',type: 'number', |
| | | label: '复磅重量', type: 'number', |
| | | }, |
| | | electronicLock:{ |
| | | electronicLock: { |
| | | label: '电子锁', |
| | | } |
| | | } |
| | | }) |
| | | |
| | | |
| | | const itemsTableOption = ref({ |
| | | pageKey: 'itemsTable', |
| | | rowKey: 'rowKey', |
| | | header: false, |
| | | addBtn: false, menu: false, |
| | | column: { |
| | | feeType: { |
| | | label: '费用名称', |
| | | }, |
| | | unit: { |
| | | label: '*计量单位', |
| | | }, |
| | | price: { |
| | | label: '*计费金额', |
| | | }, |
| | | currency: { |
| | | label: '币制', |
| | | }, |
| | | count: { |
| | | label: '计费数量', minWidth: 130, |
| | | }, |
| | | sum: { |
| | | label: '总金额', |
| | | } |
| | | } |
| | | }) |
| | | |
| | | const consignorOption = ref({ |
| | | border: true, |
| | | searchLabelWidth: 100, |
| | | searchMenuSpan: 5, |
| | | column: { |
| | | consignorCode: { |
| | | label: '收装货点编码', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorName: { |
| | | label: '收装货点名称', minWidth: 130, |
| | | search: true, |
| | | }, |
| | | consignorType: { |
| | | label: '收装货点类型', minWidth: 80, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type', |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactName: { |
| | | label: '联系人姓名', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | contactPhone: { |
| | | label: '联系人电话', minWidth: 110, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | regionLabel: { |
| | | label: '行政区域', minWidth: 180, |
| | | display: false, |
| | | hide: false, |
| | | search: true, |
| | | }, |
| | | }, |
| | | }) |
| | | const consignorProps = ref({ |
| | | label: 'consignorName', |
| | | value: 'id' |
| | | }) |
| | | |
| | | |
| | | const itemsCrudRef = ref() |
| | | const itemsTableData = ref<any>([]) |
| | | |
| | | const tabsOption = ref({ |
| | | column: [ |
| | | { |
| | | label: '运输增值作业登记', |
| | | prop: 'tab1', |
| | | name: 'tab1', |
| | | value: '0', |
| | | |
| | | }, |
| | | { |
| | | label: '报关增值作业登记', |
| | | prop: 'tab2', |
| | | name: 'tab2', |
| | | value: '1', |
| | | }, |
| | | { |
| | | label: '装卸增值作业登记', |
| | | prop: 'tab3', |
| | | name: 'tab3', |
| | | value: '2', |
| | | |
| | | }, |
| | | { |
| | | label: '实报实销费用登记', |
| | | prop: 'tab4', |
| | | name: 'tab4', |
| | | value: '3', |
| | | } |
| | | ] |
| | | }) |
| | | const tabsOptionRef = ref(); |
| | | const active = ref('tab1'); |
| | | const open4 = ref(false); |
| | | const zzItemsTableOption = ref({ |
| | | pageKey: 'zzItemsTable', |
| | | rowKey: 'rowKey', |
| | | header: false, |
| | | menu: false, |
| | | selection: false, |
| | | column: { |
| | | freeName:{ |
| | | label: '费用名称', |
| | | }, |
| | | unit:{ |
| | | label: '计量单位', |
| | | }, |
| | | count:{ |
| | | label : '计费数量' |
| | | }, |
| | | remark:{ |
| | | label: '备注' |
| | | } |
| | | } |
| | | }); |
| | | const zzItemsTableData = ref(); |
| | | |
| | | |
| | | |
| | | |
| | | const { |
| | |
| | | }, |
| | | handleSelectionChangeFunc: (selection: any) => { |
| | | selectionList.value = selection; |
| | | if (selection.length > 0){ |
| | | isCustoms.value = selection[0].isCustoms; |
| | | 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; |
| | | 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; |
| | | }, |
| | | handleBeforeOpenFunc:(type:string)=>{ |
| | | if(type == 'add'){ |
| | | form.value = {}; |
| | | } |
| | | } |
| | | |
| | | }) |
| | | const handleConfirm = (row: any) => { |
| | | ElMessageBox.confirm("是否对调度单号" + row.dispatchNo + "确定 ?", '系统提示', { |
| | |
| | | } |
| | | |
| | | const submitForm = () => { |
| | | if (optionType.value === 'addItinerary'){ |
| | | if (optionType.value === 'addItinerary') { |
| | | if (Array.isArray(boxForm.value.voucherUrl)) { |
| | | boxForm.value.voucherUrl = boxForm.value.voucherUrl.toString(); |
| | | } |
| | |
| | | cancelBox(); |
| | | onLoad(page.value); |
| | | }) |
| | | }else if (optionType.value === 'addFinance'){ |
| | | } else if (optionType.value === 'addFinance') { |
| | | if (Array.isArray(boxForm.value.feeVoucherUrl)) { |
| | | boxForm.value.feeVoucherUrl = boxForm.value.feeVoucherUrl.toString(); |
| | | } |
| | | addTmsFinanceDetail(boxForm.value).then(res=>{ |
| | | let filter = selectionList2.value.filter((item: any) => { |
| | | return !item.count |
| | | }); |
| | | if (filter.length > 0) { |
| | | proxy.$modal.msgError("勾选报价费用请填写计费数量"); |
| | | return; |
| | | } |
| | | boxForm.value.items = selectionList2.value; |
| | | addTmsFinanceDetail(boxForm.value).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | |
| | | }) |
| | | } |
| | | |
| | | const handleAddFinance = (row:any)=>{ |
| | | const handleAddFinance = async (row: any) => { |
| | | optionType.value = 'addFinance'; |
| | | boxFormOption.value = financeOption.value; |
| | | boxTableOption.value = financeTableOption.value; |
| | | const quotePlanItemRes = await listTmsQuoteItem({quotePlanId: row.quotePlanId, pageNum: 1, pageSize: 999}); |
| | | let items = quotePlanItemRes.rows || []; |
| | | itemsTableData.value = items.map((item: any) => { |
| | | return { |
| | | rowKey: item.id, |
| | | feeType: item.freeName, |
| | | unit: item.unit, |
| | | price: item.price, |
| | | currency: item.currency, |
| | | count: 0, |
| | | sum: 0, |
| | | } |
| | | }) |
| | | |
| | | listTmsFinanceDetail({ |
| | | dispatchOrderId: row.id,financeType:2, |
| | | pageNum: 1, pageSize: 999}).then(res => { |
| | | dispatchOrderId: row.id, financeType: 2, |
| | | pageNum: 1, pageSize: 999 |
| | | }).then(res => { |
| | | |
| | | |
| | | boxTableData.value = res.rows || []; |
| | | pageF.open = true; |
| | | pageF.title = '费用登记'; |
| | | boxForm.value = { |
| | | dispatchOrderId: row.id, |
| | | dataSource: 0, |
| | | financeType:2, |
| | | financeType: 2, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const handleGenerate = () => { |
| | | let ids = selectionList.value.map((item:any) => item.id); |
| | | let ids = selectionList.value.map((item: any) => item.id); |
| | | initGenerate(ids).then(res => { |
| | | boxTableData.value = res.data|| []; |
| | | boxTableData.value = res.data || []; |
| | | optionType.value = 'generate'; |
| | | pageF.open = true; |
| | | pageF.title = '生成应收应付费用数据'; |
| | |
| | | |
| | | const submitGenerate = () => { |
| | | pageF.isUploading = true; |
| | | let ids = selectionList.value.map((item:any) => item.id); |
| | | let ids = selectionList.value.map((item: any) => item.id); |
| | | |
| | | generateTmsDispatchOrder(ids).then(res => { |
| | | pageF.isUploading = false; |
| | |
| | | }) |
| | | cancelBox(); |
| | | onLoad(page.value); |
| | | }).finally(()=>{ |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | } |
| | |
| | | * 甩挂 |
| | | */ |
| | | const handleDropHook = () => { |
| | | title.value = '调度单甩挂'; |
| | | title.value = '调度单甩挂'; |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | optionType.value = 'dropHook'; |
| | |
| | | }) |
| | | cancelBox2(); |
| | | onLoad(page.value); |
| | | }).finally(()=>{ |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else{ |
| | | connectHang({ |
| | | dispatchId:form.value.id, |
| | | vehicleId:form.value.vehicleId, |
| | | driverId:form.value.driverId |
| | | }else if (optionType.value === 'customs') { |
| | | customsOrder({id:form.value.id, |
| | | customsServiceProviderId: form.value.customsServiceProviderId, |
| | | customsServiceProviderName: form.value.customsServiceProviderName, |
| | | }).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | |
| | | }) |
| | | cancelBox2(); |
| | | onLoad(page.value); |
| | | }).finally(()=>{ |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else if (optionType.value === 'loading') { |
| | | loadingOrder({id:form.value.id, |
| | | loadingServiceProviderId: form.value.loadingServiceProviderId, |
| | | loadingServiceProviderName: form.value.loadingServiceProviderName, |
| | | }).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | | }) |
| | | cancelBox2(); |
| | | onLoad(page.value); |
| | | }).finally(() => { |
| | | pageF.isUploading = false; |
| | | }) |
| | | }else { |
| | | connectHang({ |
| | | dispatchId: form.value.id, |
| | | vehicleId: form.value.vehicleId, |
| | | driverId: form.value.driverId |
| | | }).then(res => { |
| | | ElMessage({ |
| | | message: "提交成功!", |
| | | type: 'success' |
| | | }) |
| | | cancelBox2(); |
| | | onLoad(page.value); |
| | | }).finally(() => { |
| | | pageF.isUploading = false |
| | | }) |
| | | } |
| | |
| | | } |
| | | |
| | | const handleAddGoods = (row: any) => { |
| | | listTmsGoodsDetail({dispatchId: row.id,pageSize:999,pageNum:1}).then(res=>{ |
| | | goodsTableData.value = res.rows || []; |
| | | listTmsGoodsDetail({dispatchId: row.id, pageSize: 999, pageNum: 1}).then(res => { |
| | | goodsTableData.value = res.rows || []; |
| | | form.value = row; |
| | | open2.value = true; |
| | | }) |
| | | } |
| | | const rowGoodsUpdate = (row:any,index:any,done:any, loading:any) => { |
| | | const rowGoodsUpdate = (row: any, index: any, done: any, loading: any) => { |
| | | updateTmsGoodsDetail(row).then(res => { |
| | | ElMessage({ |
| | | message: "修改成功!", |
| | |
| | | handleAddGoods(form.value); |
| | | onLoad(page.value); |
| | | done(); |
| | | }).catch(()=>{ |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | } |
| | | const rowGoodsSave = (row:any, done:any, loading:any) => { |
| | | const rowGoodsSave = (row: any, done: any, loading: any) => { |
| | | row.dispatchId = form.value.id; |
| | | row.dispatchNo = form.value.dispatchNo; |
| | | addTmsGoodsDetail(row).then(res=>{ |
| | | addTmsGoodsDetail(row).then(res => { |
| | | ElMessage({ |
| | | message: "新增成功!", |
| | | type: 'success' |
| | |
| | | handleAddGoods(form.value); |
| | | onLoad(page.value); |
| | | done(); |
| | | }).catch(()=>{ |
| | | }).catch(() => { |
| | | loading() |
| | | }) |
| | | } |
| | | const rowGoodsDel = (row:any) => { |
| | | ElMessageBox.confirm("确定将选择数据删除?", '系统提示', {confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning'}).then(() => { |
| | | const rowGoodsDel = (row: any) => { |
| | | ElMessageBox.confirm("确定将选择数据删除?", '系统提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | return delTmsGoodsDetail(row.id); |
| | | }).then(() => { |
| | | handleAddGoods(form.value); |
| | |
| | | }); |
| | | } |
| | | |
| | | const handleActual = (row:any) => { |
| | | actualForm.value = row; |
| | | open3.value = true; |
| | | const handleActual = (row: any) => { |
| | | actualForm.value = row; |
| | | open3.value = true; |
| | | |
| | | } |
| | | |
| | | const submitForm3 = ()=>{ |
| | | updateTmsDispatchOrder(actualForm.value).then(res=>{ |
| | | const submitForm3 = () => { |
| | | updateTmsDispatchOrder(actualForm.value).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | |
| | | onLoad(page.value) |
| | | }) |
| | | } |
| | | const countChange = (row: any) => { |
| | | row.sum = Number(row.price) * Number(row.count); |
| | | } |
| | | |
| | | const selectionChange2 = (selection?: any[]) => { |
| | | selectionList2.value = selection; |
| | | } |
| | | |
| | | const onShipperLoad = ({page, value, data}: { page: any, value: any, data: any }, callback: any) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | if (form.value.startRegionCode) { |
| | | const split = form.value.startRegionCode.split(','); |
| | | const [provinceId, cityId, districtId, streetId] = split; |
| | | |
| | | if (provinceId) data.provinceId = provinceId; |
| | | if (cityId) data.cityId = cityId; |
| | | if (districtId) data.districtId = districtId; |
| | | if (streetId) data.streetId = streetId; |
| | | } |
| | | 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) => { |
| | | if (value) { |
| | | let id = value; |
| | | if (Array.isArray(value)) { |
| | | id = value[0] |
| | | } |
| | | getTmsConsignor(id).then(res => { |
| | | return callback(res.data || {}) |
| | | }) |
| | | } else { |
| | | if (form.value.endRegionCode) { |
| | | const split = form.value.endRegionCode.split(','); |
| | | const [provinceId, cityId, districtId, streetId] = split; |
| | | |
| | | if (provinceId) data.provinceId = provinceId; |
| | | if (cityId) data.cityId = cityId; |
| | | if (districtId) data.districtId = districtId; |
| | | if (streetId) data.streetId = streetId; |
| | | } |
| | | 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) => { |
| | | |
| | | 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(form.value, { |
| | | shipperId: active.id, |
| | | shipperName: active.consignorName, |
| | | shipperRegionLabel: active.regionLabel, |
| | | shipperAddress: active.addressDetail, |
| | | shipperMobile: active.contactPhone, |
| | | shipperRegionCode: shipperRegionCode |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | const changeReceiver = ({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(form.value, { |
| | | receiverId: active.id, |
| | | receiverName: active.consignorName, |
| | | receiverRegionLabel: active.regionLabel, |
| | | receiverAddress: active.addressDetail, |
| | | receiverMobile: active.contactPhone, |
| | | receiverRegionCode: receiverRegionCode, |
| | | }); |
| | | }) |
| | | } |
| | | } |
| | | const consignorAddOption =ref({ |
| | | labelWidth: 120, |
| | | group: [ |
| | | { |
| | | label: '基础信息', |
| | | prop: 'jcxx', |
| | | column:{ |
| | | // consignorCode: { |
| | | // label: '装卸货点编码',minWidth: 150, |
| | | // addDisplay: false, disabled: true, |
| | | // editDisplay: true, |
| | | // viewDisplay: true, |
| | | // hide: false, |
| | | // search: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "装卸货点编码不能为空", trigger: "blur" |
| | | // } |
| | | // ], |
| | | // }, |
| | | consignorName: { |
| | | label: '装卸货点名称',minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "装卸货点名称不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | customerName:{ |
| | | label: '所属客户',minWidth: 150,disabled: true, |
| | | }, |
| | | // customerId: { |
| | | // label: '所属客户',minWidth: 150, |
| | | // addDisplay: true, |
| | | // editDisplay: true,suffixIcon:'search', |
| | | // viewDisplay: true, |
| | | // hide: true, |
| | | // search: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "所属客户不能为空", trigger: "change" |
| | | // } |
| | | // ], |
| | | // type: 'table', |
| | | // children:{ |
| | | // border: true, |
| | | // searchMenuSpan: 5, |
| | | // column:{ |
| | | // customerType: { |
| | | // label: '客户类型', minWidth: 120, |
| | | // type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/customer_type', |
| | | // search: true, |
| | | // }, |
| | | // customerShortName: { |
| | | // label: '客户简称', minWidth: 130, |
| | | // search: true, |
| | | // }, |
| | | // customerCode: { |
| | | // label: '客户编号',minWidth: 120, |
| | | // search: true, |
| | | // }, |
| | | // contactName: { |
| | | // label: '联系人姓名',minWidth: 120, |
| | | // }, |
| | | // signCompanyName: { |
| | | // label: '签约公司', minWidth: 150, |
| | | // }, |
| | | // }, |
| | | // |
| | | // }, |
| | | // props:{ |
| | | // label: 'customerShortName', |
| | | // 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] |
| | | // } |
| | | // getTmsCustomerInfo(id).then(res=>{ |
| | | // return callback(res.data||{}) |
| | | // }) |
| | | // }else{ |
| | | // listTmsCustomerInfo({pageSize:page.pageSize,pageNum:page.currentPage,...data}).then(res=>{ |
| | | // return callback({ |
| | | // total: res.total, |
| | | // data: res.rows||[], |
| | | // }) |
| | | // }) |
| | | // } |
| | | // |
| | | // }, |
| | | // change: ({value}: any) => { |
| | | // if(value){ |
| | | // getTmsCustomerInfo(value).then(res=>{ |
| | | // let active = res.data || {}; |
| | | // if (active){ |
| | | // console.log(dialForm.value) |
| | | // form2.value.customerId = active.id |
| | | // form2.value.customerSysCode = active.customerCode |
| | | // form2.value.customerName = active.customerShortName |
| | | // } |
| | | // }) |
| | | // } |
| | | // }, |
| | | // }, |
| | | // customerSysCode: { |
| | | // label: '客户编码',minWidth: 150, |
| | | // addDisplay: true, |
| | | // editDisplay: true, |
| | | // viewDisplay: true, |
| | | // hide: false, |
| | | // search: true, |
| | | // disabled: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "客户编码不能为空", trigger: "blur" |
| | | // } |
| | | // ], |
| | | // }, |
| | | consignorType: { |
| | | label: '装卸货点类型',minWidth: 150, |
| | | type: 'select', dataType: 'string', dicUrl: '/system/dict/data/type/consignor_type', |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "装卸货点类型不能为空", trigger: "change" |
| | | } |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '联系人信息', |
| | | prop: 'lxrxx', |
| | | column:{ |
| | | contactName: { |
| | | label: '联系人姓名',minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "联系人姓名不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | contactPhone: { |
| | | label: '联系人电话',minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | contactEmail: { |
| | | label: '联系人邮箱',minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '地址信息', |
| | | prop: 'dzxx', |
| | | column:{ |
| | | |
| | | mapLocationDetail: { |
| | | label: '地图位置',minWidth: 150, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | type: 'map', |
| | | // mapChange: async (params:any)=>{ |
| | | // 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.region = [provinceCode, cityCode, districtCode, townshipCode]; |
| | | // form2.value.provinceId = provinceCode; |
| | | // form2.value.cityId = cityCode; |
| | | // form2.value.districtId = districtCode; |
| | | // form2.value.streetId = townshipCode; |
| | | // form2.value.dispatchTransportArea = 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; |
| | | console.log(form2.value, "form2") |
| | | } |
| | | }); |
| | | } |
| | | }, |
| | | }, |
| | | // dispatchTransportArea: { |
| | | // label: '调度单运输地', |
| | | // addDisplay: true,minWidth: 150, |
| | | // editDisplay: true, |
| | | // viewDisplay: true, |
| | | // hide: false, |
| | | // search: true, |
| | | // rules: [ |
| | | // { |
| | | // required: true, |
| | | // message: "调度单运输地不能为空", trigger: "blur" |
| | | // } |
| | | // ], |
| | | // }, |
| | | electronicFenceRange: { |
| | | label: '电子围栏范围', |
| | | addDisplay: true,minWidth: 150, |
| | | editDisplay: true, |
| | | viewDisplay: true,append:'米', |
| | | hide: false, |
| | | search: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | | message: "电子围栏范围不能为空", trigger: "blur" |
| | | } |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | { |
| | | label: '其他信息', |
| | | prop: 'qtyxx', |
| | | column:{ |
| | | remark: { |
| | | label: '备注',minWidth: 150, |
| | | type: 'textarea', minRows: 3, maxRows: 5, |
| | | addDisplay: true, |
| | | editDisplay: true,span:24, |
| | | viewDisplay: true, |
| | | hide: true, |
| | | search: false, |
| | | }, |
| | | } |
| | | } |
| | | ], |
| | | }) |
| | | const form2 = ref<any>({}); |
| | | const dialForm = ref(); |
| | | |
| | | const handleAddShipper = () => { |
| | | if (!form.value.customerId){ |
| | | return ElMessage.error('请先选择运输路线'); |
| | | } |
| | | form2.value = { |
| | | customerId: form.value.customerId, |
| | | customerSysCode: form.value.customerCode, |
| | | customerName: form.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(form.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 handleAddReceiver = () => { |
| | | if (!form.value.customerId){ |
| | | return ElMessage.error('请先选择运输路线'); |
| | | } |
| | | form2.value = { |
| | | customerId: form.value.customerId, |
| | | customerSysCode: form.value.customerCode, |
| | | customerName: form.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(form.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 handleCustoms = () => { |
| | | title.value = '补充委托报关信息'; |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | optionType.value = 'customs'; |
| | | boxFormOption.value = customsOption.value; |
| | | } |
| | | const handleLoading = () => { |
| | | title.value = '补充委托装卸信息'; |
| | | open.value = true; |
| | | form.value = selectionList.value[0]; |
| | | optionType.value = 'loading'; |
| | | boxFormOption.value = loadingOption.value; |
| | | } |
| | | const quotationItems = ref(); |
| | | const getQuotationItems = async () => { |
| | | let res = await getDicts("sys_quotation_items"); |
| | | quotationItems.value = res.data || []; |
| | | } |
| | | getQuotationItems(); |
| | | |
| | | const getTabData = (val:string)=>{ |
| | | console.log(val) |
| | | let filter = quotationItems.value.filter((item:any)=>{ |
| | | return item.remark == val; |
| | | }); |
| | | if (filter.length > 0){ |
| | | zzItemsTableData.value = filter.map((item:any)=>{ |
| | | return { rowKey: randomId() ,freeName: item.dictLabel,free: item.dictValue,unit: '次'} |
| | | }) |
| | | }else{ |
| | | zzItemsTableData.value = [] |
| | | } |
| | | } |
| | | |
| | | const getTab4Data = ()=>{ |
| | | listTmsFinanceDetail({ |
| | | dispatchOrderId: form.value.id, financeType: 2, |
| | | pageNum: 1, pageSize: 999 |
| | | }).then(async res => { |
| | | boxTableData.value = res.rows || []; |
| | | |
| | | boxForm.value = { |
| | | dispatchOrderId: form.value.id, |
| | | dataSource: 0, |
| | | financeType: 2, |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | const submitTabForm = ()=>{ |
| | | if (['tab1','tab2','tab3'].includes(active.value)){ |
| | | let quoteFeeItems = zzItemsTableData.value.filter((item:any)=>{ |
| | | return item.count && item.count > 0; |
| | | }) |
| | | console.log(quoteFeeItems) |
| | | pushTmsQuoteFee({...form.value,quoteFeeItems:quoteFeeItems}).then(res=>{ |
| | | ElMessage.success('保存成功'); |
| | | open4.value = false; |
| | | }) |
| | | }else if (active.value === 'tab4'){ |
| | | if (Array.isArray(boxForm.value.feeVoucherUrl)) { |
| | | boxForm.value.feeVoucherUrl = boxForm.value.feeVoucherUrl.toString(); |
| | | } |
| | | //boxForm.value.rowItems = boxTableData.value; |
| | | saveTmsFinanceDetail(boxForm.value).then(res => { |
| | | ElMessage({ |
| | | message: "操作成功!", |
| | | type: 'success' |
| | | }) |
| | | boxFormRef.value?.resetFields(); |
| | | getTab4Data(); |
| | | }) |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const handleChange = (column:any)=>{ |
| | | active.value = column.prop; |
| | | if (['tab1','tab2','tab3'].includes(column.prop)){ |
| | | getTabData(column.value) |
| | | }else if (column.prop === 'tab4'){ |
| | | getTab4Data() |
| | | } |
| | | } |
| | | |
| | | const handleZZ = () => { |
| | | open4.value = true; |
| | | form.value = selectionList.value[0]; |
| | | handleChange(tabsOption.value.column[0]); |
| | | |
| | | boxFormOption.value = financeOption.value; |
| | | boxTableOption.value = financeTableOption.value; |
| | | nextTick(()=>{ |
| | | tabsOptionRef.value.active = "0"; |
| | | |
| | | }) |
| | | } |
| | | |
| | | const handleClose = (row:any) => { |
| | | |
| | | if (row.status == 2){ |
| | | checkCloseOrder(row.id).then(res=>{ |
| | | open5.value = true; |
| | | form.value = row; |
| | | boxFormOption.value = closeOption.value; |
| | | }); |
| | | }else{ |
| | | open5.value = true; |
| | | form.value = row; |
| | | boxFormOption.value = closeOption.value; |
| | | |
| | | } |
| | | } |
| | | const submitForm5 = () =>{ |
| | | boxFormRef.value.validate((valid: boolean,done:any) => { |
| | | console.log(valid) |
| | | if(valid){ |
| | | boxForm.value.id = form.value.id; |
| | | closeOrder(boxForm.value).then(res=>{ |
| | | ElMessage.success('操作成功'); |
| | | open5.value = false; |
| | | done(); |
| | | onLoad(page.value) |
| | | }).catch(err=>{ |
| | | done(); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | 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 |
| | | |
| | | 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(); |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | </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; |
| | | } |
| | | </style> |