| | |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="130px"> |
| | | <el-tabs v-model="activeName" type="card"> |
| | | <el-tab-pane label="基本信息" name="first"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="日期" prop="HDate"> |
| | | <el-date-picker v-model="form.HDate" type="date" placeholder="选择日期" |
| | | value-format="yyyy-MM-dd" disabled> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <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> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车型最大容积" prop="HCarTypeMaxVolume"> |
| | | <el-input v-model="form.HCarTypeMaxVolume" placeholder="请输入车型最大容积" readonly /> |
| | | </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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="距离(公里)" prop="HDistance"> |
| | | <el-input v-model="form.HDistance" placeholder="请输入距离" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输时效" prop="HTransportTimes"> |
| | | <el-input v-model="form.HTransportTimes" placeholder="请输入运输时效" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输类型" prop="HTransportTyep"> |
| | | <el-input v-model="form.HTransportTyep" placeholder="请输入运输类型" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-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-row> |
| | | <el-row> |
| | | <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 :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="HTotalVolume"> |
| | | <el-input v-model="form.HTotalVolume" placeholder="请输入总体积" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="装载率" prop="HLoadingRate"> |
| | | <el-input v-model="form.HLoadingRate" placeholder="请输入装载率" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <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 :span="6"> |
| | | <el-form-item label="到货地址" prop="HArriverAddr"> |
| | | <el-input v-model="form.HArriverAddr" placeholder="请输入到货地址" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输方式" prop="HTransType"> |
| | | <el-select v-model="form.HTransType" placeholder="请选择运输方式"> |
| | | <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="HOrgID"> |
| | | <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-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="要求提货日期" prop="HDateForRequestedPick"> |
| | | <el-date-picker v-model="form.HDateForRequestedPick" type="date" |
| | | placeholder="选择要求提货日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </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="选择承运商确认日期" |
| | | value-format="yyyy-MM-dd"> |
| | | </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" |
| | | placeholder="选择分配司机日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="要求到达日期" prop="HDataForRequestedArrived"> |
| | | <el-date-picker v-model="form.HDataForRequestedArrived" type="date" |
| | | placeholder="选择要求到达日期" value-format="yyyy-MM-dd"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="物流状态" prop="HCarryStatus"> |
| | | <el-select v-model="form.HCarryStatus" placeholder="请选择物流状态"> |
| | | <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-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车辆" prop="HCarName"> |
| | | <el-input v-model="form.HCarName" placeholder="请输入车辆"> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(14)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="司机" prop="HDriverName"> |
| | | <el-input v-model="form.HDriverName" placeholder="请输入司机"> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(15)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-tab-pane> |
| | | <!-- <el-tab-pane label="附件信息" name="second"> |
| | | <div style="padding: 10px;"> |
| | | <el-upload class="upload-demo" ref="upload" action="" :on-change="handleFileChange" |
| | | :show-file-list="false" :on-remove="handleFileRemove" :file-list="uploadFiles" |
| | | :auto-upload="false" multiple> |
| | | <el-button slot="trigger" size="small" type="primary">选择文件</el-button> |
| | | <el-button style="margin-left: 10px;" size="small" type="success" @click="submitUpload" |
| | | :loading="uploadLoading">上传文件</el-button> |
| | | </el-upload> |
| | | <el-table :data="uploadFiles" style="width: 100%" border> |
| | | <el-table-column prop="name" label="文件名"> |
| | | </el-table-column> |
| | | <el-table-column prop="type" label="文件类型"> |
| | | <template slot-scope="scope"> |
| | | {{ scope.row.name.substring(scope.row.name.lastIndexOf('.') + 1).toLowerCase() |
| | | }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="size" label="大小"> |
| | | <template slot-scope="scope"> |
| | | {{ (scope.row.size / 1024).toFixed(1) + ' KB' }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="status" label="状态"> |
| | | <template slot-scope="scope"> |
| | | <span v-if="scope.row.status == 'ready'">未上传</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="primary" |
| | | @click="flieUpload(scope.row)">上传</el-button> |
| | | <el-button size="mini" type="danger" @click="deleteFile(index)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | </el-tab-pane> --> |
| | | <el-tab-pane label="制单信息" name="third"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="制单人" prop="HMaker"> |
| | | <el-input v-model="form.HMaker" placeholder="请输入制单人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="修改人" prop="HUpDater"> |
| | | <el-input v-model="form.HUpDater" placeholder="请输入修改人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="审核人" prop="HChecker"> |
| | | <el-input v-model="form.HChecker" placeholder="请输入审核人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="关闭人" prop="HCloseMan"> |
| | | <el-input v-model="form.HCloseMan" placeholder="请输入关闭人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <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> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="修改日期" prop="HUpDateDate"> |
| | | <el-date-picker v-model="form.HUpDateDate" type="date" placeholder="选择审核日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </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> |
| | | </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> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="作废人" prop="HDeleteMan"> |
| | | <el-input v-model="form.HDeleteMan" placeholder="请输入作废人" disabled /> |
| | | </el-form-item> |
| | | <!-- 第一块:单据号、日期、源单号、承运商、客户 --> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="单据号" prop="HBillNo"> |
| | | <el-input v-model="form.HBillNo" placeholder="请输入单据号" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="日期" prop="HDate"> |
| | | <el-date-picker v-model="form.HDate" type="date" placeholder="选择日期" |
| | | format="yyyy-MM-dd" disabled> </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <!-- 第一行剩余位置留空,保持布局整齐(可选) --> |
| | | <el-col :span="6"></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <!-- <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-input> |
| | | </el-form-item> |
| | | </el-col> --> |
| | | </el-row> |
| | | </div> |
| | | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="作废日期" prop="HDeleteDate"> |
| | | <el-date-picker v-model="form.HDeleteDate" type="date" placeholder="选择作废日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="到厂确认人" prop="HSurer_Arrive"> |
| | | <el-input v-model="form.HSurer_Arrive" placeholder="请输入到厂确认人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="到厂确认时间" prop="HDate_Arrive"> |
| | | <el-date-picker v-model="form.HDate_Arrive" type="date" placeholder="选择到厂确认时间" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="提货确认人" prop="HSurer_Pick"> |
| | | <el-input v-model="form.HSurer_Pick" placeholder="请输入提货确认" disabled /> |
| | | </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" placeholder="选择提货确认时间" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="出厂运输确认人" prop="HSurer_Trans"> |
| | | <el-input v-model="form.HSurer_Trans" placeholder="请输入到厂确认人" disabled /> |
| | | </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" placeholder="选择到出厂运输确认时间" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="签收确认人" prop="HSurer_Receive"> |
| | | <el-input v-model="form.HSurer_Receive" placeholder="请输入签收确认人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="签收确认时间" prop="HDate_Receive"> |
| | | <el-date-picker v-model="form.HDate_Receive" type="date" placeholder="选择签收确认时间" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核算人" prop="HSurer_Accounting"> |
| | | <el-input v-model="form.HSurer_Accounting" placeholder="请输入核算人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核算时间" prop="HDate_Accounting"> |
| | | <el-date-picker v-model="form.HDate_Accounting" type="date" placeholder="选择核算时间" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- 第二块:承运合同、始发地、目的地、车型、车型最大容积、距离、运输时效、运输类型、结算方式、币别、汇率、运费、总体积、装载率、运输方式 --> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="承运商" prop="HCarrierName"> |
| | | <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-col :span="12"> |
| | | <el-form-item label="运输线路" prop="HTransportLineName"> |
| | | <el-select v-model="form.HTransportLineName" placeholder="请选择运输线路" filterable |
| | | @change="transLineNameChange" @focus="checkTransportList"> |
| | | <el-option v-for="(item, index) in transportList" :key="index" :label="item" |
| | | :value="item"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输方式" prop="HTransType"> |
| | | <el-select v-model="form.HTransType" placeholder="请选择运输方式" |
| | | @change="transTypeChange" @focus="checkTransTypeList"> |
| | | <el-option v-for="(item, index) in transTypeList" :key="index" :label="item" |
| | | :value="item"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车型" prop="HCarTypeName"> |
| | | <el-select v-model="form.HCarTypeName" placeholder="请选择车型" |
| | | @change="transHCarChange" @focus="checkHCarTypeNameList"> |
| | | <el-option v-for="(item, index) in HCarTypeNameList" :key="index" |
| | | :label="item.value" :value="item.id"></el-option> |
| | | </el-select> |
| | | <!-- <el-input v-model="form.HCarTypeName" placeholder="请输入车型"> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(13)"></el-button> |
| | | </el-input> --> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <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-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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运输类型" prop="HTransportTyep"> |
| | | <el-input v-model="form.HTransportTyep" placeholder="请输入运输类型" readonly /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <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-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="组织" prop="HOrgID"> |
| | | <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-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车型最大容积" prop="HCarTypeMaxVolume"> |
| | | <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="请输入总体积" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="装载率" prop="HLoadingRate"> |
| | | <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-form-item label="提货地址" prop="HPickAddr"> |
| | | <el-input v-model="form.HPickAddr" placeholder="请输入提货地址" /> |
| | | </el-form-item> |
| | | </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-col :span="6"> |
| | | <el-form-item label="要求到达日期" prop="HDataForRequestedArrived"> |
| | | <el-date-picker v-model="form.HDataForRequestedArrived" type="date" |
| | | placeholder="选择要求到达日期" format="yyyy-MM-dd hh:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="要求提货日期" prop="HDateForRequestedPick"> |
| | | <el-date-picker v-model="form.HDateForRequestedPick" type="date" |
| | | placeholder="选择要求提货日期" format="yyyy-MM-dd hh:mm:ss"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </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-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="车辆" prop="HCarName"> |
| | | <el-input v-model="form.HCarName" placeholder="请输入车辆" disabled> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(14)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="司机" prop="HDriverName"> |
| | | <el-input v-model="form.HDriverName" placeholder="请输入司机" disabled> |
| | | <el-button slot="append" icon="el-icon-search" |
| | | @click="openDataDialog(15)"></el-button> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="财务信息" name="third"> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <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-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="运费" prop="HMoney"> |
| | | <el-input v-model="form.HMoney" placeholder="请输入运费" disabled /> |
| | | </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> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核算人" prop="HSurer_Accounting"> |
| | | <el-input v-model="form.HSurer_Accounting" placeholder="请输入核算人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="核算时间" prop="HDate_Accounting"> |
| | | <el-date-picker v-model="form.HDate_Accounting" type="date" |
| | | format="yyyy-MM-dd hh:mm:ss" placeholder="选择核算时间" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="物流信息" name="forth"> |
| | | <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="申请中"></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-col :span="6"> |
| | | <el-form-item label="分配司机日期" prop="HDate_AllocationDriver"> |
| | | <el-date-picker v-model="form.HDate_AllocationDriver" type="date" |
| | | placeholder="选择分配司机日期" format="yyyy-MM-dd hh:mm:ss" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="到厂确认人" prop="HSurer_Arrive"> |
| | | <el-input v-model="form.HSurer_Arrive" placeholder="请输入到厂确认人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="提货确认人" prop="HSurer_Pick"> |
| | | <el-input v-model="form.HSurer_Pick" placeholder="请输入提货确认" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="出厂运输确认人" prop="HSurer_Trans"> |
| | | <el-input v-model="form.HSurer_Trans" placeholder="请输入到厂确认人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="签收确认人" prop="HSurer_Receive"> |
| | | <el-input v-model="form.HSurer_Receive" placeholder="请输入签收确认人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <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> |
| | | </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> |
| | | </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> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="签收确认时间" prop="HDate_Receive"> |
| | | <el-date-picker v-model="form.HDate_Receive" type="date" |
| | | format="yyyy-MM-dd hh:mm:ss" placeholder="选择签收确认时间" disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="制单信息" name="fifth"> |
| | | <div class="form-group"> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="制单人" prop="HMaker"> |
| | | <el-input v-model="form.HMaker" placeholder="请输入制单人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="修改人" prop="HUpDater"> |
| | | <el-input v-model="form.HUpDater" placeholder="请输入修改人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="审核人" prop="HChecker"> |
| | | <el-input v-model="form.HChecker" placeholder="请输入审核人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="关闭人" prop="HCloseMan"> |
| | | <el-input v-model="form.HCloseMan" placeholder="请输入关闭人" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <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> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="修改日期" prop="HUpDateDate"> |
| | | <el-date-picker v-model="form.HUpDateDate" type="date" placeholder="选择审核日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </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> |
| | | </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> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="6"> |
| | | <el-form-item label="作废人" prop="HDeleteMan"> |
| | | <el-input v-model="form.HDeleteMan" placeholder="请输入作废人" disabled /> |
| | | </el-form-item> |
| | | |
| | | </el-col> |
| | | <el-col :span="6"> |
| | | <el-form-item label="作废日期" prop="HDeleteDate"> |
| | | <el-date-picker v-model="form.HDeleteDate" type="date" placeholder="选择作废日期" |
| | | disabled> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-card class="box-card"> |
| | | <div slot="header" class="clearfix"> |
| | | <span>检验项信息</span> |
| | | <span>运单明细</span> |
| | | </div> |
| | | <div> |
| | | <div style="margin-bottom: 10px;"> |
| | |
| | | @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(8, scope.row)" |
| | | @dblclick.native="openDataDialog(8, scope.row)" /> |
| | | @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.HMouldLength }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column 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"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldHeight }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="折叠高度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldFoldHeight }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column 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"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HMouldQty" :min="0" style="width: 90px;" |
| | | controls-position="right"></el-input-number> |
| | | </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 v-if="false" align="center" label="标准包装数量" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HSNP }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <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: 150px;" |
| | | controls-position="right" |
| | | @change="changeHMouldQty(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.HStandardQtyForMouldInPack }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <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"> |
| | | <span>{{ scope.row.HVolume }}</span> |
| | | <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"> |
| | | <template slot-scope="scope">{{ scope.row.HScatteredVolume }} |
| | | <!-- <el-input-number v-model="scope.row.HScatteredVolume" :min="0" style="width: 90px;" |
| | | controls-position="right"></el-input-number> --> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="false" align="center" label="容器长度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <el-input-number v-model="scope.row.HScatteredVolume" :min="0" style="width: 90px;" |
| | | controls-position="right"></el-input-number> |
| | | <span>{{ scope.row.HMouldLength }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <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 v-if="false" align="center" label="容器高度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldHeight }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="false" align="center" label="折叠高度" width="120"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.HMouldFoldHeight }}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column align="center" label="操作" width="55" fixed="right"> |
| | |
| | | :propsHOrgID="form.HOrgID" v-if="xsSeOutStockBillShow" /> |
| | | <GyCustomer @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyCustomerShow" /> |
| | | <GySupplier @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gySupplierShow" /> |
| | | <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :volume="form.HCarTypeMaxVolume" v-if="gyCartypeShow" /> |
| | | <GyCartype @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" |
| | | :volume="form.HCarTypeMaxVolume" v-if="gyCartypeShow" /> |
| | | <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" /> |
| | | <GyMould @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="gyMouldShow" /> |
| | | <AreaDialog @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" :HBeginAddrName="form.HBeginAddrName" :HEndAddrName="form.HEndAddrName" v-if="AreaDialogShow" /> |
| | | 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" /> |
| | | <AreaDialog @deptEmitDb="dbEmitData" @deptEmit="emitData" :openPage="HModName" v-if="AreaDialogShow" /> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="deptClickSub">确 定</el-button> |
| | | <el-button @click="deptClose">取 消</el-button> |
| | |
| | | import GyCar from "@/views/basic/gyCar/gyCarList.vue" |
| | | import GyDriver from "@/views/system/user/GyDriver.vue" |
| | | import ContractTransport from "@/views/basic/gytransport/cgContractTransportBillList/Cg_ContractTransportBillList.vue" |
| | | import GyMould from '@/views/scMould/basicModeling/Gy_MouldFileList.vue' |
| | | import GyMaterialPackingRelation from '@/views/scMould/basicModeling/Gy_MaterialPackingRelationList.vue' |
| | | import AreaDialog from "@/views/component/AreaDialog" |
| | | |
| | | export default { |
| | | name: 'SellOutBill', |
| | | components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMould, AreaDialog }, |
| | | name: 'Add_Edit_WL_YayBill.vue', |
| | | components: { Dept, Warehouse, Material, RowSettings, XsSeOutStockBill, GyCustomer, GySupplier, GyCartype, GyCar, GyDriver, ContractTransport, GyMaterialPackingRelation, AreaDialog }, |
| | | props: { |
| | | OperationType: { type: Number, }, |
| | | linterid: { type: Number, }, |
| | |
| | | gyCarShow: false, //车辆数据组件显示标记 |
| | | gyDriverShow: false, //司机数据组件显示标记 |
| | | ContractTransportShow: false, //承运合同数据组件显示标记 |
| | | gyMouldShow: false, //容器数据组件显示标记 |
| | | gyMaterialPackingRelationShow: false, //容器数据组件显示标记 |
| | | AreaDialogShow: false, //目的地数据组件显示标记 |
| | | deptform: {}, //弹窗选中数据 |
| | | areaType: '',//地区选择类型 |
| | | |
| | | temp: undefined, //临时变量 |
| | | btResList: [], // 列设置 |
| | | transportList: [], //运输线路选择列表 |
| | | transTypeList: [], |
| | | HCarTypeNameList: [], |
| | | form: {}, // 表单参数 |
| | | rules: { // 表单校验 |
| | | HCarrierName: [ |
| | |
| | | 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" } |
| | | ], |
| | | HContractTransportBillNo: [ |
| | | { required: true, message: "承运合同不能为空", trigger: "blur" } |
| | | ], |
| | | HTransType: [ |
| | | { required: true, message: "运输方式不能为空", trigger: "blur" } |
| | | ], |
| | | HTransportLineName: [ |
| | | { required: true, message: "运输线路不能为空", trigger: "blur" } |
| | | ] |
| | | }, |
| | | |
| | |
| | | // 下面的代码会导致页面崩溃,先注释掉 |
| | | // this.$destroy() |
| | | }, |
| | | |
| | | methods: { |
| | | //#region 表单数据初始化 |
| | | getdata() { |
| | |
| | | } |
| | | else if (this.OperationType == 3 || this.copyType == 1) { |
| | | this.handleUpdate() |
| | | } |
| | | else if (this.OperationType == 4) { |
| | | this.zzSelDis = true |
| | | this.handleAdd() |
| | | var data = this.getUrlVars_JSON(); |
| | | var dataArray = []; |
| | | for (var i = 0; i < data.length; i++) { |
| | | // this.getPushSourceBillInit(data[i].hmainid, data[i].hsubid); |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | params: { |
| | | "HInterID": data[i].hmainid |
| | | , "HSubID": data[i].hsubid |
| | | }, |
| | | }).then(response => { |
| | | let result = response.data |
| | | if (result.code == 1) { // 说明验证成功了, |
| | | this.temp = result.data[0]; |
| | | } else { |
| | | this.temp = result.data; |
| | | } |
| | | if (this.temp) { |
| | | dataArray.push(this.temp); |
| | | this.form.HDeptID = dataArray[0].HDeptID |
| | | this.form.HDeptName = dataArray[0].部门 |
| | | this.form.HEmpID = dataArray[0].HEmpID |
| | | this.form.HEmpName = dataArray[0].业务员 |
| | | this.form.HManagerID = dataArray[0].HManagerID |
| | | this.form.HManagerName = dataArray[0].主管 |
| | | this.form.HMainSourceInterID = "0" |
| | | this.form.HMainSourceEntryID = "0" |
| | | this.form.HMainSourceBillNo = "" |
| | | this.form.HMainSourceBillType = dataArray[0].HBillType |
| | | this.form.HSupID = dataArray[0].HCusID |
| | | this.form.HSupName = dataArray[0].客户 |
| | | this.form.HLinkMan = dataArray[0].联系人 |
| | | this.form.HLinkPhone = dataArray[0].联系电话 |
| | | this.form.HSellSID = dataArray[0].HSellSID |
| | | this.form.HSellSName = dataArray[0].销售方式 |
| | | this.form.HCurID = dataArray[0].HCurID |
| | | this.form.HCurName = dataArray[0].币别 |
| | | this.form.HExRate = dataArray[0].汇率 |
| | | for (var i = 0; i < dataArray.length; i++) { |
| | | this.editData.push( |
| | | { |
| | | "HMaterID": dataArray[i].HMaterID |
| | | , "物料代码": dataArray[i].物料代码 |
| | | , "物料名称": dataArray[i].物料名称 |
| | | , "规格型号": dataArray[i].规格型号 |
| | | , "HUnitID": dataArray[i].HUnitID |
| | | , "计量单位": dataArray[i].计量单位 |
| | | , "HQtyMust": dataArray[i].数量.toFixed(6) |
| | | , "HQty": dataArray[i].数量.toFixed(6) |
| | | , "HPieceQty": "0" |
| | | , "HPrice": dataArray[i].单价.toFixed(4) |
| | | , "HTaxPrice": dataArray[i].实际含税单价.toFixed(4) |
| | | , "HTaxRate": dataArray[i].税率 |
| | | , "HMoney": dataArray[i].金额.toFixed(2) |
| | | , "HTaxMoney": dataArray[i].价税合计.toFixed(2) |
| | | , "HWHID": dataArray[i].HWHID |
| | | , "发货仓库": dataArray[i].HWHName |
| | | , "HRemark": "" |
| | | , "HQty_Full": "0" |
| | | , "HQty_Empty": "0" |
| | | , "HQty_Back": "0" |
| | | , "HCostPrice": "0" |
| | | , "HCostMoney": "0" |
| | | , "HSalePrice": "0" |
| | | , "HSeOrderInterID": dataArray[i].hmainid |
| | | , "HSeOrderEntryID": dataArray[i].hsubid |
| | | , "HSeOrderBillNo": dataArray[i].单据号 |
| | | , "HSourceInterID": dataArray[i].hmainid |
| | | , "HSourceEntryID": dataArray[i].hsubid |
| | | , "HSourceBillNo": dataArray[i].单据号 |
| | | , "HSourceBillType": dataArray[i].HBillType |
| | | , "HRelationQty": "0" |
| | | , "HRelationMoney": "0" |
| | | , 'HSPID': "0" |
| | | , 'HSPName': "" |
| | | , 'HSPGroupID': "0" |
| | | , "HSPGroupName": "" |
| | | , 'HSCWHID': "0" |
| | | , 'HSCWHName': "" |
| | | , 'HSCSPID': "0" |
| | | , 'HSCSPName': "" |
| | | , 'HBatchNo': "" |
| | | , 'HPOOrderInterID': "0" |
| | | , 'HPOOrderEntryID': "0" |
| | | , 'HPOOrderBillNo': "" |
| | | , 'HPropertyID': "0" |
| | | , 'HPropertyName': "" |
| | | , 'HSecUnitID': "0" |
| | | , 'HSecUnitName': "" |
| | | , 'HSecUnitRate': "0" |
| | | , 'HEngineNum': "" |
| | | , 'HUnderPanNum': "" |
| | | , 'HLeaveFactCard': "" |
| | | , 'HReqBuyQty': "0" |
| | | , 'HReqOutQty': "0" |
| | | , 'HCurrentInventory': "0" |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | this.$nextTick(() => { |
| | | this.formShow = true |
| | | this.formLoading = false |
| | | }) |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | } |
| | | }, |
| | | //#endregion |
| | |
| | | HPickAddr: "", |
| | | HArriverAddr: "", |
| | | HTransType: "", |
| | | HTransportLineName: "", |
| | | HCarTypeID: 0, |
| | | HCarTypeName: "", |
| | | HCarTypeMaxVolume: 0, |
| | |
| | | }) |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 编辑页面初始化 |
| | | handleUpdate() { |
| | | this.reset() |
| | | let rowHmainid = this.linterid |
| | | axios.get(this.$baseUrl + "/Kf_POStockInBill/cx", { |
| | | params: { 'HInterID': rowHmainid } |
| | | axios.get(this.baseURL + "/WLYayBillController/WL_YayBillDetail", { |
| | | params: { 'HID': rowHmainid } |
| | | }).then(response => { |
| | | console.log(response.data.data.h_v_WL_YayBillEdit) |
| | | if (response.data.code == 1) { |
| | |
| | | this.form.HSurer_Accounting = data.核算人 |
| | | this.form.HDate_Accounting = data.核算时间 |
| | | } |
| | | this.form.HOrgID = data.HOrgID.toString() |
| | | this.form.HOrgID = data.HOrgID |
| | | this.form.HExRate = !data.汇率 ? 0 : data.汇率 |
| | | this.form.HMainSourceInterID = data.HMainSourceInterID |
| | | this.form.HMainSourceEntryID = data.HMainSourceEntryID |
| | |
| | | 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.车型名称 |
| | | this.form.HCarTypeMaxVolume = data.车型最大容积 |
| | | this.form.HTotalVolume = data.总体积 |
| | | this.form.HLoadingRate = data.装载率 |
| | | this.form.HLoadingRate = (data.装载率 * 100).toFixed(2) + '%' |
| | | this.form.HContractTransportInterID = data.承运合同ID |
| | | this.form.HContractTransportEntryID = data.承运合同子ID |
| | | this.form.HContractTransportBillNo = data.承运合同单据号 |
| | |
| | | this.form.HCarName = data.车辆名称 |
| | | this.form.HDriverID = data.司机ID |
| | | this.form.HDriverName = data.司机名称 |
| | | |
| | | this.form.HTransportLineName = data.运输路线名称 |
| | | //子表 赋值 |
| | | for (var i = 0; i < result.data.length; i++) { |
| | | var qty = parseFloat(result.data[i].HQty) || 0; |
| | |
| | | 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.formShow = true |
| | | this.formLoading = false |
| | | |
| | | // 加载运输线路、运输类型、车型列表 |
| | | if (this.form.HContractTransportInterID) { |
| | | this.loadTransportData() |
| | | } |
| | | |
| | | // 加载已上传的文件列表 |
| | | this.getFileList(); |
| | |
| | | this.dialogTitle = '客户列表' |
| | | this.gyCustomerShow = true |
| | | this.openData = true |
| | | } else if (num == 8) { |
| | | this.dialogTitle = '容器列表' |
| | | this.gyMouldShow = true |
| | | this.openData = true |
| | | } else if (num == 12) { |
| | | this.dialogTitle = '源单列表' |
| | | this.xsSeOutStockBillShow = true |
| | |
| | | this.gyCarShow = true |
| | | this.openData = true |
| | | } else if (num == 15) { |
| | | this.dialogTitle = '车辆列表' |
| | | this.dialogTitle = '司机列表' |
| | | this.gyDriverShow = true |
| | | this.openData = true |
| | | } else if (num == 16) { |
| | | this.dialogTitle = '承运合同列表' |
| | | this.ContractTransportShow = true |
| | | this.openData = true |
| | | } else if (num == 17) { |
| | | this.dialogTitle = '产品包装容器关联信息表' |
| | | this.gyMaterialPackingRelationShow = true |
| | | this.openData = true |
| | | } |
| | | }, |
| | |
| | | this.gyCartypeShow = false |
| | | this.gyCarShow = false |
| | | this.gyDriverShow = false |
| | | this.AreaDialogShow = false |
| | | this.ContractTransportShow = false |
| | | this.gyMouldShow = false |
| | | this.gyMaterialPackingRelationShow = false |
| | | }, |
| | | //#endregion |
| | | //#endregion |
| | |
| | | this.form.HCusID = deptRow.HItemID |
| | | this.gyCustomerShow = false |
| | | this.openData = false |
| | | } else if (num == 8) { |
| | | console.log(deptRow) |
| | | this.editData[this.zbIndex].HMouldID = deptRow.hmainid |
| | | this.editData[this.zbIndex].HMouldNumber = deptRow.模具编号 |
| | | this.editData[this.zbIndex].HMouldName = deptRow.模具名称 |
| | | this.editData[this.zbIndex].HMouldLength = deptRow.长 |
| | | this.editData[this.zbIndex].HMouldWidth = deptRow.宽 |
| | | this.editData[this.zbIndex].HMouldFoldHeight = deptRow.折叠高度 |
| | | this.gyMouldShow = false |
| | | this.openData = false |
| | | } else if (num == 12) { |
| | | // 使用异步方式处理源单数据 |
| | | this.processSourceDataAsync(deptRow); |
| | |
| | | this.calculateLoadingRate(parseFloat(this.form.HTotalVolume || 0)); |
| | | this.gyCartypeShow = false |
| | | this.openData = false |
| | | this.checkAndCallGetTransCost() |
| | | } else if (num == 14) { |
| | | this.form.HCarName = deptRow.车辆名称 |
| | | this.form.HCarID = deptRow.HItemID |
| | |
| | | this.gyDriverShow = false |
| | | this.openData = false |
| | | } else if (num == 16) { |
| | | console.log(deptRow) |
| | | this.form.HContractTransportBillNo = deptRow.单据号 |
| | | this.form.HContractTransportInterID = deptRow.HInterID |
| | | this.form.HContractTransportEntryID = deptRow.HInterID |
| | | this.form.HDistance = deptRow.距离 |
| | | this.form.HTransportTimes = deptRow.运输时效 |
| | | this.form.HTransportTyep = deptRow.运输类型 |
| | | this.form.HSSID = deptRow.结算方式 |
| | | this.form.HSSName = deptRow.结算方式名称 |
| | | this.form.HCurID = deptRow.币别 |
| | | this.form.HCurName = deptRow.币别名称 |
| | | this.form.HMoney = deptRow.运输费用 |
| | | this.form.HExRate = deptRow.汇率 == null ? 0 : deptRow.汇率 |
| | | this.form.HCarrierID = deptRow.HSupID |
| | | this.form.HCarrierName = deptRow.供应商名称 |
| | | this.transportList = [] |
| | | this.transTypeList = [] |
| | | this.HCarTypeNameList = [] |
| | | axios.get(this.$baseUrl + '/WLYayBillController/initDataForSelectContractTransportBill', { |
| | | params: { |
| | | "hmainid": deptRow.HInterID, |
| | | }, |
| | | }).then(res => { |
| | | let response = res.data |
| | | if (response.code == 1) { |
| | | if (response.data.length == 0) { |
| | | this.$modal.msgError("请检查【" + this.form.HContractTransportBillNo + "】对应的承运合同是否维护!!!"); |
| | | this.form.HMoney = 0 |
| | | return |
| | | } |
| | | this.form.HCarrierID = response.data[0].HSupID |
| | | this.form.HCarrierName = response.data[0].供应商名称 |
| | | this.form.HCurID = response.data[0].币别 |
| | | this.form.HCurName = response.data[0].货币名称 |
| | | this.form.HExRate = response.data[0].汇率 == null ? 0 : response.data[0].汇率 - 0 |
| | | this.form.HSSID = response.data[0].结算方式 |
| | | this.form.HSSName = response.data[0].结算方式名称 |
| | | this.transportList = [...new Set(response.data.map(item => item.运输路线名称))] |
| | | // this.checkAndCallGetTransCost() |
| | | } else { |
| | | this.$modal.msgError("错误:" + response.data.code + response.data.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | this.ContractTransportShow = false |
| | | this.openData = false |
| | | } else if (num == 17) { |
| | | console.log(deptRow) |
| | | this.editData[this.zbIndex].HMouldID = deptRow.hmainid |
| | | this.editData[this.zbIndex].HMouldNumber = deptRow.容器代码 |
| | | this.editData[this.zbIndex].HMouldName = deptRow.容器名称 |
| | | this.editData[this.zbIndex].HMouldLength = deptRow.长度 |
| | | this.editData[this.zbIndex].HMouldWidth = deptRow.宽度 |
| | | this.editData[this.zbIndex].HMouldHeight = deptRow.高度 |
| | | this.editData[this.zbIndex].HMouldFoldHeight = deptRow.折叠高度 |
| | | this.editData[this.zbIndex].HSNP = deptRow.容器包装产品数量 |
| | | this.editData[this.zbIndex].HVolume = (this.editData[this.zbIndex].HMouldLength * this.editData[this.zbIndex].HMouldWidth * this.editData[this.zbIndex].HMouldHeight * this.editData[this.zbIndex].HMouldQty).toFixed(2) - 0 |
| | | this.form.HTotalVolume = 0 |
| | | this.editData.map(item => { |
| | | this.form.HTotalVolume = Number(item.HVolume) + this.form.HTotalVolume |
| | | }) |
| | | this.editData[this.zbIndex].HMouldQty = Math.ceil(this.editData[this.zbIndex].HQty / this.editData[this.zbIndex].HSNP) |
| | | this.gyMaterialPackingRelationShow = false |
| | | this.openData = 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]["汇率"] |
| | | // 检查是否所有记录属于同一客户 |
| | | 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({ |
| | | 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', { |
| | | 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]; |
| | | |
| | | // 查找该物料ID对应的包装容器信息 |
| | | var materialInfo = null; |
| | | for (var i = 0; i < res.length; i++) { |
| | | if (res[i].HMaterID == materialId) { |
| | | materialInfo = res[i]; |
| | | // 为每个源单行创建一条记录 |
| | | 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; |
| | | } |
| | | } |
| | | |
| | | 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); |
| | | |
| | | 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, |
| | | }); |
| | | } |
| | | 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; |
| | | |
| | |
| | | //改为异步方法,返回Promise |
| | | async getPushSeOutStockBillInit(HSourceInterID, HSourceEntryID) { |
| | | try { |
| | | const response = await axios.get(this.$baseUrl + '/Kf_SellOutBill/loadXs_SeOutStockBill_Push', { |
| | | const response = await axios.get(this.baseURL + '/Kf_SellOutBill/loadXs_SeOutStockBill_Push', { |
| | | params: { |
| | | "HInterID": HSourceInterID, |
| | | "HSubID": HSourceEntryID |
| | |
| | | return null; |
| | | } |
| | | }, |
| | | //#endregion |
| | | //#region 工具栏按钮操作 |
| | | //#region 编辑提交保存 |
| | | submitForm() { |
| | | this.$refs["form"].validate(valid => { |
| | | if (valid) { |
| | | let fhck = false |
| | | this.editData.map((item, index) => { |
| | | if (!item.发货仓库) { |
| | | fhck = true |
| | | this.$modal.msgError("第" + (index + 1) + "行:发货仓库未选择!"); |
| | | this.form.HCarryStatus = 0; |
| | | var loadingRate = this.form.HLoadingRate; |
| | | if (loadingRate && typeof loadingRate === 'string') { |
| | | this.form.HLoadingRate = parseFloat(loadingRate.replace('%', '')) / 100; |
| | | } |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | // var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] |
| | | console.log(sMainSub) |
| | | axios({ |
| | | method: 'post', |
| | | url: this.baseURL + "/WLYayBillController/SaveBill", |
| | | data: { |
| | | 'msg': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | this.close() |
| | | } else { |
| | | this.$modal.msgError(response.data.Message) |
| | | } |
| | | }) |
| | | this.$nextTick(() => { |
| | | if (!fhck) { |
| | | var sMainStr = JSON.stringify(this.form); |
| | | var sSubStr = JSON.stringify(this.editData); |
| | | var sMainSub = sMainStr + ';' + sSubStr + ';' + sessionStorage["HUserName"] + ';' + this.OperationType; |
| | | axios({ |
| | | method: 'post', |
| | | url: this.$baseUrl + "/Kf_SellOutBill/SaveSellOutBillList", |
| | | data: { |
| | | 'msg': sMainSub |
| | | }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.subDisabled = true//设置保存按钮不可用 |
| | | this.$modal.msgSuccess(response.data.Message); |
| | | this.get_MAXNum_Task(1);//设置流水号增加 |
| | | if (response.data.Verify == "Y") //自动审核 |
| | | { |
| | | this.set_CheckBill(0, this.form); //审核 |
| | | } |
| | | this.addBtnShow = true |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | } |
| | | }) |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | |
| | | } |
| | | }); |
| | | }, |
| | |
| | | set_CheckBill(num, form) { |
| | | var InterID = form.hmainid || form.HInterID |
| | | //逻辑审核方法 |
| | | axios.get(this.$baseUrl + "/Kf_SellOutBill/AuditKf_SellOutBill", { |
| | | axios.get(this.baseURL + "/Kf_SellOutBill/AuditKf_SellOutBill", { |
| | | params: { "HInterID": InterID, "IsAudit": num, "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let result = response.data |
| | |
| | | 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 |
| | | this.editData.push(copyRow); |
| | | } |
| | | }, |
| | |
| | | this.editData = editData.filter(function (item) { |
| | | return checkedSysZb.indexOf(item.index) == -1 |
| | | }); |
| | | this.form.HTotalVolume = 0 |
| | | if (this.editData.length > 0) { |
| | | this.editData.map(item => { |
| | | this.form.HTotalVolume = Number(item.HVolume) + this.form.HTotalVolume |
| | | }) |
| | | } |
| | | } |
| | | }, |
| | | //#endregion |
| | |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 组织下拉列表数据初始化 |
| | | fetchData() { |
| | | axios.get(this.$baseUrl + "/Web/GetOrganizations", { |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | | this.organizationList = response.data.data;//组织列表 |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | //#endregion |
| | | |
| | | //#region 获取内码、单据号 |
| | | getHBillNo() { |
| | | axios.get(this.$baseUrl + "/WEBSController/GetMaxBillNoAndID_Json", { |
| | | axios.get(this.baseURL + "/Web/GetMAXNum", { |
| | | params: { |
| | | HBillType: '3321' |
| | | } |
| | |
| | | var sql = `exec h_p_Xt_GetMaxBillNo_SubType '1201','${this.form.HDate}',0,0,0,'${Type}','${this.form.HDeptID}'`; |
| | | axios({ |
| | | method: 'get', |
| | | url: this.$baseUrl + "/CommonModel/searchMethod", |
| | | url: this.baseURL + "/CommonModel/searchMethod", |
| | | params: { "sql": sql, "user": sessionStorage["HUserName"], "ModRightNameCheck": "" }, |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | |
| | | |
| | | //#region 根据用户获取对应职员、部门、销售主管 |
| | | getCzyglByUser() { |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/getCzyglByUser', { |
| | | axios.get(this.baseURL + '/Xs_SeOrderBill/getCzyglByUser', { |
| | | params: { "CurUserName": sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | let dataForm = response.data.data[0] |
| | |
| | | |
| | | //#region 根据客户获取客户余额 |
| | | getCustomerBalance(HCusID) { |
| | | axios.get(this.$baseUrl + '/Xs_CusRatingChangeBill/getCustomerBalance', { |
| | | axios.get(this.baseURL + '/Xs_CusRatingChangeBill/getCustomerBalance', { |
| | | params: { "HCusID": HCusID, 'CurUserName': sessionStorage["HUserName"] } |
| | | }).then(response => { |
| | | var data = response.data.data[0]; |
| | |
| | | |
| | | //#region 根据客户带出联系人、联系电话 |
| | | getCustomerByCusID(HCusID) { |
| | | axios.get(this.$baseUrl + "/Xs_SeOrderBill/getCustomerByCusID", { |
| | | axios.get(this.baseURL + "/Xs_SeOrderBill/getCustomerByCusID", { |
| | | params: { |
| | | HCusID: HCusID |
| | | } |
| | |
| | | |
| | | //#region 获取销售出库单对应的条码明细 |
| | | getBarCodeNoteBySellOutBill(rowHmainid) { |
| | | axios.get(this.$baseUrl + '/Kf_SellOutBill/BarCodeNote', { |
| | | axios.get(this.baseURL + '/Kf_SellOutBill/BarCodeNote', { |
| | | params: { "HInterID": rowHmainid } |
| | | }).then(response => { |
| | | if (response.data.count == 1) { |
| | |
| | | |
| | | //#region 根据主内码与子内码获取源单销售订单数据 |
| | | getPushSourceBillInit(HSourceInterID, HSourceEntryID) { |
| | | axios.get(this.$baseUrl + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | axios.get(this.baseURL + '/Xs_SeOrderBill/loadXs_SeOrderBill_Push', { |
| | | params: { |
| | | "HInterID": HSourceInterID |
| | | , "HSubID": HSourceEntryID |
| | |
| | | }); |
| | | }, |
| | | //#endregion |
| | | //#region 包装容器数量计算体积 |
| | | changeHMouldQty(row) { |
| | | this.zbIndex = row.index - 1 |
| | | |
| | | 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 { |
| | | if (standardQty === 0) { |
| | | this.$message.warning('容器数量/托为0,托数将被设置为0'); |
| | | } |
| | | } |
| | | |
| | | if (!HPackQty || HPackQty == 'Infinity') { |
| | | this.editData[row.index - 1].HPackQTY = 0; |
| | | } else { |
| | | this.editData[row.index - 1].HPackQTY = HPackQty; |
| | | } |
| | | |
| | | this.changeHPackQty(row); |
| | | }, |
| | | //#endregion |
| | | //#region 托数计算体积 |
| | | changeHPackQty(row) { |
| | | this.zbIndex = row.index - 1 |
| | | |
| | | 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; |
| | | }); |
| | | this.calculateLoadingRate(parseFloat(this.form.HTotalVolume || 0)); |
| | | }, |
| | | //#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 |
| | | // 计算装载率函数 |
| | | calculateLoadingRate(totalVolume) { |
| | | var maxVolume = parseFloat(this.form.HCarTypeMaxVolume) || 0; |
| | |
| | | //#endregion |
| | | checkTotalQtyExceed(selRow) { |
| | | var tableData = this.editData |
| | | console.log(tableData) |
| | | if (!tableData || tableData.length === 0) return; |
| | | var sourceQtyMap = {}; |
| | | var currentQtyMap = {}; |
| | |
| | | } |
| | | } |
| | | }); |
| | | |
| | | tableData.forEach(function (row) { |
| | | if (row.HSourceInterID && row.HSourceEntryID) { |
| | | var key = row.HSourceInterID + '_' + row.HSourceEntryID; |
| | |
| | | }); |
| | | } |
| | | } |
| | | console.log(exceedSources) |
| | | |
| | | if (exceedSources.length > 0) { |
| | | let num = null |
| | | var message = '物料数量之和超过源单数量:'; |
| | | exceedSources.forEach(function (item, index) { |
| | | num = item.sourceQty |
| | | message += (index + 1) + '. 源单号:' + item.sourceBillNo + |
| | | ',源单数量:' + item.sourceQty + |
| | | ',当前数量:' + item.currentTotal; |
| | | }); |
| | | |
| | | }); |
| | | this.$nextTick(() => { |
| | | this.editData[selRow.index - 1].HQty = num |
| | | this.changeHMouldQty(selRow) |
| | | }) |
| | | this.$modal.msgError(message); |
| | | return true; // 表示有超出 |
| | | } |
| | | 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; |
| | | } else { |
| | | this.editData[selRow.index - 1].HMouldQty = MouldQty; |
| | | } |
| | | } else { |
| | | 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; |
| | | } else { |
| | | this.editData[selRow.index - 1].HPackQTY = HPackQTY; |
| | | } |
| | | } else { |
| | | if (standardQtyForMouldInPack === 0) { |
| | | warningMessages.push('容器数量/托为0,托数将被设置为0'); |
| | | } |
| | | 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; |
| | | if (!HVolume) { |
| | | this.editData[selRow.index - 1].HVolume = 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; // 表示没有超出 |
| | | }, |
| | |
| | | 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对象 |
| | | const formData = new FormData(); |
| | |
| | | formData.append('HRemark', ''); |
| | | formData.append('HUserName', sessionStorage["HUserName"]); |
| | | // 设置上传URL |
| | | this.uploadUrl = this.$baseUrl + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | this.uploadUrl = this.baseURL + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | // 发送上传请求 |
| | | axios.post(this.uploadUrl, formData, { |
| | | headers: { |
| | |
| | | formData.append('HUserName', sessionStorage.getItem('HUserName') || ''); |
| | | |
| | | // 设置上传URL |
| | | this.uploadUrl = this.$baseUrl + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | this.uploadUrl = this.baseURL + '/Gy_QCVerificationBillMain/UploadFile_Gy_QCVerification'; |
| | | |
| | | // 发送上传请求 |
| | | axios.post(this.uploadUrl, formData, { |
| | |
| | | }); |
| | | }, |
| | | |
| | | // 加载运输相关数据 |
| | | loadTransportData() { |
| | | axios.get(this.$baseUrl + '/WLYayBillController/initDataForSelectContractTransportBill', { |
| | | params: { |
| | | "hmainid": this.form.HContractTransportInterID, |
| | | }, |
| | | }).then(res => { |
| | | let response = res.data |
| | | if (response.code == 1) { |
| | | // 运输线路去重 |
| | | this.transportList = [...new Set(response.data.map(item => item.运输路线名称))] |
| | | // this.$nextTick(()=>{ |
| | | |
| | | // }) |
| | | this.getTransCost('line') |
| | | this.getTransCost('type') |
| | | this.getTransCost('car') |
| | | |
| | | |
| | | // // 运输类型去重 |
| | | // this.transTypeList = [...new Set(response.data.map(item => item.运输类型))] |
| | | |
| | | // // 车型去重 |
| | | // const carTypeMap = new Map() |
| | | // response.data.forEach(item => { |
| | | // const key = item.运输方式名称 |
| | | // if (!carTypeMap.has(key)) { |
| | | // carTypeMap.set(key, { value: item.运输方式名称, id: item.运输方式 }) |
| | | // } |
| | | // }) |
| | | // this.HCarTypeNameList = Array.from(carTypeMap.values()) |
| | | } else { |
| | | this.$modal.msgError("错误:" + response.data.code + response.data.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | }, |
| | | // 获取已上传文件列表 |
| | | getFileList() { |
| | | }, |
| | |
| | | this.uploadFiles.splice(index, 1) |
| | | }, |
| | | //#endregion |
| | | //#endregion |
| | | //#endregion |
| | | checkTransportList() { |
| | | if (this.transportList.length === 0) { |
| | | this.$message.warning('请先选择承运合同') |
| | | } |
| | | }, |
| | | checkTransTypeList() { |
| | | if (this.transTypeList.length === 0) { |
| | | this.$message.warning('请先选择运输线路') |
| | | } |
| | | }, |
| | | checkHCarTypeNameList() { |
| | | if (this.HCarTypeNameList.length === 0) { |
| | | this.$message.warning('请先选择运输方式') |
| | | } |
| | | }, |
| | | transLineNameChange() { |
| | | this.form.HTransType = '' |
| | | this.form.HCarTypeName = '' |
| | | this.form.HCarTypeID = 0 |
| | | this.form.HContractTransportEntryID = 0 |
| | | this.form.HBeginAddrName = '' |
| | | this.form.HBeginAddr = 0 |
| | | this.form.HEndAddrName = '' |
| | | this.form.HEndAddr = 0 |
| | | this.form.HCarTypeMaxVolume = 0 |
| | | this.form.HDistance = 0 |
| | | this.form.HTransportTimes = '' |
| | | this.form.HTransportTyep = '' |
| | | this.form.HMoney = 0 |
| | | this.transTypeList = [] |
| | | this.HCarTypeNameList = [] |
| | | this.getTransCost('line') |
| | | }, |
| | | transTypeChange() { |
| | | this.form.HCarTypeName = '' |
| | | this.form.HCarTypeID = 0 |
| | | this.form.HContractTransportEntryID = 0 |
| | | this.form.HBeginAddrName = '' |
| | | this.form.HBeginAddr = 0 |
| | | this.form.HEndAddrName = '' |
| | | this.form.HEndAddr = 0 |
| | | this.form.HCarTypeMaxVolume = 0 |
| | | this.form.HDistance = 0 |
| | | this.form.HTransportTimes = '' |
| | | this.form.HTransportTyep = '' |
| | | this.form.HMoney = 0 |
| | | this.HCarTypeNameList = [] |
| | | this.getTransCost('type') |
| | | }, |
| | | transHCarChange(val) { |
| | | this.form.HContractTransportEntryID = 0 |
| | | this.form.HBeginAddrName = '' |
| | | this.form.HBeginAddr = 0 |
| | | this.form.HEndAddrName = '' |
| | | this.form.HEndAddr = 0 |
| | | this.form.HCarTypeMaxVolume = 0 |
| | | this.form.HDistance = 0 |
| | | this.form.HTransportTimes = '' |
| | | this.form.HTransportTyep = '' |
| | | this.form.HMoney = 0 |
| | | let item = this.HCarTypeNameList.find(item => item.id === val); |
| | | this.form.HCarTypeName = item.value |
| | | this.form.HCarTypeID = val |
| | | this.getTransCost('car') |
| | | }, |
| | | checkAndCallGetTransCost() { |
| | | const { HContractTransportBillNo, HCarTypeName, HTransType, HTransportLineName, HCarrierID } = this.form |
| | | |
| | | if (!HContractTransportBillNo) { |
| | | this.$message.warning('请先选择承运合同') |
| | | return |
| | | } |
| | | if (!HTransportLineName) { |
| | | this.$message.warning('请先选择运输线路') |
| | | return |
| | | } |
| | | if (!HTransType) { |
| | | this.$message.warning('请先选择运输方式') |
| | | return |
| | | } |
| | | if (!HCarTypeName) { |
| | | this.$message.warning('请先选择车型') |
| | | return |
| | | } |
| | | if (!HCarrierID) { |
| | | this.$message.warning('供应商不能为空') |
| | | return |
| | | } |
| | | this.getTransCost() |
| | | }, |
| | | getTransCost(val) { |
| | | axios.get(this.$baseUrl + '/WLYayBillController/getSelectContractTransportBillEntryData', { |
| | | params: { |
| | | Cg_ContractTransportBillInterID: this.form.HContractTransportInterID, |
| | | HSupID: this.form.HCarrierID, |
| | | HTransportLineName: this.form.HTransportLineName, |
| | | HCarTypeID: this.form.HCarTypeID, |
| | | HTransportTyep: this.form.HTransType, |
| | | }, |
| | | }).then(res => { |
| | | let response = res.data |
| | | if (response.code == 1) { |
| | | if (response.data.length == 0) { |
| | | this.$modal.msgError("未获取到指定承运合同数据,请检查【" + this.form.HCarrierName + '-' + this.form.HTransportLineName + '-' + this.form.HCarTypeName + '-' + this.form.HTransType + "】对应的承运合同是否维护!!!"); |
| | | this.form.HMoney = 0 |
| | | return |
| | | } |
| | | if (val == 'line') { |
| | | this.transTypeList = [...new Set(response.data.map(item => item.运输类型))] |
| | | } else if (val == 'type') { |
| | | const carTypeMap = new Map() |
| | | response.data.forEach(item => { |
| | | const key = item.运输方式名称 |
| | | if (!carTypeMap.has(key)) { |
| | | carTypeMap.set(key, { value: item.运输方式名称, id: item.运输方式 }) |
| | | } |
| | | }) |
| | | this.HCarTypeNameList = Array.from(carTypeMap.values()) |
| | | } else if (val == 'car') { |
| | | this.form.HContractTransportEntryID = response.data[0].HEntryID |
| | | this.form.HBeginAddrName = response.data[0].始发地名称 |
| | | this.form.HBeginAddr = response.data[0].始发地 |
| | | this.form.HEndAddrName = response.data[0].目的地名称 |
| | | this.form.HEndAddr = response.data[0].目的地 |
| | | this.form.HCarTypeMaxVolume = response.data[0].车型最大容积 |
| | | this.form.HDistance = response.data[0].距离 |
| | | this.form.HTransportTimes = response.data[0].运输时效 |
| | | this.form.HTransportTyep = response.data[0].运输类型 |
| | | this.form.HMoney = response.data[0].运输费用 |
| | | if (this.form.HMoney == 0) { |
| | | this.$modal.msgError("当前运费为0"); |
| | | } |
| | | } |
| | | } else { |
| | | this.$modal.msgError("错误:" + response.code + response.Message); |
| | | } |
| | | }).catch(error => { |
| | | this.$modal.msgError("接口请求失败!"); |
| | | }); |
| | | |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | .xsckdBox .el-date-editor.el-input { |
| | | width: 100%; |
| | | } |
| | | |
| | | .form-group { |
| | | border: 1px solid #ddd; |
| | | /* 灰色边框 */ |
| | | padding: 15px; |
| | | /* 内边距,让内容与边框有间距 */ |
| | | border-radius: 4px; |
| | | /* 可选圆角 */ |
| | | margin-bottom: 20px; |
| | | /* 保持原有的下边距 */ |
| | | } |
| | | </style> |