|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <GlobalWindow | 
|---|
|  |  |  | :title="title" | 
|---|
|  |  |  | width="85%" | 
|---|
|  |  |  | width="100%" | 
|---|
|  |  |  | :visible.sync="visible" | 
|---|
|  |  |  | :confirm-working="isWorking" | 
|---|
|  |  |  | @confirm="confirm" | 
|---|
|  |  |  | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div style="display: block;margin-bottom: 50px;" v-if="model && model.optStatus ===1"> | 
|---|
|  |  |  | <div  style="display: block;font-size: 16px;font-weight: 600;margin-bottom: 10px;">优化线路明细</div> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <el-table  :data="dataListNew" stripe> | 
|---|
|  |  |  | <el-table-column prop="dateInfo" label="送货日期" min-width="130px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="lineName" label="送货线路" min-width="130px">  </el-table-column> | 
|---|
|  |  |  | <el-table-column prop="orderNum" label="客户数(户)" min-width="130px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="totalNum" label="送货量(条)" min-width="130px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="carCode" label="车牌号" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="memberName" label="送货司机" min-width="100px"></el-table-column> | 
|---|
|  |  |  | <el-table-column prop="distance" label="当前路程(公里)" min-width="100px"> | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <span  v-if="row.distance "> {{((row.distance ||0)/1000).toFixed(2)}}</span> | 
|---|
|  |  |  | <span  v-else> - </span> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | <el-table-column | 
|---|
|  |  |  | label="操作" | 
|---|
|  |  |  | min-width="160" | 
|---|
|  |  |  | align="center" | 
|---|
|  |  |  | fixed="right" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <template slot-scope="{row}"> | 
|---|
|  |  |  | <el-button type="text" @click="$refs.operaJkSketchCustomerWindow.open('线路客户明细——', row)" icon="el-icon-view"  >查看客户</el-button> | 
|---|
|  |  |  | <el-button type="text" @click="$refs.operaJkSketchLineMapWindow.open('线路客户交通路线——', row)" icon="el-icon-view"  >交通路线</el-button> | 
|---|
|  |  |  | </template> | 
|---|
|  |  |  | </el-table-column> | 
|---|
|  |  |  | </el-table> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | <div style="display: block"> | 
|---|
|  |  |  | <div  style="display: block;font-size: 16px;font-weight: 600;margin-bottom: 10px;">线路明细</div> | 
|---|
|  |  |  | <div  style="display: block;font-size: 16px;font-weight: 600;margin-bottom: 10px;">原始线路明细</div> | 
|---|
|  |  |  | <div> | 
|---|
|  |  |  | <el-table  :data="dataList" stripe> | 
|---|
|  |  |  | <el-table-column prop="dateInfo" label="送货日期" min-width="130px"></el-table-column> | 
|---|
|  |  |  | 
|---|
|  |  |  | // 表单数据 | 
|---|
|  |  |  | model: { | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | dataList: [] | 
|---|
|  |  |  | dataList: [], | 
|---|
|  |  |  | dataListNew: [] | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | created () { | 
|---|
|  |  |  | 
|---|
|  |  |  | this.visible = true | 
|---|
|  |  |  | this.model = target | 
|---|
|  |  |  | this.loadList() | 
|---|
|  |  |  | if(this.model.optStatus === 1){ | 
|---|
|  |  |  | this.loadListNew() | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | loadList () { | 
|---|
|  |  |  | this.api.allList({ | 
|---|
|  |  |  | sketchId: this.model.id | 
|---|
|  |  |  | sketchId: this.model.id, | 
|---|
|  |  |  | type: 0 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.dataList = res | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | loadListNew () { | 
|---|
|  |  |  | this.api.allList({ | 
|---|
|  |  |  | sketchId: this.model.id, | 
|---|
|  |  |  | type: 1 | 
|---|
|  |  |  | }).then(res => { | 
|---|
|  |  |  | this.dataListNew = res | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | initDistance () { | 
|---|
|  |  |  | var that = this | 
|---|
|  |  |  | initOriginDistance({ | 
|---|