1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327 |
- <template>
- <div>
- <div class="customer-head">
- <div class="customer-back">
- <el-button
- type="danger"
- style="border: none;background: none;color: red"
- icon="el-icon-arrow-left"
- @click="backToList"
- >返回列表
- </el-button>
- </div>
- </div>
- <containerTitle
- title="起止地信息"
- style="margin-top: 50px"></containerTitle>
- <basic-container>
- <el-table
- ref="singleTable"
- :data="tableData"
- size="mini"
- :header-cell-style="{color:'#000',background:'#fafafa'}"
- style="width: 100%">
- <el-table-column
- property="date"
- align="center"
- width="40">
- <template slot-scope="scope">
- <span v-if="scope.$index == 0">
- <el-button type="primary" size="mini" circle>起</el-button>
- </span>
- <span v-else-if="scope.$index === tableData.length-1">
- <el-button type="success" size="mini" circle>止</el-button>
- </span>
- <span v-else>
- <el-button v-if="goodsForm.status === 1" type="warning" size="mini" circle>途</el-button>
- <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">
- <el-button type="danger" icon="el-icon-delete" size="mini" circle
- @click="deleteAddress(scope)"></el-button>
- </el-tooltip>
- </span>
- </template>
- </el-table-column>
- <el-table-column
- type="index"
- label="序号"
- align="center"
- width="60">
- </el-table-column>
- <el-table-column
- property="corpName"
- label="发货工厂"
- align="center"
- show-overflow-tooltip
- width="280">
- </el-table-column>
- <el-table-column
- property="province"
- label="省市区"
- align="center"
- width="280">
- <template slot-scope="scope">
- <el-cascader
- size="small"
- style="width: 100%;"
- v-model="scope.row.region"
- disabled
- :props="treeOption"></el-cascader>
- </template>
- </el-table-column>
- <el-table-column
- property="address"
- align="center"
- show-overflow-tooltip
- label="详细地址">
- <!-- <template slot-scope="scope">-->
- <!-- <el-input v-model="scope.row.address" size="small" placeholder="请输入内容"></el-input>-->
- <!-- </template>-->
- </el-table-column>
- </el-table>
- </basic-container>
- <containerTitle title="委托信息"></containerTitle>
- <basic-container>
- <avue-form :option="goodsOptionForm" v-model="goodsForm">
- <template slot-scope="scope" slot="corpId">
- <crop-select
- v-model="goodsForm.corpId"
- disabled
- ></crop-select>
- </template>
- <template slot-scope="scope" slot="agentId">
- <crop-select
- :disabled="goodsForm.status === 1"
- v-model="goodsForm.agentId"
- ></crop-select>
- </template>
- <template slot-scope="scope" slot="polId">
- <port-info
- v-model="goodsForm.polId"
- :disabled="goodsForm.status === 1"
- />
- </template>
- <template slot-scope="scope" slot="podId">
- <port-info
- v-model="goodsForm.polId"
- :disabled="goodsForm.status === 1"
- />
- </template>
- </avue-form>
- </basic-container>
- <containerTitle title="车辆信息"></containerTitle>
- <basic-container>
- <avue-crud
- :data="entrustList"
- @selection-change="selectionChange"
- :option="entrustOptionTwoT"
- ref="crudBoxTwo"
- v-if="KeyBoxTwo>0"
- @resetColumn="resetColumnBoxTwo"
- @saveColumn="saveColumnBoxTwo"
- @row-save="(row,done,loading)=>{rowSaveT(row,0,done,loading)}"
- @row-update="rowSaveWell">
- <template slot="menuLeft" slot-scope="{size}">
- <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling"
- :disabled="selectionList.length === 0">批量调度
- </el-button>
- </template>
- <template slot-scope="{row}" slot="fleetId">
- <crop-select
- v-if="row.$cellEdit"
- v-model="row.fleetId"
- @getCorpData="(data)=>{getfleetIdT(data,row)}"
- corpType="CD"
- ></crop-select>
- <span v-else>{{ row.fleetName }}</span>
- </template>
- <template slot-scope="{row,index}" slot="menu">
- <el-button
- type="text"
- size="small"
- v-if="row.status===0"
- @click="rowSaveT(row,index)"
- >{{ row.$cellEdit ? '保 存' : '修 改' }}
- </el-button>
- <el-button
- size="small"
- type="text"
- @click="designate(row, index)"
- v-if="row.status === 0"
- >调 度
- </el-button>
- <el-button
- size="small"
- type="text"
- @click="cancelDesignate(row, index)"
- v-if="row.status===1"
- >取消调度
- </el-button>
- <el-button
- size="small"
- type="text"
- @click="changeFleetT(row, index)"
- v-if="row.status===2||row.status===3"
- >变 更
- </el-button>
- <el-button
- size="small"
- type="text"
- @click="recordsOfChanges(row, index)"
- v-if="row.status > 1"
- >变更记录
- </el-button>
- </template>
- </avue-crud>
- </basic-container>
- <span>
- <!-- <containerTitle title="费用明细"></containerTitle>-->
- <!-- <basic-container>-->
- <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
- <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
- <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
- <!-- </el-tabs>-->
- <!-- <avue-crud-->
- <!-- v-if="activeIndex === '1'"-->
- <!-- :data="collectionList"-->
- <!-- :option="collectionOption"-->
- <!-- ref="collection"-->
- <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
- <!-- @row-update="rowSave"-->
- <!-- @row-del="makeDel">-->
- <!-- <template slot-scope="{row}" slot="corpId">-->
- <!-- <crop-select-->
- <!-- v-if="row.$cellEdit"-->
- <!-- v-model="row.corpId"-->
- <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
- <!-- ></crop-select>-->
- <!-- <span v-else>{{row.corpName}}</span>-->
- <!-- </template>-->
- <!-- <template slot-scope="{row}" slot="feeId">-->
- <!-- <breakdown-select-->
- <!-- v-if="row.$cellEdit"-->
- <!-- v-model="row.feeId"-->
- <!-- @selectValue="(value) => selectValue(value,row)"-->
- <!-- :configuration="breakConfiguration"-->
- <!-- >-->
- <!-- </breakdown-select>-->
- <!-- <span v-else>{{ row.feeName }}</span>-->
- <!-- </template>-->
- <!-- <template slot-scope="{row,index}" slot="menu">-->
- <!-- <el-button-->
- <!-- type="text"-->
- <!-- size="small"-->
- <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
- <!-- @click="rowCell(row,index)"-->
- <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
- <!-- <el-button type="text"-->
- <!-- icon="el-icon-delete"-->
- <!-- size="small"-->
- <!-- @click="$refs.collection.rowDel(row,index)"-->
- <!-- >删除</el-button>-->
- <!-- </template>-->
- <!-- <template slot="menuLeft">-->
- <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
- <!-- </template>-->
- <!-- </avue-crud>-->
- <!-- <avue-crud-->
- <!-- v-if="activeIndex === '2'"-->
- <!-- :data="paymentList"-->
- <!-- :option="paymentOption"-->
- <!-- ref="payment"-->
- <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
- <!-- @row-update="rowSave"-->
- <!-- @row-del="feeDel"-->
- <!-- >-->
- <!-- <template slot-scope="{row}" slot="corpId">-->
- <!-- <crop-select-->
- <!-- v-if="row.$cellEdit"-->
- <!-- v-model="row.corpId"-->
- <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
- <!-- ></crop-select>-->
- <!-- <span v-else>{{row.corpName}}</span>-->
- <!-- </template>-->
- <!-- <template slot-scope="{row}" slot="feeId">-->
- <!-- <breakdown-select-->
- <!-- v-if="row.$cellEdit"-->
- <!-- v-model="row.feeId"-->
- <!-- @selectValue="(value) => selectValue(value,row)"-->
- <!-- :configuration="breakConfiguration"-->
- <!-- >-->
- <!-- </breakdown-select>-->
- <!-- <span v-else>{{ row.feeName }}</span>-->
- <!-- </template>-->
- <!-- <template slot-scope="{row,index}" slot="menu">-->
- <!-- <el-button-->
- <!-- type="text"-->
- <!-- size="small"-->
- <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
- <!-- @click="paymentRowCell(row,index)"-->
- <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
- <!-- <el-button type="text"-->
- <!-- icon="el-icon-delete"-->
- <!-- size="small"-->
- <!-- @click="$refs.payment.rowDel(row,index)"-->
- <!-- >删除</el-button>-->
- <!-- </template>-->
- <!-- <template slot="menuLeft">-->
- <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
- <!-- </template>-->
- <!-- </avue-crud>-->
- <!-- </basic-container>-->
- </span>
- <containerTitle title="上传附件"></containerTitle>
- <c-upload
- typeUpload="CD"
- :data="orderFilesList"
- disabled
- deleteUrl="/api/blade-client/common-file/remove"
- :enumerationValue="86.2"
- ></c-upload>
- <el-dialog
- title="批量调度"
- :visible.sync="dialogVisible"
- append-to-body
- width="70%">
- <avue-form :option="option" v-model="form" ref="form">
- <template slot="fleetId">
- <crop-select
- v-model="form.fleetId"
- corpType="CD"
- ></crop-select>
- </template>
- </avue-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false" size="small">取 消</el-button>
- <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="变更"
- :visible.sync="dialogChange"
- append-to-body
- width="70%">
- <avue-form :option="optionData" v-model="formData" ref="saveForm">
- <template slot="fleetId">
- <crop-select
- v-model="formData.fleetId"
- corpType="CD"
- @getCorpData="getCorpData"
- ></crop-select>
- </template>
- </avue-form>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogChange = false" size="small">关 闭</el-button>
- <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
- </span>
- </el-dialog>
- <el-dialog
- title="变更记录"
- :visible.sync="dialogRecord"
- append-to-body
- width="70%">
- <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
- </span>
- </el-dialog>
- </div>
- </template>
- <script>
- import {getLazyTree} from "@/api/base/region";
- import {
- saveDelegationList,
- detailDelegationList,
- removeCollection,
- dispatchCollection,
- cancelDispatchCollection, dispatchBatch, fleetDriverSave, recordingDetails, changeFleet
- } from "@/api/landTransportation";
- export default {
- props: {
- id: {
- type: String
- }
- },
- data() {
- return {
- formData:{},
- formDataList:{},
- dialogChange:false,
- optionData:{
- span:12,
- menuBtn:false,
- column:[{
- label: "车队",
- prop: "fleetId",
- },{
- label: "应付陆运费",
- prop: "landAmountC",
- precision: 2,
- controls: false,
- type: 'number',
- },{
- label: '应收场站费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'oneFeeD'
- }, {
- label: '应收港杂费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'twoFeeD'
- }, {
- label: '应收扣款',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'threeFeeD'
- }, {
- label: '应收待时费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'fourFeeD'
- }, {
- label: '应收其他',
- width: 100,
- precision: 2,
- type: 'number',
- controls: false,
- prop: 'fiveFeeD'
- }, {
- label: '应收费用备注',
- width: 245,
- prop: 'feeRemarksD'
- }]
- },
- form:{},
- dataRecord:[],
- dialogRecord:false,
- optionRecord:{
- stripe:true,
- refreshBtn:false,
- columnBtn:false,
- menu:false,
- addBtn:false,
- align:'center',
- column:[
- {
- label:'变更内容',
- prop:'content'
- }, {
- label:'变更人',
- prop:'changeUserName'
- }, {
- label:'变更时间',
- prop:'changeTime'
- }
- ]
- },
- option: {
- span:12,
- menuBtn:false,
- column: [{
- label: "车队",
- prop: "fleetId",
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }]
- },{
- label: "应付陆运费",
- prop: "landAmountC",
- precision: 2,
- controls: false,
- type: 'number',
- }]
- },
- activeIndex: '1',
- dialogVisible: false,
- goodsForm: {},
- orderFilesList: [],
- selectionList: [],
- roleName: localStorage.getItem("roleName").split(',')[0],
- breakConfiguration: {
- multipleChoices: false,
- multiple: false,
- disabled: false,
- searchShow: true,
- collapseTags: false,
- clearable: true,
- placeholder: '请点击右边按钮选择',
- dicData: []
- },
- advantageProjectData: [],
- treeOption: {
- label: 'title',
- value: 'id',
- lazy: true,
- lazyLoad(node, resolve) {
- const parentId = node.level === 0 ? '00' : node.data.id;
- getLazyTree(parentId).then(res => {
- resolve(
- res.data.data.map(item => {
- return {
- ...item,
- leaf: !item.hasChildren
- };
- })
- );
- });
- }
- },
- tableData: [],
- entrustListT: [],
- KeyBoxTwo:0,
- entrustOptionTwoTBackup: {
- selectable: (row, index) => {
- return row.status === 0
- },
- align: 'center',
- menuAlign: 'center',
- index: true,
- cellBtn: false,
- refreshBtn: false,
- selection: true,
- selectionWidth:55,
- tip: false,
- addBtn: false,
- cancelBtn: false,
- editBtn: false,
- addRowBtn: false,
- delBtn: false,
- showSummary: true,
- // editBtn:false,
- summaryText: "合计",
- sumColumnList: [
- {
- name: 'landWeight',
- type: 'sum',
- decimals: 2
- }, {
- name: 'landAmountC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'landAmountD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'oneFeeD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'twoFeeD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'threeFeeD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'fourFeeD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'fiveFeeD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'oneFeeC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'twoFeeC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'threeFeeC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'fourFeeC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'fiveFeeC',
- type: 'sum',
- decimals: 2
- }, {
- name: 'landAmountD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'ctnQuantity',
- type: 'sum',
- decimals: 0
- }],
- column: [
- {
- label: '状态',
- width: 100,
- type: 'select',
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- dataType: "string",
- prop: 'status'
- }, {
- label: '车队',
- width: 200,
- prop: 'fleetId'
- }, {
- label: '应付陆运费',
- cell: true,
- prop: 'landAmountC'
- }, {
- label: '尺寸箱型',
- width: 100,
- slot: true,
- prop: 'ctnType'
- }, {
- label: '箱量',
- width: 50,
- prop: 'ctnQuantity'
- }, {
- label: '重量',
- width: 160,
- prop: 'landWeight',
- controls: false,
- precision: 2,
- type: 'number'
- }, {
- label: '车号',
- width: 150,
- prop: 'plateNo'
- }, {
- label: '司机',
- width: 115,
- prop: 'driverName'
- }, {
- label: '电话',
- width: 160,
- prop: 'tel'
- }, {
- label: '单柜运费',
- prop: 'landAmountD'
- }, {
- label: '委托备注',
- width: 245,
- prop: 'remarks'
- }, {
- label: '车队备注',
- width: 245,
- prop: 'fleetRemarks'
- }, {
- label: '司机备注',
- width: 245,
- prop: 'driverRemarks'
- }, {
- label: '应收场站费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'oneFeeD'
- }, {
- label: '应收港杂费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'twoFeeD'
- }, {
- label: '应收扣款',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'threeFeeD'
- }, {
- label: '应收待时费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'fourFeeD'
- }, {
- label: '应收其他',
- width: 100,
- precision: 2,
- type: 'number',
- controls: false,
- prop: 'fiveFeeD'
- }, {
- label: '应收费用备注',
- width: 245,
- prop: 'feeRemarksD'
- }, {
- label: '应付场站费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'oneFeeC'
- }, {
- label: '应付港杂费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'twoFeeC'
- }, {
- label: '应付扣款',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'threeFeeC'
- }, {
- label: '应付待时费',
- width: 100,
- precision: 2,
- controls: false,
- type: 'number',
- prop: 'fourFeeC'
- }, {
- label: '应付其他',
- width: 100,
- precision: 2,
- type: 'number',
- controls: false,
- prop: 'fiveFeeC'
- }, {
- label: '应付费用备注',
- width: 245,
- prop: 'feeRemarksC'
- }
- ]
- },
- entrustOptionTwoT:{},
- entrustList: [],
- goodsOptionForm: {
- menuBtn: false,
- disabled: true,
- span: 8,
- column: [{
- label: '客户名称',
- formslot: true,
- prop: 'corpId'
- }, {
- label: '所属公司',
- formslot: true,
- prop: 'belongCompany',
- rules: [{
- required: true,
- message: " ",
- trigger: "blur"
- }],
- }, {
- label: '订单号',
- prop: 'orderNo',
- disabled: true
- }, {
- label: '提单号',
- prop: 'billNo'
- }, {
- label: '场站',
- prop: 'station'
- }, {
- label: '到厂时间',
- type: "datetime",
- format: 'yyyy-MM-dd HH:mm:ss',
- valueFormat: 'yyyy-MM-dd HH:mm:ss',
- prop: 'arrivalTime'
- }, {
- label: '船名航次',
- prop: 'factory'
- }, {
- label: '货物名称',
- prop: 'goods'
- }, {
- label: '订舱代理',
- prop: 'agentId'
- }, {
- label: '起运港',
- prop: 'polId'
- }, {
- label: '目的港',
- prop: 'podId'
- }, {
- label: '开船日期',
- prop: 'etd',
- type: 'date'
- }, {
- label: '截关日期',
- prop: 'etc',
- type: 'date'
- }, {
- label: '截单日期',
- prop: 'siCutoffDate',
- type: 'date'
- }, {
- label: '备注',
- prop: 'remarks'
- }
- ]
- },
- entrustOptionTwo: {
- align: 'center',
- menuAlign: 'center',
- addBtnText: '录入箱信息',
- index: true,
- cellBtn: true,
- addBtn: false,
- addRowBtn: true,
- showSummary: true,
- summaryText: "合计",
- sumColumnList: [
- {
- name: 'landWeight',
- type: 'sum',
- decimals: 2
- }, {
- name: 'landAmountD',
- type: 'sum',
- decimals: 2
- }, {
- name: 'ctnQuantity',
- type: 'sum',
- decimals: 7
- }],
- column: [{
- label: '尺寸箱型',
- cell: true,
- prop: 'ctnType',
- type: 'select',
- width: 100,
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
- props: {
- label: "dictValue",
- value: "dictKey"
- }
- }, {
- label: '箱量',
- cell: true,
- prop: 'ctnQuantity',
- controls: false,
- precision: 0,
- width: 100,
- type: 'number'
- }, {
- label: '总重量(吨)',
- cell: true,
- prop: 'landWeight',
- controls: false,
- width: 200,
- precision: 2,
- type: 'number'
- }, {
- label: '单柜运费',
- cell: true,
- prop: 'landAmountD',
- controls: false,
- width: 200,
- precision: 2,
- type: 'number'
- }, {
- label: '备注',
- cell: true,
- prop: 'remarks'
- }
- ]
- },
- collectionList: [],
- collectionOption: {
- align: 'center',
- menuAlign: 'center',
- index: true,
- cancelBtn: false,
- editBtn: false,
- delBtn: false,
- cellBtn: false,
- addBtn: false,
- addRowBtn: false,
- showSummary: true,
- addBtnText: '录入明细',
- summaryText: "合计",
- sumColumnList: [{
- name: 'price',
- type: 'sum',
- decimals: 2
- }, {
- name: 'amount',
- type: 'sum',
- decimals: 2
- }, {
- name: 'quantity',
- type: 'sum',
- decimals: 1
- }],
- column: [{
- label: '客户名称',
- slot: true,
- prop: 'corpId'
- }, {
- label: '费用名称',
- slot: true,
- prop: 'feeId'
- }, {
- label: '计价单位',
- cell: true,
- prop: 'unit',
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
- props: {
- label: "dictValue",
- value: "dictKey"
- }
- }, {
- label: '数量',
- cell: true,
- prop: 'quantity'
- }, {
- label: '单价',
- cell: true,
- prop: 'price'
- }, {
- label: '金额',
- cell: true,
- prop: 'amount'
- }, {
- label: '税率(默认6)',
- cell: true,
- prop: 'taxRate'
- }, {
- label: '币别',
- cell: true,
- prop: 'currency',
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- }
- ]
- },
- paymentList: [],
- paymentOption: {
- align: 'center',
- menuAlign: 'center',
- index: true,
- cancelBtn: false,
- editBtn: false,
- delBtn: false,
- cellBtn: false,
- addBtn: false,
- addRowBtn: false,
- showSummary: true,
- addBtnText: '录入明细',
- summaryText: "合计",
- sumColumnList: [{
- name: 'price',
- type: 'sum',
- decimals: 2
- }, {
- name: 'amount',
- type: 'sum',
- decimals: 2
- }, {
- name: 'quantity',
- type: 'sum',
- decimals: 1
- }],
- column: [{
- label: '客户名称',
- slot: true,
- prop: 'corpId'
- }, {
- label: '费用名称',
- slot: true,
- prop: 'feeId'
- }, {
- label: '计价单位',
- cell: true,
- prop: 'unit',
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
- props: {
- label: "dictValue",
- value: "dictKey"
- }
- }, {
- label: '数量',
- cell: true,
- prop: 'quantity'
- }, {
- label: '单价',
- cell: true,
- prop: 'price'
- }, {
- label: '金额',
- cell: true,
- prop: 'amount'
- }, {
- label: '税率(默认6)',
- cell: true,
- prop: 'taxRate'
- }, {
- label: '币别(默认RMB)',
- cell: true,
- prop: 'currency',
- type: "select",
- dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
- props: {
- label: "dictValue",
- value: "dictKey"
- },
- }
- ]
- }
- };
- },
- async created() {
- this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
- this.KeyBoxTwo++
- if (this.id) {
- detailDelegationList({id: this.id, kind: '2'}).then(res => {
- this.goodsForm = res.data.data
- this.tableData = res.data.data.orderAddressList
- this.entrustList = res.data.data.orderItemList
- this.goodsList = res.data.data.orderItemList
- this.orderFilesList = res.data.data.fileList
- if (res.data.data.orderFeeList.length > 0) {
- res.data.data.orderFeeList.forEach(item => {
- if (item.type == 1) {
- this.collectionList.push(item)
- } else {
- this.paymentList.push(item)
- }
- })
- }
- delete this.goodsForm.orderAddressList
- delete this.goodsForm.orderItemList
- delete this.goodsForm.orderFeeList
- this.tableData.forEach(item => {
- if (item.region) item.region = item.region.split(',')
- })
- })
- }
- },
- methods: {
- //自定义列保存
- async saveColumnBoxTwo() {
- /**
- * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
- * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
- * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
- */
- const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
- if (inSave) {
- this.$message.success("保存成功");
- //关闭窗口
- this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
- }
- },
- //自定义列重置
- async resetColumnBoxTwo() {
- this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
- const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
- if (inSave) {
- this.$message.success("重置成功");
- this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
- }
- },
- getCorpData(val){
- this.formData.fleetName = val.cname
- },
- confirmChange(){
- console.log(this.form.id)
- changeFleet({
- ...this.formData,
- id: this.formDataList.id,
- orderId:this.goodsForm.id,
- originalFleetName:this.formDataList.fleetName
- }).then(res=>{
- this.$refs.saveForm.resetForm()
- this.entrustList = res.data.data
- this.dialogChange = false
- this.$message.success("变更成功");
- })
- },
- //多选触发
- selectionChange(list) {
- this.selectionList = list
- },
- //批量调度
- batchScheduling() {
- this.form = {}
- this.dialogVisible = true
- },
- //提交调度
- saveScheduling() {
- this.$refs['form'].validate((valid, done) => {
- done()
- if (valid){
- let data = []
- this.$confirm('是否确认调度?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.selectionList.forEach(item=>data.push(item.id))
- dispatchBatch({
- ...this.form,
- idList:data,
- orderId:this.goodsForm.id
- }).then(res=>{
- this.entrustList = res.data.data
- this.dialogVisible = false
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- }else {
- return false
- }
- })
- },
- //刷新数据
- refreshData() {
- detailDelegationList({id: this.id, kind: '2'}).then(res => {
- this.goodsForm = res.data.data
- this.tableData = res.data.data.orderAddressList
- this.entrustList = res.data.data.orderItemList
- this.goodsList = res.data.data.orderItemList
- this.orderFilesList = res.data.data.fileList
- if (res.data.data.orderFeeList.length > 0) {
- res.data.data.orderFeeList.forEach(item => {
- if (item.type == 1) {
- this.collectionList.push(item)
- } else {
- this.paymentList.push(item)
- }
- })
- }
- delete this.goodsForm.orderAddressList
- delete this.goodsForm.orderItemList
- delete this.goodsForm.orderFeeList
- this.tableData.forEach(item => {
- if (item.region) item.region = item.region.split(',')
- })
- })
- },
- //切换收付费
- handleSelect(tab, event) {
- this.activeIndex = tab.name
- },
- //箱信息保存
- rowSaveT(row, index, done, loading) {
- if (row.$cellEdit) {
- fleetDriverSave(row).then(res => {
- this.$message.success("保存成功");
- })
- }
- this.$refs.crudBoxTwo.rowCell(row, index)
- },
- rowSaveWell(row, index, done, loading) {
- done()
- },
- //箱信息调度
- designate(row, index) {
- if (row.fleetId) {
- this.$confirm('是否确定调度', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- dispatchCollection(row).then(res => {
- this.$message.success('操作成功');
- this.entrustList[index].status = res.data.data.status
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- } else {
- this.$message.warning('请选择车队');
- }
- },
- //变更车队
- changeFleetT(row, index){
- this.formDataList = row
- this.dialogChange = true
- this.formData = {}
- },
- //打开变更记录
- recordsOfChanges(row, index){
- this.dialogRecord = true
- recordingDetails({itemId:row.id,kind:2}).then(res=>{
- this.dataRecord = res.data.data
- })
- },
- //取消调度
- cancelDesignate(row, index) {
- this.$confirm('是否确定取消调度', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- cancelDispatchCollection({id: row.id}).then(res => {
- this.$message.success('操作成功');
- this.entrustList[index].status = res.data.data.status
- })
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消'
- });
- });
- },
- //箱信息选择车队
- getfleetIdT(data, row) {
- this.$set(row, 'fleetName', data.cname)
- },
- //地址新增
- addAddress() {
- this.tableData.splice(this.tableData.length - 1, 0, {leas: 1111})
- },
- //返回主列表
- backToList() {
- this.$emit('backToList')
- },
- //删除途径地址
- deleteAddress(scope) {
- this.tableData.splice(scope.$index, 1);
- },
- //箱信息保存
- rowSave(row, index, done, loading) {
- row.$cellEdit = false
- done()
- },
- rowCell(row, index) {
- this.$refs.collection.rowCell(row, index)
- },
- paymentRowCell(row, index) {
- this.$refs.payment.rowCell(row, index)
- },
- //箱信息移除
- rowDel(row, index) {
- this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.entrustList.splice(index, 1);
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //保存
- editCustomer() {
- let data = JSON.parse(JSON.stringify(this.tableData))
- data.forEach(item => {
- if (item.region.length !== 0) item.region = item.region.join(',')
- })
- saveDelegationList({
- ...this.goodsForm,
- kind: '2',
- orderAddressList: data,
- orderItemList: this.entrustList,
- orderFeeList: this.collectionList.concat(this.paymentList)
- }).then(res => {
- this.$message.success('保存成功');
- })
- },
- //收费新增
- addRowCollection() {
- this.$refs.collection.rowCellAdd({
- currency: '1',
- type: '1',
- $cellEdit: true
- });
- },
- //付费新增
- addRowPayment() {
- this.$refs.payment.rowCellAdd({
- currency: '1',
- type: '2',
- $cellEdit: true
- });
- },
- //选择费用
- selectValue(value, row) {
- this.$set(row, 'feeName', value.cname)
- },
- //选择客户信息触发
- getfleetId(data, row) {
- this.$set(row, 'corpName', data.cname)
- },
- //收款信息移除
- makeDel(row, index) {
- this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (row.id) removeCollection(row.id)
- this.collectionList.splice(index, 1);
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //付款信息移除
- feeDel(row, index) {
- this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- if (row.id) removeCollection(row.id)
- this.paymentList.splice(index, 1);
- }).catch(() => {
- this.$message({
- type: 'info',
- message: '已取消删除'
- });
- });
- },
- //自定义表头
- renderHeader(h) {
- return (
- <div>
- <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
- <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
- style="margin-right: 1.25rem;"></el-button>
- </el-tooltip>
- </div>
- )
- }
- }
- }
- </script>
- <style scoped>
- </style>
|