| | |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane label="基本信息" name="first"> |
| | | <!-- 第一块:单据号、日期、源单号、承运商、客户 --> |
| | | <!-- 第一块:单据号、日期、源单号、承运商、客户 --> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="源单号" prop="HMainSourceBillNo"> |
| | | <el-input v-model="form.HMainSourceBillNo" placeholder="请输入源单号"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(12)"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(12)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="6"></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | |
| | | <el-col :span="6"> |
| | | <!-- <el-col :span="6"> |
| | | <el-form-item label="客户" prop="HCusName"> |
| | | <el-input v-model="form.HCusName" placeholder="请输入客户"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(7)"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(7)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="币别" prop="HCurName"> |
| | | <el-input v-model="form.HCurName" placeholder="请输入币别" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="汇率" prop="HExRate"> |
| | | <el-input v-model="form.HExRate" placeholder="请输入汇率" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> --> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <!-- 第二块:承运合同、始发地、目的地、车型、车型最大容积、距离、运输时效、运输类型、结算方式、币别、汇率、运费、总体积、装载率、运输方式 --> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="始发地" prop="HBeginAddrName"> |
| | | <el-input v-model="form.HBeginAddrName" placeholder="请输入始发地"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(3, areaType = 'b')"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(3, areaType = 'b')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="目的地" prop="HEndAddrName"> |
| | | <el-input v-model="form.HEndAddrName" placeholder="请输入目的地"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(3, areaType = 'e')"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(3, areaType = 'e')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车型" prop="HCarTypeName"> |
| | | <el-input v-model="form.HCarTypeName" placeholder="请输入车型"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(13)"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(13)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="承运合同" prop="HContractTransportBillNo"> |
| | | <el-input v-model="form.HContractTransportBillNo" placeholder="请输入承运合同"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(16)"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(16)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="承运商" prop="HCarrierName"> |
| | | <el-input v-model="form.HCarrierName" placeholder="请输入承运商"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog(6)"></el-button> |
| | | <el-input v-model="form.HCarrierName" placeholder="请输入承运商" disabled> |
| | | <!-- <el-button slot="append" icon="el-icon-search" @click="openDataDialog(6)"></el-button> --> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-input v-model="form.HTransportTyep" placeholder="请输入运输类型" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="距离(公里)" prop="HDistance"> |
| | | <el-input v-model="form.HDistance" placeholder="请输入距离" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输时效" prop="HTransportTimes"> |
| | | <el-input v-model="form.HTransportTimes" placeholder="请输入运输时效" readonly /> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="组织" prop="HOrgID"> |
| | | <el-select v-model="form.HOrgID" placeholder="请选择组织" @change="organizationChange" disabled> |
| | | <el-select v-model="form.HOrgID" placeholder="请选择组织" |
| | | @change="organizationChange" disabled> |
| | | <el-option v-for="(item, index) in organizationList" :key="index" |
| | | :label="item.Name" :value="item.ID"> |
| | | </el-option> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车型最大容积" prop="HCarTypeMaxVolume"> |
| | | <el-input v-model="form.HCarTypeMaxVolume" placeholder="请输入车型最大容积" readonly /> |
| | | <el-input v-model="form.HCarTypeMaxVolume" placeholder="请输入车型最大容积" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="总体积(立方米)" prop="HTotalVolume"> |
| | | <el-input v-model="form.HTotalVolume" placeholder="请输入总体积" /> |
| | | <el-input v-model="form.HTotalVolume" placeholder="请输入总体积" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="装载率" prop="HLoadingRate"> |
| | | <el-input v-model="form.HLoadingRate" placeholder="请输入装载率" /> |
| | | <el-input v-model="form.HLoadingRate" placeholder="请输入装载率" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- 第三块:提货地址、到货地址、组织、要求提货日期、承运商确认日期、物流状态 --> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <!-- <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="提货地址" prop="HPickAddr"> |
| | | <el-input v-model="form.HPickAddr" placeholder="请输入提货地址" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="到货地址" prop="HArriverAddr"> |
| | | <el-input v-model="form.HArriverAddr" placeholder="请输入到货地址" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-row>--> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="要求到达日期" prop="HDataForRequestedArrived"> |
| | |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <!-- <div class="form-group"> |
| | | <el-form-item label="附件" prop="fujian"> |
| | | <el-upload class="upload-demo" ref="upload" action="" :on-preview="handleFilePreview" |
| | | :on-remove="handleFileRemove" :on-change="handleFileChange" :file-list="fileList" |
| | | :auto-upload="false" :limit="10" :on-exceed="handleExceed" |
| | | accept=".jpg,.png,.jpeg,.pdf,.doc,.docx,.xls,.xlsx,.zip,.rar"> |
| | | <el-button size="small" type="primary">点击上传</el-button> |
| | | <div slot="tip" class="el-upload__tip"> |
| | | 支持上传jpg/png/jpeg/pdf/doc/docx/xls/xlsx/zip/rar格式文件,最多10个</div> |
| | | </el-upload> |
| | | </el-form-item> |
| | | </div> --> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="承运商信息" name="second"> |
| | | <div class="form-group"> |
| | |
| | | <el-col :span="6"> |
| | | <el-form-item label="结算方式" prop="HSSName"> |
| | | <el-input v-model="form.HSSName" placeholder="请输入结算方式"> |
| | | <el-button slot="append" icon="el-icon-search" @click="openDataDialog('暂无')"></el-button> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog('暂无')"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运费" prop="HMoney"> |
| | | <el-input v-model="form.HMoney" placeholder="请输入运费" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="币别" prop="HCurName"> |
| | | <el-input v-model="form.HCurName" placeholder="请输入币别" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="汇率" prop="HExRate"> |
| | | <el-input v-model="form.HExRate" placeholder="请输入汇率" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="物流信息" name="forth"> |
| | | <div class="form-group"> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="物流状态" prop="HCarryStatus"> |
| | | <el-select v-model="form.HCarryStatus" placeholder="请选择物流状态" disabled> |
| | | <el-option label="申请中" value="1"></el-option> |
| | | <el-option label="已审核" value="2"></el-option> |
| | | <el-option label="承运商确认" value="3"></el-option> |
| | | <el-option label="待提货" value="4"></el-option> |
| | | <el-option label="已到厂" value="5"></el-option> |
| | | <el-option label="已提货" value="6"></el-option> |
| | | <el-option label="运输中" value="7"></el-option> |
| | | <el-option label="已签收" value="8"></el-option> |
| | | <el-option label="已核算" value="9"></el-option> |
| | | <el-option label="申请中" value="申请中"></el-option> |
| | | <el-option label="待供应商确认" value="待供应商确认"></el-option> |
| | | <el-option label="指定驾驶员、车辆中" value="指定驾驶员、车辆中"></el-option> |
| | | <el-option label="正在前往始发地" value="正在前往始发地"></el-option> |
| | | <el-option label="提货中" value="提货中"></el-option> |
| | | <el-option label="准备离厂" value="准备离厂"></el-option> |
| | | <el-option label="送货中" value="送货中"></el-option> |
| | | <el-option label="已签收" value="已签收"></el-option> |
| | | <el-option label="已核算" value="已核算"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="承运商确认日期" prop="HDate_CarrierSure"> |
| | | <el-date-picker v-model="form.HDate_CarrierSure" type="date" placeholder="选择承运商确认日期" |
| | | format="yyyy-MM-dd hh:mm:ss" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-form-item label="承运商确认日期" prop="HDate_CarrierSure"> |
| | | <el-date-picker v-model="form.HDate_CarrierSure" type="date" |
| | | placeholder="选择承运商确认日期" format="yyyy-MM-dd hh:mm:ss" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="分配司机日期" prop="HDate_AllocationDriver"> |
| | | <el-date-picker v-model="form.HDate_AllocationDriver" type="date" |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="到厂确认时间" prop="HDate_Arrive"> |
| | | <el-date-picker v-model="form.HDate_Arrive" type="date" format="yyyy-MM-dd HH:mm:ss" |
| | | placeholder="选择到厂确认时间" disabled> |
| | | <el-date-picker v-model="form.HDate_Arrive" type="date" |
| | | format="yyyy-MM-dd HH:mm:ss" placeholder="选择到厂确认时间" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="提货确认时间" prop="HDate_Pick"> |
| | | <el-date-picker v-model="form.HDate_Pick" type="date" format="yyyy-MM-dd hh:mm:ss" |
| | | placeholder="选择提货确认时间" disabled> |
| | | <el-date-picker v-model="form.HDate_Pick" type="date" |
| | | format="yyyy-MM-dd hh:mm:ss" placeholder="选择提货确认时间" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="出厂运输确认时间" prop="HDate_Trans"> |
| | | <el-date-picker v-model="form.HDate_Trans" type="date" format="yyyy-MM-dd hh:mm:ss" |
| | | placeholder="选择到出厂运输确认时间" disabled> |
| | | <el-date-picker v-model="form.HDate_Trans" type="date" |
| | | format="yyyy-MM-dd hh:mm:ss" placeholder="选择到出厂运输确认时间" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="制单日期" prop="HMakeDate"> |
| | | <el-date-picker v-model="form.HMakeDate" type="date" placeholder="选择制单日期" disabled> |
| | | <el-date-picker v-model="form.HMakeDate" type="date" placeholder="选择制单日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="审核日期" prop="HCheckDate"> |
| | | <el-date-picker v-model="form.HCheckDate" type="date" placeholder="选择审核日期" disabled> |
| | | <el-date-picker v-model="form.HCheckDate" type="date" placeholder="选择审核日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="关闭日期" prop="HCloseDate"> |
| | | <el-date-picker v-model="form.HCloseDate" type="date" placeholder="选择关闭日期" disabled> |
| | | <el-date-picker v-model="form.HCloseDate" type="date" placeholder="选择关闭日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | @selection-change="handleTableZbEdit" :row-class-name="rowSysZbIndex" show-summary border> |
| | | <el-table-column type="selection" width="55" align="center" /> |
| | | <el-table-column align="center" label="序号" type="index" width="80" /> |
| | | <el-table-column align="center" label="源单单据号" width="120"> |
| | | <el-table-column align="center" label="发货通知单" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HSourceBillNo }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="客户" prop="HCusName" width="120" /> |
| | | <el-table-column align="center" label="提货地址" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HPickAddr" placeholder="请输入提货地址" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="到货地址" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HArriverAddr" placeholder="请输入到货地址" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="物料代码" width="120"> |
| | |
| | | <el-table-column align="center" label="物料名称" width="120"> |
| | | <template slot-scope="scope">{{ scope.row.HMaterName }} </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器代码" width="120"> |
| | | <el-table-column align="center" label="物料规格" width="120"> |
| | | <template slot-scope="scope">{{ scope.row.HModel }} </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="false" align="center" label="容器代码" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.HMouldNumber" placeholder="请输入器具代码" |
| | | @keyup.native.f7="openDataDialog(17, scope.row)" |
| | | @dblclick.native="openDataDialog(17, scope.row)" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器名称" width="120"> |
| | | <el-table-column v-if="false" align="center" label="容器名称" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldName }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器数量/托" width="120"> |
| | | |
| | | <el-table-column align="center" label="物料数量" width="150"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HStandardQtyForMouldInPack }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column align="center" label="物料数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HQty" :min="0" style="width: 90px;" |
| | | <el-input-number v-model="scope.row.HQty" :min="0" style="width: 120px;" |
| | | controls-position="right" |
| | | @change="checkTotalQtyExceed(scope.row)"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="标准包装数量" width="120"> |
| | | <el-table-column v-if="false" align="center" label="标准包装数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HSNP }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="包装容器数量" width="120"> |
| | | <el-table-column v-if="false" align="center" label="包装容器数量" width="170"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HMouldQty" :min="0" style="width: 90px;" |
| | | <el-input-number v-model="scope.row.HMouldQty" :min="0" style="width: 150px;" |
| | | controls-position="right" |
| | | @change="changeHMouldQty(scope.row)"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="托数" width="120"> |
| | | <template slot-scope="scope"> <!--HPackQTY=HMouldQty/HStandardQtyForMouldInPack --> |
| | | <el-input-number v-model="scope.row.HPackQTY" :min="0" style="width: 90px;" |
| | | controls-position="right" |
| | | @change="changeHPackQty(scope.row)"></el-input-number> |
| | | <el-table-column v-if="false" align="center" label="容器数量/托" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HStandardQtyForMouldInPack }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="托单位体积" width="120"> |
| | | <el-table-column v-if="false" align="center" label="托数" width="120"> |
| | | <template slot-scope="scope"> <!--HPackQTY=HMouldQty/HStandardQtyForMouldInPack --> |
| | | <el-input-number v-model="scope.row.HPackQTY" :min="0" style="width: 90px;" |
| | | controls-position="right" @change="changeHPackQty(scope.row)"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="false" align="center" label="托单位体积" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HPackV }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="体积" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HVolume" :min="0" style="width: 90px;" |
| | | controls-position="right" |
| | | @change="changeHVolume(scope.row)"></el-input-number> |
| | | <el-input-number v-model="scope.row.HVolume" :min="0" style="width: 90px;" |
| | | controls-position="right" @change="changeHVolume(scope.row)"></el-input-number> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="零单占用体积" width="120"> |
| | |
| | | controls-position="right"></el-input-number> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器长度" width="120"> |
| | | <el-table-column v-if="false" align="center" label="容器长度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldLength }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器宽度" width="120"> |
| | | <el-table-column v-if="false" align="center" label="容器宽度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldWidth }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="容器高度" width="120"> |
| | | <el-table-column v-if="false" align="center" label="容器高度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldHeight }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="折叠高度" width="120"> |
| | | <el-table-column v-if="false" align="center" label="折叠高度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldFoldHeight }}</span> |
| | | </template> |
| | |
| | | <GyCar @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCarShow" /> |
| | | <GyDriver @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyDriverShow" /> |
| | | <ContractTransport @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" |
| | | v-if="ContractTransportShow" /> |
| | | v-if="ContractTransportShow" :propHBeginAddrName="form.HBeginAddr" |
| | | :propHBeginHEndAddrName="form.HEndAddr" :propHCarTypeName="form.HCarTypeID" /> |
| | | <GyMaterialPackingRelation @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" |
| | | :propHMaterID="editData[zbIndex].HMaterID" :propHOrgID="form.HOrgID" |
| | | v-if="gyMaterialPackingRelationShow" /> |
| | |
| | | HCusName: [ |
| | | { required: true, message: "客户不能为空", trigger: "blur" } |
| | | ], |
| | | HBeginAddrName: [ |
| | | { required: true, message: "始发地不能为空", trigger: "blur" } |
| | | ], |
| | | HEndAddrName: [ |
| | | { required: true, message: "目的地不能为空", trigger: "blur" } |
| | | HCarTypeName:[ |
| | | { required: true, message: "车型不能为空", trigger: "blur" } |
| | | ], |
| | | HDate: [ |
| | | { required: true, message: "日期不能为空", trigger: "blur" } |
| | | ], |
| | | HExRate: [ |
| | | { required: true, message: "汇率不能为空", trigger: "blur" } |
| | | ], |
| | | HCarrierName: [ |
| | | { required: true, message: "承运合同不能为空", trigger: "blur" } |
| | | ] |
| | | }, |
| | | |
| | |
| | | this.form.HInnerBillNo = data.内部单据号 |
| | | this.form.HCarrierID = data.承运商ID |
| | | this.form.HCarrierName = data.承运商名称 |
| | | this.form.HCusID = data.HCusID |
| | | this.form.HCusName = data.客户名称 |
| | | // this.form.HCusID = data.HCusID |
| | | // this.form.HCusName = data.客户名称 |
| | | this.form.HBeginAddr = data.始发地 |
| | | this.form.HBeginAddrName = data.始发地名称 |
| | | this.form.HEndAddr = data.目的地 |
| | | this.form.HEndAddrName = data.目的地名称 |
| | | this.form.HPickAddr = data.提货地址 |
| | | this.form.HArriverAddr = data.到货方式 |
| | | // this.form.HPickAddr = data.提货地址 |
| | | // this.form.HArriverAddr = data.到货地址 |
| | | this.form.HTransType = data.运输方式 |
| | | this.form.HCarTypeID = data.车型ID |
| | | this.form.HCarTypeName = data.车型名称 |
| | |
| | | var width = parseFloat(result.data[i].容器宽度) || 0; |
| | | var height = parseFloat(result.data[i].容器高度) || 0; |
| | | var rowVolume = (length * width * height).toFixed(2); |
| | | |
| | | console.log(result.data) |
| | | this.editData.push( |
| | | { |
| | | "HSourceInterID": result.data[i].源单主内码, |
| | | "HSourceEntryID": result.data[i].源单子内码, |
| | | "HSourceBillNo": result.data[i].源单单据, |
| | | "HCusID": result.data[i].HCusID, |
| | | "HCusName": result.data[i].客户名称, |
| | | "HPickAddr": result.data[i].提货地址, |
| | | "HArriverAddr": result.data[i].到货地址, |
| | | "HMaterID": result.data[i].HMaterID, |
| | | "HMaterNumber": result.data[i].物料代码, |
| | | "HMaterName": result.data[i].物料名称, |
| | |
| | | "HQty": result.data[i].物料数量, |
| | | "HQty_origin": result.data[i].HQty, |
| | | "HVolume": rowVolume, |
| | | "HScatteredVolume": result.data[i].零单占用体积 |
| | | "HScatteredVolume": result.data[i].零单占用体积, |
| | | "HStandardQtyForMouldInPack":result.data[i].HStandardQtyForMouldInPack, |
| | | "HPackV":result.data[i].HPackV, |
| | | "HPackQTY":result.data[i].HPackQTY, |
| | | } |
| | | ) |
| | | } |
| | |
| | | this.gyCartypeShow = false |
| | | this.gyCarShow = false |
| | | this.gyDriverShow = false |
| | | this.AreaDialogShow = false |
| | | this.ContractTransportShow = false |
| | | this.gyMaterialPackingRelationShow = false |
| | | }, |
| | |
| | | async processSourceDataAsync(deptRow) { |
| | | try { |
| | | // 设置客户信息 |
| | | if (!this.form.HCusID && deptRow.length > 0) { |
| | | this.form.HCusID = deptRow[0]["HCusID"]; |
| | | this.form.HCusName = deptRow[0]["客户"]; |
| | | } |
| | | // if (!this.form.HCusID && deptRow.length > 0) { |
| | | // this.form.HCusID = deptRow[0]["HCusID"]; |
| | | // this.form.HCusName = deptRow[0]["客户"]; |
| | | // } |
| | | console.log(deptRow) |
| | | this.form.HMainSourceInterID = deptRow[0]["hmainid"] |
| | | this.form.HMainSourceEntryID = deptRow[0]["hsubid"] |
| | | this.form.HMainSourceBillType = deptRow[0]["HBillType"] |
| | | this.form.HMainSourceBillNo = deptRow[0]["单据号"] |
| | | this.form.HCurName = deptRow[0]["币别"] |
| | | this.form.HCurID = deptRow[0]["HCurID"] |
| | | this.form.HExRate = deptRow[0]["汇率"] |
| | | // this.form.HCurName = deptRow[0]["币别"] |
| | | // this.form.HCurID = deptRow[0]["HCurID"] |
| | | // this.form.HExRate = deptRow[0]["汇率"] |
| | | // 检查是否所有记录属于同一客户 |
| | | for (var i = 0; i < deptRow.length; i++) { |
| | | if (deptRow[i]["HCusID"] != this.form.HCusID) { |
| | | this.$modal.msgError("下推失败!已经选中的记录中存在不同客户,请确保选择的源单属于同一客户!"); |
| | | this.xsSeOutStockBillShow = false; |
| | | this.openData = false; |
| | | return; |
| | | } |
| | | } |
| | | // for (var i = 0; i < deptRow.length; i++) { |
| | | // if (deptRow[i]["HCusID"] != this.form.HCusID) { |
| | | // this.$modal.msgError("下推失败!已经选中的记录中存在不同客户,请确保选择的源单属于同一客户!"); |
| | | // this.xsSeOutStockBillShow = false; |
| | | // this.openData = false; |
| | | // return; |
| | | // } |
| | | // } |
| | | |
| | | // 检查新选择的源单是否已经在子表中存在 |
| | | var isDuplicate = this.checkDuplicateSource(deptRow); |
| | |
| | | try { |
| | | // 显示源单数据加载状态 |
| | | this.sourceDataLoading = true; |
| | | |
| | | var dataArray = []; |
| | | |
| | | let hmainidVal = [] |
| | | for (var i = 0; i < checkStatus.length; i++) { |
| | | hmainidVal[i] = "'" + checkStatus[i].hmainid + '-' + checkStatus[i].hsubid + "'" |
| | | } |
| | | // 使用Promise.all等待所有异步请求完成 |
| | | const promises = checkStatus.map(async (item) => { |
| | | const temp = await this.getPushSeOutStockBillInit(item.hmainid, item.hsubid); |
| | | return temp; |
| | | }); |
| | | |
| | | const results = await Promise.all(promises); |
| | | |
| | | // 过滤掉null值 |
| | | for (const result of results) { |
| | | if (result) { |
| | |
| | | return; |
| | | } |
| | | } |
| | | |
| | | // 获取现有子表数据 |
| | | var existingData = this.editData || []; |
| | | var orginHQTY = 0; |
| | | |
| | | // 创建物料ID映射 |
| | | var materialMap = {}; |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | orginHQTY = dataArray[i].数量; |
| | | var materialId = dataArray[i].HMaterID; |
| | | if (!materialMap[materialId]) { |
| | | materialMap[materialId] = []; |
| | | } |
| | | materialMap[materialId].push({ |
| | | HMaterID:dataArray[i].HMaterID, |
| | | hmainid: dataArray[i].hmainid, |
| | | hsubid: dataArray[i].hsubid, |
| | | 单据号: dataArray[i].单据号 |
| | | }); |
| | | } |
| | | // var materialMap = {}; |
| | | // for (var i = 0; i < dataArray.length; i++) { |
| | | // orginHQTY = dataArray[i].数量; |
| | | // var materialId = dataArray[i].HMaterID; |
| | | // console.log(materialId) |
| | | // if (!materialMap[materialId]) { |
| | | // materialMap[materialId] = []; |
| | | // } |
| | | // materialMap[materialId].push({ |
| | | // HMaterID: dataArray[i].HMaterID, |
| | | // hmainid: dataArray[i].hmainid, |
| | | // hsubid: dataArray[i].hsubid, |
| | | // 单据号: dataArray[i].单据号 |
| | | // }); |
| | | // } |
| | | // // 获取所有物料ID |
| | | // var ListMaterial = ""; |
| | | // for (var materialId in materialMap) { |
| | | // if (ListMaterial) ListMaterial += ";"; |
| | | // ListMaterial += materialId; |
| | | // } |
| | | // if (!ListMaterial) { |
| | | // this.$modal.msgError("没有找到物料信息,请检查选择的源单是否包含有效的物料数据!"); |
| | | // this.sourceDataLoading = false; |
| | | // return; |
| | | // } |
| | | |
| | | // 获取所有物料ID |
| | | var ListMaterial = ""; |
| | | for (var materialId in materialMap) { |
| | | if (ListMaterial) ListMaterial += ";"; |
| | | ListMaterial += materialId; |
| | | } |
| | | |
| | | if (!ListMaterial) { |
| | | this.$modal.msgError("没有找到物料信息,请检查选择的源单是否包含有效的物料数据!"); |
| | | this.sourceDataLoading = false; |
| | | return; |
| | | } |
| | | |
| | | const response = await axios.get(this.baseURL + '/WLYayBillController/GetMesByOrginBill_1', { |
| | | const response = await axios.get(this.baseURL + '/WLYayBillController/GetList', { |
| | | params: { |
| | | "ListMaterial": ListMaterial |
| | | "user": sessionStorage["HUserName"], |
| | | "hmainid_hsubid": hmainidVal.join(',') |
| | | }, |
| | | }); |
| | | |
| | | console.log('源单详情', response.data.data) |
| | | let result = response.data; |
| | | if (result.count == 1) { |
| | | let res = result.data; |
| | | var newRows = []; |
| | | // 为每个源单行创建对应的子表行 |
| | | for (var materialId in materialMap) { |
| | | var sourceInfos = materialMap[materialId]; |
| | | console.log("发货通知单数据",dataArray) |
| | | console.log("1发货通知单数据",dataArray[0]) |
| | | if(res.length===0) |
| | | { |
| | | // 为每个源单行创建一条记录 |
| | | for (var j = 0; j < sourceInfos.length; j++) { |
| | | var sourceInfo = sourceInfos[j]; |
| | | |
| | | // 再次检查是否已存在(双重保险) |
| | | var isExist = false; |
| | | for (var k = 0; k < existingData.length; k++) { |
| | | if (existingData[k].HSourceInterID == sourceInfo.hmainid && |
| | | existingData[k].HSourceEntryID == sourceInfo.hsubid) { |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (isExist) { |
| | | this.$modal.msgError(`源单${sourceInfo.单据号}已存在,跳过`); |
| | | continue; |
| | | } |
| | | |
| | | // 计算相关数量 |
| | | var qty = 0; |
| | | var snp = 1; |
| | | var mouldQty = 0; |
| | | var length = 0; |
| | | var width = 0; |
| | | var height = 0; |
| | | var rowVolume = (length * width * height * mouldQty).toFixed(2); |
| | | |
| | | newRows.push({ |
| | | "HSourceInterID": sourceInfo.hmainid, |
| | | "HSourceEntryID": sourceInfo.hsubid, |
| | | "HSourceBillNo": sourceInfo.单据号, |
| | | "HMaterID": dataArray[j].HMaterID, |
| | | "HMaterNumber": dataArray[j].物料代码, |
| | | "HMaterName": dataArray[j].物料名称, |
| | | "HUnitID": dataArray[j].HUnitID, |
| | | "HMouldID": 0, |
| | | "HMouldNumber": '', |
| | | "HMouldName": '', |
| | | "HMouldLength": 0, |
| | | "HMouldWidth": 0, |
| | | "HMouldHeight": 0, |
| | | "HMouldFoldHeight": 0, |
| | | "HQty": orginHQTY, |
| | | "HQty_origin": orginHQTY, |
| | | "HMouldQty": mouldQty, |
| | | "HVolume": rowVolume, |
| | | "HSNP": 0, |
| | | HScatteredVolume: 0, |
| | | }); |
| | | // 为每个源单行创建一条记录 |
| | | for (var j = 0; j < res.length; j++) { |
| | | var sourceInfo = res[j]; |
| | | // 再次检查是否已存在(双重保险) |
| | | var isExist = false; |
| | | for (var k = 0; k < existingData.length; k++) { |
| | | if (existingData[k].HSourceInterID == sourceInfo.hmainid && |
| | | existingData[k].HSourceEntryID == sourceInfo.hsubid) { |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | // 查找该物料ID对应的包装容器信息 |
| | | var materialInfo = null; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].HMaterID == materialId) { |
| | | materialInfo = res[i]; |
| | | break; |
| | | } |
| | | } |
| | | if (materialInfo) { |
| | | // 为每个源单行创建一条记录 |
| | | for (var j = 0; j < sourceInfos.length; j++) { |
| | | var sourceInfo = sourceInfos[j]; |
| | | |
| | | // 再次检查是否已存在(双重保险) |
| | | var isExist = false; |
| | | for (var k = 0; k < existingData.length; k++) { |
| | | if (existingData[k].HSourceInterID == sourceInfo.hmainid && |
| | | existingData[k].HSourceEntryID == sourceInfo.hsubid) { |
| | | isExist = true; |
| | | break; |
| | | } |
| | | } |
| | | |
| | | if (isExist) { |
| | | this.$modal.msgError(`源单${sourceInfo.单据号}已存在,跳过`); |
| | | continue; |
| | | } |
| | | |
| | | // 计算相关数量 |
| | | var qty = materialInfo.HSNP || 0; |
| | | var snp = materialInfo.HSNP || 1; |
| | | var mouldQty = snp > 0 ? Math.ceil(qty / snp) : 0; |
| | | var length = parseFloat(materialInfo.长度) || 0; |
| | | var width = parseFloat(materialInfo.宽度) || 0; |
| | | var height = parseFloat(materialInfo.高度) || 0; |
| | | // var rowVolume = (length * width * height * mouldQty).toFixed(2); |
| | | |
| | | //HPackQTY=HMouldQty/HStandardQtyForMouldInPack |
| | | var HPackQTY = 0; |
| | | if(materialInfo.HStandardQtyForMouldInPack===0) |
| | | { |
| | | HPackQTY=0 |
| | | }else |
| | | { |
| | | HPackQTY=Math.ceil(mouldQty/materialInfo.HStandardQtyForMouldInPack) |
| | | } |
| | | var rowVolume = (HPackQTY*materialInfo.HPackV).toFixed(2); |
| | | newRows.push({ |
| | | "HSourceInterID": sourceInfo.hmainid, |
| | | "HSourceEntryID": sourceInfo.hsubid, |
| | | "HSourceBillNo": sourceInfo.单据号, |
| | | "HMaterID": materialInfo.HMaterID, |
| | | "HMaterNumber": materialInfo.物料代码, |
| | | "HMaterName": materialInfo.物料名称, |
| | | "HUnitID": materialInfo.HUnitID, |
| | | "HMouldID": materialInfo.HMouldID, |
| | | "HMouldNumber": materialInfo.HMouldNumber, |
| | | "HMouldName": materialInfo.HMouldName, |
| | | "HMouldLength": materialInfo.长度, |
| | | "HMouldWidth": materialInfo.宽度, |
| | | "HMouldHeight": materialInfo.高度, |
| | | "HMouldFoldHeight": materialInfo.折叠高度, |
| | | "HQty": orginHQTY, |
| | | "HQty_origin": orginHQTY, |
| | | "HMouldQty": mouldQty, |
| | | "HVolume": rowVolume, |
| | | "HSNP": materialInfo.HSNP, |
| | | HScatteredVolume: 0, |
| | | "HPackV": materialInfo.HPackV, |
| | | "HStandardQtyForMouldInPack": materialInfo.HStandardQtyForMouldInPack, |
| | | "HPackQTY": HPackQTY, |
| | | }); |
| | | this.form.HTotalVolume=this.form.HTotalVolume*1+rowVolume *1 |
| | | |
| | | } |
| | | if (isExist) { |
| | | this.$modal.msgError(`源单${sourceInfo.单据号}已存在,跳过`); |
| | | continue; |
| | | } |
| | | // 计算相关数量 |
| | | var qty = res[j].物料数量 || 0; |
| | | var snp = res[j].托标准容器数量 || 0; |
| | | var mouldQty = 0; |
| | | if (snp > 0) { |
| | | mouldQty = Math.ceil(qty / snp); |
| | | } |
| | | |
| | | |
| | | |
| | | var HPackQTY = 0; |
| | | if (res[j].托数量 > 0 && mouldQty > 0) { |
| | | HPackQTY = Math.ceil(mouldQty / res[j].托数量); |
| | | } |
| | | var rowVolume = (HPackQTY * res[j].托体积).toFixed(2); |
| | | newRows.push({ |
| | | "HSourceInterID": res[j].hmainid, |
| | | "HSourceEntryID": res[j].hsubid, |
| | | "HSourceBillNo": res[j].单据号, |
| | | "HCusID": res[j].HCusID, |
| | | "HCusName": res[j].客户, |
| | | "HMaterID": res[j].HMaterID, |
| | | "HMaterNumber": res[j].物料代码, |
| | | "HMaterName": res[j].物料名称, |
| | | "HMouldNumber": res[j].容器代码, |
| | | "HMouldName": res[j].容器名称, |
| | | "HUnitID": res[j].HUnitID, |
| | | "HMouldID": res[j].HMouldID, |
| | | "HPackV": res[j].托体积, |
| | | "HStandardQtyForMouldInPack": res[j].容器数量, |
| | | "HMouldLength": res[j].长度, |
| | | "HMouldWidth": res[j].宽度, |
| | | "HMouldHeight": res[j].高度, |
| | | "HMouldFoldHeight": res[j].折叠高度, |
| | | "HModel":res[j].物料规格, |
| | | "HQty": res[j].物料数量, |
| | | "HQty_origin": orginHQTY, |
| | | "HMouldQty": mouldQty, |
| | | "HVolume": rowVolume, |
| | | "HSNP": res[j].托标准容器数量, |
| | | "HScatteredVolume": 0, |
| | | "HPackQTY": HPackQTY, |
| | | }); |
| | | this.form.HTotalVolume = this.form.HTotalVolume * 1 + rowVolume * 1 |
| | | } |
| | | |
| | | if (newRows.length === 0) { |
| | | this.$modal.msgError("没有可添加的新记录,可能是源单数据已存在或物料信息不完整!"); |
| | | this.sourceDataLoading = false; |
| | | return; |
| | | } |
| | | |
| | | // 合并现有数据和新数据 |
| | | var allData = existingData.concat(newRows); |
| | | // 渲染表格 |
| | | this.editData = allData; |
| | | |
| | | |
| | | |
| | | this.$modal.msgSuccess(`成功添加${newRows.length}条记录`); |
| | | } else { |
| | |
| | | return null; |
| | | } |
| | | }, |
| | | //#endregion |
| | | //#region 工具栏按钮操作 |
| | | //#region 编辑提交保存 |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | this.form.HCarryStatus = 0; |
| | | var loadingRate = this.form.HLoadingRate; |
| | | if (loadingRate && typeof loadingRate === 'string') { |
| | | this.form.HLoadingRate = parseFloat(loadingRate.replace('%', '')) / 100; |
| | |
| | | this.$modal.msgError("请选择一行数据") |
| | | } else { |
| | | let copyRow = JSON.parse(JSON.stringify(this.zbSelForm)) |
| | | copyRow.HPackQTY=0, |
| | | copyRow.HMouldQty=0, |
| | | copyRow.HQty=0, |
| | | copyRow.HVolume=0 |
| | | copyRow.HScatteredVolume=0 |
| | | copyRow.HPackQTY = 0, |
| | | copyRow.HMouldQty = 0, |
| | | copyRow.HQty = 0, |
| | | copyRow.HVolume = 0 |
| | | copyRow.HScatteredVolume = 0 |
| | | this.editData.push(copyRow); |
| | | } |
| | | }, |
| | |
| | | let HPackQty = 0; |
| | | const standardQty = parseFloat(this.editData[row.index - 1].HStandardQtyForMouldInPack) || 0; |
| | | const mouldQty = parseFloat(row.HMouldQty) || 0; |
| | | |
| | | |
| | | if (standardQty > 0 && mouldQty > 0) { |
| | | HPackQty = Math.ceil(mouldQty / standardQty); |
| | | } else { |
| | |
| | | this.$message.warning('容器数量/托为0,托数将被设置为0'); |
| | | } |
| | | } |
| | | |
| | | |
| | | if (!HPackQty || HPackQty == 'Infinity') { |
| | | this.editData[row.index - 1].HPackQTY = 0; |
| | | } else { |
| | |
| | | const packQty = parseFloat(this.editData[this.zbIndex].HPackQTY) || 0; |
| | | const packV = parseFloat(this.editData[this.zbIndex].HPackV) || 0; |
| | | let Volume = ((packQty * packV).toFixed(2)) - 0; |
| | | |
| | | |
| | | if (!Volume) { |
| | | this.editData[this.zbIndex].HVolume = 0; |
| | | } else { |
| | | this.editData[this.zbIndex].HVolume = Volume; |
| | | } |
| | | |
| | | |
| | | this.form.HTotalVolume = 0; |
| | | this.editData.map(item => { |
| | | this.form.HTotalVolume = Number(item.HVolume) + this.form.HTotalVolume; |
| | |
| | | //#region 体积值变化处理 |
| | | changeHVolume(row) { |
| | | this.zbIndex = row.index - 1; |
| | | |
| | | |
| | | // 确保体积值有效 |
| | | const volume = parseFloat(row.HVolume) || 0; |
| | | this.editData[this.zbIndex].HVolume = volume; |
| | | |
| | | |
| | | // 更新表头总体积 |
| | | this.form.HTotalVolume = 0; |
| | | this.editData.map(item => { |
| | | this.form.HTotalVolume = Number(item.HVolume) + this.form.HTotalVolume; |
| | | }); |
| | | |
| | | |
| | | // 更新装载率 |
| | | this.calculateLoadingRate(parseFloat(this.form.HTotalVolume || 0)); |
| | | }, |
| | |
| | | } |
| | | }, |
| | | //#endregion |
| | | checkTotalQtyExceed(selRow) { |
| | | checkTotalQtyExceed(selRow) { |
| | | var tableData = this.editData |
| | | if (!tableData || tableData.length === 0) return; |
| | | var sourceQtyMap = {}; |
| | |
| | | const SNP = parseFloat(this.editData[selRow.index - 1].HSNP) || 0; |
| | | const HQty = parseFloat(selRow.HQty) || 0; |
| | | let warningMessages = []; |
| | | |
| | | |
| | | if (SNP > 0) { |
| | | let MouldQty = Math.ceil(HQty / SNP); |
| | | if (!MouldQty || MouldQty == 'Infinity') { |
| | |
| | | this.editData[selRow.index - 1].HMouldQty = 0; |
| | | warningMessages.push('标准包装数量为0,包装容器数量将被设置为0'); |
| | | } |
| | | |
| | | |
| | | const standardQtyForMouldInPack = parseFloat(this.editData[selRow.index - 1].HStandardQtyForMouldInPack) || 0; |
| | | const HMouldQty = parseFloat(this.editData[selRow.index - 1].HMouldQty) || 0; |
| | | |
| | | |
| | | if (standardQtyForMouldInPack > 0 && HMouldQty > 0) { |
| | | let HPackQTY = Math.ceil(HMouldQty / standardQtyForMouldInPack); |
| | | if (!HPackQTY || HPackQTY == 'Infinity') { |
| | |
| | | } |
| | | this.editData[selRow.index - 1].HPackQTY = 0; |
| | | } |
| | | |
| | | |
| | | if (warningMessages.length > 0) { |
| | | this.$message.warning(warningMessages.join(';')); |
| | | } |
| | | |
| | | |
| | | const HPackQTY = parseFloat(this.editData[selRow.index - 1].HPackQTY) || 0; |
| | | const HPackV = parseFloat(this.editData[selRow.index - 1].HPackV) || 0; |
| | | let HVolume = ((HPackQTY * HPackV).toFixed(2)) - 0; |
| | |
| | | } else { |
| | | this.editData[selRow.index - 1].HVolume = HVolume; |
| | | } |
| | | |
| | | |
| | | this.form.HTotalVolume = 0; |
| | | this.editData.map(item => { |
| | | this.form.HTotalVolume = Number(item.HVolume) + this.form.HTotalVolume; |
| | | }); |
| | | this.calculateLoadingRate(parseFloat(this.form.HTotalVolume || 0)); |
| | | |
| | | |
| | | return false; // 表示没有超出 |
| | | }, |
| | | //#region 附件上传相关方法 |
| | |
| | | // 文件移除时的处理 |
| | | handleFileRemove(file, fileList) { |
| | | this.uploadFiles = fileList; |
| | | }, |
| | | // 文件预览 |
| | | handleFilePreview(file) { |
| | | if (file.url) { |
| | | window.open(file.url, '_blank'); |
| | | } else if (file.raw) { |
| | | const url = URL.createObjectURL(file.raw); |
| | | window.open(url, '_blank'); |
| | | } else { |
| | | this.$message.warning('无法预览该文件'); |
| | | } |
| | | }, |
| | | // 文件超出限制时的处理 |
| | | handleExceed(files, fileList) { |
| | | this.$message.warning(`当前限制选择 10 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`); |
| | | }, |
| | | flieUpload(row) { |
| | | // 创建FormData对象 |
| | |
| | | .xsckdBox .el-date-editor.el-input { |
| | | width: 100%; |
| | | } |
| | | |
| | | .form-group { |
| | | border: 1px solid #ddd; /* 灰色边框 */ |
| | | padding: 15px; /* 内边距,让内容与边框有间距 */ |
| | | border-radius: 4px; /* 可选圆角 */ |
| | | margin-bottom: 20px; /* 保持原有的下边距 */ |
| | | border: 1px solid #ddd; |
| | | /* 灰色边框 */ |
| | | padding: 15px; |
| | | /* 内边距,让内容与边框有间距 */ |
| | | border-radius: 4px; |
| | | /* 可选圆角 */ |
| | | margin-bottom: 20px; |
| | | /* 保持原有的下边距 */ |
| | | } |
| | | </style> |