detailPage.vue 67 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back" v-if="!home">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList(0)">返回列表
  7. </el-button>
  8. </div>
  9. <div class="customer-back" v-else>
  10. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  11. @click="backToList(1)">返回列表
  12. </el-button>
  13. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  14. @click="backToList(2)">返回台账
  15. </el-button>
  16. </div>
  17. <div>
  18. <div class="el-button&#45;&#45;small-yh add-customer-btn">
  19. <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">派车通知
  20. </el-button>
  21. <el-button v-if="roleNameTwo != '平台,调度派单'" type="warning" size="small" @click="updateFee">更新账单</el-button>
  22. </div>
  23. </div>
  24. </div>
  25. <containerTitle title="委托信息" style="margin-top: 50px"></containerTitle>
  26. <basic-container>
  27. <avue-form :option="goodsOptionForm" v-model="goodsForm">
  28. <template slot-scope="scope" slot="corpId">
  29. <crop-select v-model="goodsForm.corpId" disabled></crop-select>
  30. </template>
  31. <template slot-scope="scope" slot="station">
  32. <port-info v-model="goodsForm.station" :disabled="goodsForm.status >= 1" />
  33. </template>
  34. <template slot-scope="scope" slot="agentId">
  35. <crop-select :disabled="goodsForm.status >= 1" v-model="goodsForm.agentId"></crop-select>
  36. </template>
  37. <template slot-scope="scope" slot="polId">
  38. <port-info v-model="goodsForm.polId" :disabled="goodsForm.status >= 1" />
  39. </template>
  40. <template slot-scope="scope" slot="podId">
  41. <port-info v-model="goodsForm.podId" :disabled="goodsForm.status >= 1" />
  42. </template>
  43. </avue-form>
  44. </basic-container>
  45. <containerTitle title="其他信息"></containerTitle>
  46. <basic-container :showBtn="true" ref="other">
  47. <avue-form :option="goodsOptionFormTwo" v-model="goodsForm">
  48. <template slot-scope="scope" slot="corpId">
  49. <crop-select v-model="goodsForm.corpId" disabled></crop-select>
  50. </template>
  51. <template slot-scope="scope" slot="station">
  52. <port-info v-model="goodsForm.station" :disabled="goodsForm.status >= 1" />
  53. </template>
  54. <template slot-scope="scope" slot="agentId">
  55. <crop-select :disabled="goodsForm.status >= 1" v-model="goodsForm.agentId"></crop-select>
  56. </template>
  57. <template slot-scope="scope" slot="polId">
  58. <port-info v-model="goodsForm.polId" type="id" :disabled="goodsForm.status >= 1" />
  59. </template>
  60. <template slot-scope="scope" slot="podId">
  61. <port-info v-model="goodsForm.podId" type="id" :disabled="goodsForm.status >= 1" />
  62. </template>
  63. </avue-form>
  64. </basic-container>
  65. <containerTitle title="起止地信息"></containerTitle>
  66. <basic-container>
  67. <el-table ref="singleTable" :data="tableData" size="mini"
  68. :header-cell-style="{ color: '#000', background: '#fafafa' }" style="width: 100%">
  69. <el-table-column property="date" align="center" width="40">
  70. <template slot-scope="scope">
  71. <span v-if="scope.$index == 0">
  72. <el-button type="primary" size="mini" circle>起</el-button>
  73. </span>
  74. <span v-else-if="scope.$index === tableData.length - 1">
  75. <el-button type="success" size="mini" circle>止</el-button>
  76. </span>
  77. <span v-else>
  78. <el-button type="warning" size="mini" circle>途</el-button>
  79. <!-- <el-button v-if="goodsForm.status === 2" type="warning" size="mini" circle>途</el-button>-->
  80. <!-- <el-tooltip v-else class="item" effect="dark" content="删除" placement="right">-->
  81. <!-- <el-button type="danger" icon="el-icon-delete" size="mini" circle-->
  82. <!-- @click="deleteAddress(scope)"></el-button>-->
  83. <!-- </el-tooltip>-->
  84. </span>
  85. </template>
  86. </el-table-column>
  87. <el-table-column type="index" label="序号" align="center" width="60">
  88. </el-table-column>
  89. <el-table-column property="corpName" label="货运地点" align="center" show-overflow-tooltip width="200">
  90. </el-table-column>
  91. <!-- <el-table-column-->
  92. <!-- property="province"-->
  93. <!-- label="省市区"-->
  94. <!-- align="center"-->
  95. <!-- width="280">-->
  96. <!-- <template slot-scope="scope">-->
  97. <!-- <el-cascader-->
  98. <!-- size="small"-->
  99. <!-- style="width: 100%;"-->
  100. <!-- v-model="scope.row.region"-->
  101. <!-- disabled-->
  102. <!-- :props="treeOption"></el-cascader>-->
  103. <!-- </template>-->
  104. <!-- </el-table-column>-->
  105. <el-table-column property="contacts" align="center" width="150" show-overflow-tooltip label="联系人">
  106. </el-table-column>
  107. <el-table-column property="tel" align="center" width="180" show-overflow-tooltip label="电话">
  108. </el-table-column>
  109. <el-table-column property="address" align="center" show-overflow-tooltip label="详细地址">
  110. </el-table-column>
  111. <el-table-column property="remarks" align="center" show-overflow-tooltip label="备注">
  112. </el-table-column>
  113. </el-table>
  114. </basic-container>
  115. <containerTitle title="车辆信息"></containerTitle>
  116. <basic-container>
  117. <avue-crud :data="entrustList" @selection-change="selectionChange" :option="entrustOptionTwoT" ref="crudBoxTwo"
  118. :key="KeyBoxTwo" @resetColumn="resetColumnBoxTwo" @saveColumn="saveColumnBoxTwo"
  119. @row-save="(row, done, loading) => { rowSaveT(row, 0, done, loading) }" @row-update="rowSaveWell">
  120. <template slot="menuLeft" slot-scope="{size}">
  121. <el-button type="success" icon="el-icon-check" :size="size" @click="batchScheduling" :disabled="batchDuling"
  122. v-if="roleNameTwo.indexOf('总调度') === -1">批量调度
  123. </el-button>
  124. </template>
  125. <template slot="plateNo" slot-scope="{row}" v-if="!row.$cellEdit">
  126. <span class="el-button--text" style="cursor: pointer" @click="openTrack(row)">{{ row.plateNo }}</span>
  127. </template>
  128. <!-- <template slot-scope="{row}" slot="fleetId">-->
  129. <!-- <crop-select-->
  130. <!-- v-if="row.$cellEdit"-->
  131. <!-- v-model="row.fleetId"-->
  132. <!-- @getCorpData="(data)=>{getfleetIdT(data,row)}"-->
  133. <!-- corpType="CD"-->
  134. <!-- ></crop-select>-->
  135. <!-- <span v-else>{{ row.fleetName }}</span>-->
  136. <!-- </template>-->
  137. <template slot-scope="{row,index}" slot="menu">
  138. <el-button type="text" size="small" v-if="row.status === 0" @click="rowSaveT(row, index)">{{ row.$cellEdit ?
  139. '保 存'
  140. : '修 改' }}
  141. </el-button>
  142. <el-button size="small" type="text" @click="designate(row, index)" v-if="row.status === 0">调 度
  143. </el-button>
  144. <el-button size="small" type="text" @click="cancelDesignate(row, index)" v-if="row.status === 1">取消调度
  145. </el-button>
  146. <el-button size="small" type="text" @click="changeFleetT(row, index)"
  147. v-if="row.status !== 0 || row.status !== 1 || row.status !== 4">变 更
  148. </el-button>
  149. <el-button size="small" type="text" @click="recordsOfChanges(row, index)" v-if="row.status > 1">变更记录
  150. </el-button>
  151. <el-button size="small" type="text" @click="annexOpen(row, index)">附 件
  152. </el-button>
  153. <el-button type="text" size="small" v-if="row.status === 0" @click="rowSaveThree(row, index)">{{ row.$cellEdit
  154. ?
  155. '确认调度派车' : '调度派车' }}
  156. </el-button>
  157. </template>
  158. </avue-crud>
  159. </basic-container>
  160. <span>
  161. <!-- <containerTitle title="费用明细"></containerTitle>-->
  162. <!-- <basic-container>-->
  163. <!-- <el-tabs v-model="activeIndex" @tab-click="handleSelect">-->
  164. <!-- <el-tab-pane label="应收" name="1"></el-tab-pane>-->
  165. <!-- <el-tab-pane label="应付" name="2"></el-tab-pane>-->
  166. <!-- </el-tabs>-->
  167. <!-- <avue-crud-->
  168. <!-- v-if="activeIndex === '1'"-->
  169. <!-- :data="collectionList"-->
  170. <!-- :option="collectionOption"-->
  171. <!-- ref="collection"-->
  172. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  173. <!-- @row-update="rowSave"-->
  174. <!-- @row-del="makeDel">-->
  175. <!-- <template slot-scope="{row}" slot="corpId">-->
  176. <!-- <crop-select-->
  177. <!-- v-if="row.$cellEdit"-->
  178. <!-- v-model="row.corpId"-->
  179. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  180. <!-- ></crop-select>-->
  181. <!-- <span v-else>{{row.corpName}}</span>-->
  182. <!-- </template>-->
  183. <!-- <template slot-scope="{row}" slot="feeId">-->
  184. <!-- <breakdown-select-->
  185. <!-- v-if="row.$cellEdit"-->
  186. <!-- v-model="row.feeId"-->
  187. <!-- @selectValue="(value) => selectValue(value,row)"-->
  188. <!-- :configuration="breakConfiguration"-->
  189. <!-- >-->
  190. <!-- </breakdown-select>-->
  191. <!-- <span v-else>{{ row.feeName }}</span>-->
  192. <!-- </template>-->
  193. <!-- <template slot-scope="{row,index}" slot="menu">-->
  194. <!-- <el-button-->
  195. <!-- type="text"-->
  196. <!-- size="small"-->
  197. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  198. <!-- @click="rowCell(row,index)"-->
  199. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  200. <!-- <el-button type="text"-->
  201. <!-- icon="el-icon-delete"-->
  202. <!-- size="small"-->
  203. <!-- @click="$refs.collection.rowDel(row,index)"-->
  204. <!-- >删除</el-button>-->
  205. <!-- </template>-->
  206. <!-- <template slot="menuLeft">-->
  207. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowCollection" size="small">录入明细</el-button>-->
  208. <!-- </template>-->
  209. <!-- </avue-crud>-->
  210. <!-- <avue-crud-->
  211. <!-- v-if="activeIndex === '2'"-->
  212. <!-- :data="paymentList"-->
  213. <!-- :option="paymentOption"-->
  214. <!-- ref="payment"-->
  215. <!-- @row-save="(row,done,loading)=>{rowSave(row,0,done,loading)}"-->
  216. <!-- @row-update="rowSave"-->
  217. <!-- @row-del="feeDel"-->
  218. <!-- >-->
  219. <!-- <template slot-scope="{row}" slot="corpId">-->
  220. <!-- <crop-select-->
  221. <!-- v-if="row.$cellEdit"-->
  222. <!-- v-model="row.corpId"-->
  223. <!-- @getCorpData="(data)=>{getfleetId(data,row)}"-->
  224. <!-- ></crop-select>-->
  225. <!-- <span v-else>{{row.corpName}}</span>-->
  226. <!-- </template>-->
  227. <!-- <template slot-scope="{row}" slot="feeId">-->
  228. <!-- <breakdown-select-->
  229. <!-- v-if="row.$cellEdit"-->
  230. <!-- v-model="row.feeId"-->
  231. <!-- @selectValue="(value) => selectValue(value,row)"-->
  232. <!-- :configuration="breakConfiguration"-->
  233. <!-- >-->
  234. <!-- </breakdown-select>-->
  235. <!-- <span v-else>{{ row.feeName }}</span>-->
  236. <!-- </template>-->
  237. <!-- <template slot-scope="{row,index}" slot="menu">-->
  238. <!-- <el-button-->
  239. <!-- type="text"-->
  240. <!-- size="small"-->
  241. <!-- :icon="row.$cellEdit?'el-icon-circle-plus-outline':'el-icon-edit'"-->
  242. <!-- @click="paymentRowCell(row,index)"-->
  243. <!-- >{{row.$cellEdit?'保存':'编辑'}}</el-button>-->
  244. <!-- <el-button type="text"-->
  245. <!-- icon="el-icon-delete"-->
  246. <!-- size="small"-->
  247. <!-- @click="$refs.payment.rowDel(row,index)"-->
  248. <!-- >删除</el-button>-->
  249. <!-- </template>-->
  250. <!-- <template slot="menuLeft">-->
  251. <!-- <el-button type="primary" icon="el-icon-plus" @click="addRowPayment" size="small">录入明细</el-button>-->
  252. <!-- </template>-->
  253. <!-- </avue-crud>-->
  254. <!-- </basic-container>-->
  255. </span>
  256. <containerTitle title="杂费明细" v-if="roleNameTwo != '平台,调度派单'"></containerTitle>
  257. <basic-container v-if="roleNameTwo != '平台,调度派单'">
  258. <el-tabs v-model="activeIndex" @tab-click="handleSelect">
  259. <el-tab-pane label="应收" name="1"
  260. v-if="!(roleNameTwo.indexOf('调度中心业务员') !== -1 || roleNameTwo.indexOf('调度中心经理') !== -1)"></el-tab-pane>
  261. <el-tab-pane label="应付" name="2"></el-tab-pane>
  262. </el-tabs>
  263. <avue-crud v-if="activeIndex === '1'" :data="collectionList" :key="key" :option="collectionOption"
  264. ref="collection" @resetColumn="resetColumnCollection" @saveColumn="saveColumnCollection"
  265. @row-save="(row, done, loading) => { rowSave(row, 0, done, loading) }" @row-update="rowSave" @row-del="makeDel">
  266. <template slot-scope="{row}" slot="corpId">
  267. <crop-select v-if="row.$cellEdit" v-model="row.corpId"
  268. @getCorpData="(data) => { getfleetId(data, row) }"></crop-select>
  269. <span v-else>{{ row.corpName }}</span>
  270. </template>
  271. <template slot="plateNoHeader" slot-scope="{column}">
  272. {{ column.label }}<span style="color:#F56C6C">*</span>
  273. </template>
  274. <template slot="feeIdHeader" slot-scope="{column}">
  275. {{ column.label }}<span style="color:#F56C6C">*</span>
  276. </template>
  277. <template slot-scope="{row}" slot="feeId">
  278. <breakdown-select v-if="row.$cellEdit" v-model="row.feeId" @selectValue="(value) => selectValue(value, row)"
  279. :configuration="breakConfiguration">
  280. </breakdown-select>
  281. <span v-else>{{ row.feeName }}</span>
  282. </template>
  283. <template slot-scope="{row,index}" slot="menu">
  284. <el-button type="text" size="small" :icon="row.$cellEdit ? 'el-icon-circle-plus-outline' : 'el-icon-edit'"
  285. @click="rowCell(row, index)">{{ row.$cellEdit ? '保存' : '编辑' }}
  286. </el-button>
  287. <el-button type="text" icon="el-icon-delete" size="small" @click="$refs.collection.rowDel(row, index)">删除
  288. </el-button>
  289. <el-button size="small" type="text" icon="el-icon-s-order" @click="annexOpen(row, index)">附 件
  290. </el-button>
  291. </template>
  292. <template slot="menuLeft">
  293. <el-button v-if="roleNameTwo.indexOf('总调度') === -1" type="primary" icon="el-icon-plus"
  294. @click="addRowCollection" size="small">录入明细
  295. </el-button>
  296. </template>
  297. </avue-crud>
  298. <avue-crud v-if="activeIndex === '2'" :data="paymentList" :option="paymentOption" ref="payment"
  299. @resetColumn="resetColumnPayment" @saveColumn="saveColumnPayment"
  300. @row-save="(row, done, loading) => { rowSave(row, 0, done, loading) }" @row-update="rowSave" @row-del="feeDel">
  301. <template slot-scope="{row}" slot="corpId">
  302. <crop-select v-if="row.$cellEdit" v-model="row.corpId"
  303. @getCorpData="(data) => { getfleetId(data, row) }"></crop-select>
  304. <span v-else>{{ row.corpName }}</span>
  305. </template>
  306. <template slot="plateNoHeader" slot-scope="{column}">
  307. {{ column.label }}<span style="color:#F56C6C">*</span>
  308. </template>
  309. <template slot="feeIdHeader" slot-scope="{column}">
  310. {{ column.label }}<span style="color:#F56C6C">*</span>
  311. </template>
  312. <template slot-scope="{row}" slot="feeId">
  313. <breakdown-select v-if="row.$cellEdit" v-model="row.feeId" @selectValue="(value) => selectValue(value, row)"
  314. :configuration="breakConfiguration">
  315. </breakdown-select>
  316. <span v-else>{{ row.feeName }}</span>
  317. </template>
  318. <template slot-scope="{row,index}" slot="menu">
  319. <el-button type="text" size="small" :icon="row.$cellEdit ? 'el-icon-circle-plus-outline' : 'el-icon-edit'"
  320. @click="paymentRowCell(row, index)">{{ row.$cellEdit ? '保存' : '编辑' }}
  321. </el-button>
  322. <el-button type="text" icon="el-icon-delete" size="small" :disabled="goodsForm.status === 1"
  323. @click="$refs.payment.rowDel(row, index)">删除
  324. </el-button>
  325. <el-button size="small" type="text" icon="el-icon-s-order" @click="annexOpen(row, index)">附 件
  326. </el-button>
  327. </template>
  328. <template slot="menuLeft">
  329. <el-button v-if="roleNameTwo.indexOf('总调度') === -1"
  330. v-show="!(roleNameTwo.indexOf('调度中心业务员') !== -1 || roleNameTwo.indexOf('调度中心经理') !== -1)" type="primary"
  331. icon="el-icon-plus" @click="addRowPayment" size="small">录入明细
  332. </el-button>
  333. </template>
  334. </avue-crud>
  335. </basic-container>
  336. <containerTitle title="上传附件"></containerTitle>
  337. <c-upload typeUpload="CD" :data="orderFilesList" display deleteUrl="/api/blade-client/common-file/remove"
  338. :enumerationValue="86.2">
  339. <template slot="c_button">
  340. <el-button type="primary" size="small" :loading="c_button" @click="schedulingFileSaving">保存附件
  341. </el-button>
  342. </template>
  343. </c-upload>
  344. <el-dialog title="批量调度" :visible.sync="dialogVisible" append-to-body width="70%">
  345. <avue-form :option="option" v-model="form" ref="form">
  346. <template slot="fleetId">
  347. <crop-select v-model="form.fleetId" corpType="CD"></crop-select>
  348. </template>
  349. </avue-form>
  350. <span slot="footer" class="dialog-footer">
  351. <el-button @click="dialogVisible = false" size="small">取 消</el-button>
  352. <el-button type="primary" @click="saveScheduling" size="small">调 度</el-button>
  353. </span>
  354. </el-dialog>
  355. <el-dialog title="变更" :visible.sync="dialogChange" append-to-body width="70%">
  356. <avue-form :option="optionData" v-model="formData" ref="saveForm">
  357. <template slot="fleetId">
  358. <crop-select v-model="formData.fleetId" corpType="CD" :disabled="formData === 4"
  359. @getCorpData="getCorpData"></crop-select>
  360. </template>
  361. </avue-form>
  362. <span slot="footer" class="dialog-footer">
  363. <el-button @click="dialogChange = false" size="small">关 闭</el-button>
  364. <el-button type="primary" @click="confirmChange" size="small">确 定</el-button>
  365. </span>
  366. </el-dialog>
  367. <el-dialog title="变更记录" :visible.sync="dialogRecord" append-to-body width="70%">
  368. <avue-crud :data="dataRecord" :option="optionRecord" style="margin-top: -43px"></avue-crud>
  369. <span slot="footer" class="dialog-footer">
  370. <el-button @click="dialogRecord = false" size="small">关 闭</el-button>
  371. </span>
  372. </el-dialog>
  373. <el-dialog title="附件" :visible.sync="enclosure" append-to-body width="70%">
  374. <c-upload typeUpload="GZ" :basic="true" deleteUrl="/api/blade-client/common-file/remove" :data="orderList"
  375. :enumerationValue="76"></c-upload>
  376. <span slot="footer" class="dialog-footer">
  377. <el-button @click="enclosure = false" size="small">取 消</el-button>
  378. <el-button type="primary" @click="saveAnnex" size="small">保 存</el-button>
  379. </span>
  380. </el-dialog>
  381. <report-dialog :switchDialog="switchDialog" :reportId="goodsForm.id" reportName="陆运-派车通知" @onClose="onClose()">
  382. </report-dialog>
  383. <track-playback :dialogVisible="dialogVisibleTwo" :lineArr="lineArr" ref="playback"></track-playback>
  384. </div>
  385. </template>
  386. <script>
  387. import { getLazyTree } from "@/api/base/region";
  388. import {
  389. saveDelegationList,
  390. detailDelegationList,
  391. removeCollection,
  392. dispatchCollection,
  393. queryVehicle,
  394. cancelDispatchCollection,
  395. dispatchBatch,
  396. fleetDriverSave,
  397. recordingDetails,
  398. changeFleet,
  399. incidentalSubmit, saveFile, getFee, fleetList, conserveDispatch,
  400. checkAttachment, sendACarCollection, generateBill
  401. } from "@/api/landTransportation";
  402. import website from "@/config/website";
  403. import { getDeptTree } from "@/api/system/dept";
  404. import { customerList } from "@/api/basicData/basicFeesDesc";
  405. import { gaude, location } from "@/api/gaude";
  406. import reportDialog from "@/components/report-dialog/main";
  407. export default {
  408. props: {
  409. id: {
  410. type: String
  411. },
  412. home: {
  413. type: Boolean
  414. }
  415. },
  416. components: {
  417. reportDialog
  418. },
  419. data() {
  420. return {
  421. switchDialog: false,
  422. formData: {},
  423. enclosure: false,
  424. dialogVisibleTwo: false,
  425. lineArr: [],
  426. formAnnex: {},
  427. key: 0,
  428. formDataList: {},
  429. orderList: [],
  430. dialogChange: false,
  431. optionData: {
  432. span: 12,
  433. menuBtn: false,
  434. column: [{
  435. label: "车队",
  436. prop: "fleetId",
  437. }, {
  438. label: "应付陆运费",
  439. prop: "landAmountC",
  440. precision: 2,
  441. controls: false,
  442. type: 'number',
  443. }]
  444. },
  445. form: {},
  446. dataRecord: [],
  447. dialogRecord: false,
  448. optionRecord: {
  449. stripe: true,
  450. refreshBtn: false,
  451. columnBtn: false,
  452. menu: false,
  453. addBtn: false,
  454. align: 'center',
  455. column: [
  456. {
  457. label: '变更内容',
  458. prop: 'content'
  459. }, {
  460. label: '变更人',
  461. prop: 'changeUserName'
  462. }, {
  463. label: '变更时间',
  464. prop: 'changeTime'
  465. }
  466. ]
  467. },
  468. option: {
  469. span: 12,
  470. menuBtn: false,
  471. column: [{
  472. label: "车队",
  473. prop: "fleetId",
  474. rules: [{
  475. required: true,
  476. message: " ",
  477. trigger: "blur"
  478. }]
  479. }, {
  480. label: "应付陆运费",
  481. prop: "landAmountC",
  482. precision: 2,
  483. controls: false,
  484. type: 'number',
  485. }]
  486. },
  487. dialogVisible: false,
  488. c_button: false,
  489. goodsForm: {},
  490. orderFilesList: [],
  491. selectionList: [],
  492. roleName: localStorage.getItem("roleName").split(',')[0],
  493. roleNameTwo: localStorage.getItem("roleName").split(','),
  494. activeIndex: '1',
  495. batchDuling: true,
  496. breakConfiguration: {
  497. multipleChoices: false,
  498. multiple: false,
  499. disabled: false,
  500. searchShow: true,
  501. collapseTags: false,
  502. clearable: true,
  503. placeholder: '请点击右边按钮选择',
  504. dicData: []
  505. },
  506. advantageProjectData: [],
  507. treeOption: {
  508. label: 'title',
  509. value: 'id',
  510. lazy: true,
  511. lazyLoad(node, resolve) {
  512. const parentId = node.level === 0 ? '00' : node.data.id;
  513. getLazyTree(parentId).then(res => {
  514. resolve(
  515. res.data.data.map(item => {
  516. return {
  517. ...item,
  518. leaf: !item.hasChildren
  519. };
  520. })
  521. );
  522. });
  523. }
  524. },
  525. tableData: [],
  526. entrustListT: [],
  527. KeyBoxTwo: 0,
  528. entrustOptionTwoTBackup: {
  529. selectable: (row, index) => {
  530. return row.status === 0
  531. },
  532. align: 'center',
  533. menuAlign: 'center',
  534. index: true,
  535. cellBtn: false,
  536. refreshBtn: false,
  537. selection: true,
  538. selectionWidth: 55,
  539. menu: true,
  540. tip: false,
  541. addBtn: false,
  542. cancelBtn: false,
  543. editBtn: false,
  544. addRowBtn: false,
  545. delBtn: false,
  546. showSummary: true,
  547. // editBtn:false,
  548. summaryText: "合计",
  549. sumColumnList: [
  550. {
  551. name: 'landWeight',
  552. type: 'sum',
  553. decimals: 2
  554. }, {
  555. name: 'landAmountC',
  556. type: 'sum',
  557. decimals: 2
  558. }, {
  559. name: 'landAmountD',
  560. type: 'sum',
  561. decimals: 2
  562. }, {
  563. name: 'oneFeeD',
  564. type: 'sum',
  565. decimals: 2
  566. }, {
  567. name: 'twoFeeD',
  568. type: 'sum',
  569. decimals: 2
  570. }, {
  571. name: 'threeFeeD',
  572. type: 'sum',
  573. decimals: 2
  574. }, {
  575. name: 'fourFeeD',
  576. type: 'sum',
  577. decimals: 2
  578. }, {
  579. name: 'fiveFeeD',
  580. type: 'sum',
  581. decimals: 2
  582. }, {
  583. name: 'oneFeeC',
  584. type: 'sum',
  585. decimals: 2
  586. }, {
  587. name: 'twoFeeC',
  588. type: 'sum',
  589. decimals: 2
  590. }, {
  591. name: 'threeFeeC',
  592. type: 'sum',
  593. decimals: 2
  594. }, {
  595. name: 'fourFeeC',
  596. type: 'sum',
  597. decimals: 2
  598. }, {
  599. name: 'fiveFeeC',
  600. type: 'sum',
  601. decimals: 2
  602. }, {
  603. name: 'landAmountD',
  604. type: 'sum',
  605. decimals: 2
  606. }, {
  607. name: 'ctnQuantity',
  608. type: 'sum',
  609. decimals: 0
  610. }],
  611. column: [{
  612. label: '货运日期',
  613. type: "datetime",
  614. cell: true,
  615. format: 'yyyy-MM-dd HH:mm',
  616. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  617. width: 200,
  618. index: 1,
  619. prop: 'arrivalTime'
  620. }, {
  621. label: '实际到厂时间',
  622. prop: 'realArrivalTime',
  623. overHidden: true,
  624. type: "date",
  625. searchRange: true,
  626. defaultTime: ['00:00:00', '23:59:59'],
  627. format: "yyyy-MM-dd HH:mm",
  628. valueFormat: "yyyy-MM-dd HH:mm:ss",
  629. index: 2,
  630. width: 140,
  631. }, {
  632. label: '尺寸箱型',
  633. width: 100,
  634. slot: true,
  635. index: 3,
  636. prop: 'ctnType'
  637. }, {
  638. label: '箱量',
  639. width: 50,
  640. index: 4,
  641. prop: 'ctnQuantity'
  642. }, {
  643. label: '车队',
  644. width: 200,
  645. index: 5,
  646. type: 'select',
  647. cascader: ['plateNo'],
  648. overHidden: true,
  649. cell: true,
  650. prop: 'fleetId',
  651. dicUrl: "/api/blade-client/corpsdesc/list?size=1000&current=1&&corpType=CD",
  652. props: {
  653. label: "cname",
  654. value: "id",
  655. res: "data.records"
  656. }
  657. }, {
  658. label: '应付陆运费',
  659. cell: true,
  660. index: 5.1,
  661. prop: 'landAmountC'
  662. }, {
  663. label: '车号',
  664. width: 150,
  665. index: 6,
  666. cell: false,
  667. prop: 'plateNo',
  668. type: "select",
  669. dicUrl: "/api/blade-client/land-vehicle/vehicle-list?fleetId={{key}}",
  670. props: {
  671. label: "plateNo",
  672. value: "plateNo"
  673. },
  674. }, {
  675. label: '司机',
  676. width: 115,
  677. index: 7,
  678. prop: 'driverName'
  679. }, {
  680. label: '电话',
  681. width: 160,
  682. index: 8,
  683. prop: 'tel'
  684. }, {
  685. label: '完工日期',
  686. prop: 'finishedTime',
  687. overHidden: true,
  688. type: "date",
  689. searchRange: true,
  690. defaultTime: ['00:00:00', '23:59:59'],
  691. format: "yyyy-MM-dd HH:mm",
  692. valueFormat: "yyyy-MM-dd HH:mm:ss",
  693. index: 9,
  694. width: 140,
  695. }, {
  696. label: '货物名称',
  697. overHidden: true,
  698. width: 160,
  699. index: 10,
  700. prop: 'goods'
  701. }, {
  702. label: '件数',
  703. width: 100,
  704. overHidden: true,
  705. controls: false,
  706. cell: true,
  707. index: 11,
  708. prop: 'quantity',
  709. type: 'number',
  710. precision: 0
  711. }
  712. // , {
  713. // label: '包装',
  714. // width: 100,
  715. // overHidden: true,
  716. // cell: true,
  717. // prop: 'packing',
  718. // type: 'select',
  719. // dicUrl: "/api/blade-system/dict-biz/dictionary?code=packaging",
  720. // props: {
  721. // label: "dictValue",
  722. // value: "dictValue"
  723. // },
  724. // }
  725. , {
  726. label: '重量',
  727. width: 160,
  728. prop: 'landWeight',
  729. controls: false,
  730. precision: 2,
  731. index: 12,
  732. type: 'number'
  733. }, {
  734. label: '尺码',
  735. width: 100,
  736. overHidden: true,
  737. cell: true,
  738. index: 13,
  739. prop: 'size',
  740. }, {
  741. label: '单柜运费',
  742. index: 14,
  743. prop: 'landAmountD'
  744. },
  745. {
  746. label: '状态',
  747. width: 100,
  748. index: 15,
  749. type: 'select',
  750. dicUrl: "/api/blade-system/dict-biz/dictionary?code=land_order_status",
  751. props: {
  752. label: "dictValue",
  753. value: "dictKey"
  754. },
  755. dataType: "string",
  756. prop: 'status'
  757. }, {
  758. label: '委托备注',
  759. width: 245,
  760. index: 17,
  761. prop: 'remarks'
  762. }, {
  763. label: '车队备注',
  764. width: 245,
  765. index: 18,
  766. prop: 'fleetRemarks'
  767. }, {
  768. label: '司机备注',
  769. width: 245,
  770. index: 19,
  771. prop: 'driverRemarks'
  772. },
  773. // {
  774. // label: '应收场站费',
  775. // width: 100,
  776. // precision: 2,
  777. // index: 20,
  778. // controls: false,
  779. // cell: true,
  780. // type: 'number',
  781. // prop: 'oneFeeD'
  782. // }, {
  783. // label: '应收港杂费',
  784. // width: 100,
  785. // precision: 2,
  786. // cell: true,
  787. // index: 21,
  788. // controls: false,
  789. // type: 'number',
  790. // prop: 'twoFeeD'
  791. // }, {
  792. // label: '应收扣款',
  793. // width: 100,
  794. // index: 22,
  795. // precision: 2,
  796. // cell: true,
  797. // controls: false,
  798. // type: 'number',
  799. // prop: 'threeFeeD'
  800. // }, {
  801. // label: '应收待时费',
  802. // width: 100,
  803. // precision: 2,
  804. // index: 23,
  805. // cell: true,
  806. // controls: false,
  807. // type: 'number',
  808. // prop: 'fourFeeD'
  809. // }, {
  810. // label: '应收其他',
  811. // width: 100,
  812. // index: 24,
  813. // precision: 2,
  814. // cell: true,
  815. // type: 'number',
  816. // controls: false,
  817. // prop: 'fiveFeeD'
  818. // }, {
  819. // label: '应收费用备注',
  820. // width: 245,
  821. // index: 25,
  822. // cell: true,
  823. // prop: 'feeRemarksD'
  824. // }, {
  825. // label: '应付场站费',
  826. // width: 100,
  827. // index: 26,
  828. // precision: 2,
  829. // cell: true,
  830. // controls: false,
  831. // type: 'number',
  832. // prop: 'oneFeeC'
  833. // }, {
  834. // label: '应付港杂费',
  835. // width: 100,
  836. // precision: 2,
  837. // index: 27,
  838. // cell: true,
  839. // controls: false,
  840. // type: 'number',
  841. // prop: 'twoFeeC'
  842. // }, {
  843. // label: '应付扣款',
  844. // width: 100,
  845. // index: 28,
  846. // precision: 2,
  847. // controls: false,
  848. // type: 'number',
  849. // cell: true,
  850. // prop: 'threeFeeC'
  851. // }, {
  852. // label: '应付待时费',
  853. // width: 100,
  854. // precision: 2,
  855. // index: 29,
  856. // controls: false,
  857. // cell: true,
  858. // type: 'number',
  859. // prop: 'fourFeeC'
  860. // }, {
  861. // label: '应付其他',
  862. // width: 100,
  863. // precision: 2,
  864. // index: 30,
  865. // type: 'number',
  866. // cell: true,
  867. // controls: false,
  868. // prop: 'fiveFeeC'
  869. // }, {
  870. // label: '应付费用备注',
  871. // width: 245,
  872. // index: 31,
  873. // cell: true,
  874. // prop: 'feeRemarksC'
  875. // }
  876. ]
  877. },
  878. entrustOptionTwoT: {},
  879. entrustList: [],
  880. goodsOptionForm: {
  881. menuBtn: false,
  882. disabled: true,
  883. span: 8,
  884. column: [{
  885. label: '公司名称',
  886. formslot: true,
  887. prop: 'corpId',
  888. rules: [{
  889. required: true,
  890. message: " ",
  891. trigger: "change"
  892. }],
  893. }, {
  894. label: '所属部门',
  895. prop: 'salesmanDept',
  896. type: "tree",
  897. filter: false,
  898. dicData: [],
  899. props: {
  900. label: "title"
  901. }
  902. }, {
  903. label: '业务员',
  904. prop: 'salesman',
  905. type: "select",
  906. dicUrl: "/api/blade-user/userList",
  907. props: {
  908. label: "realName",
  909. value: "id"
  910. },
  911. rules: [{
  912. required: true,
  913. message: " ",
  914. trigger: "blur"
  915. }]
  916. }, {
  917. label: '物流运输',
  918. prop: 'dispatchDept',
  919. cascader: ['dispatcher'],
  920. dicUrl: "/api/blade-system/dept/top-list?deptCategory=1",
  921. type: "select",
  922. props: {
  923. label: "deptName",
  924. value: "id"
  925. },
  926. rules: [{
  927. required: true,
  928. message: " ",
  929. trigger: "blur"
  930. }]
  931. }, {
  932. label: '运输调度',
  933. prop: 'dispatcher',
  934. type: "select",
  935. dicUrl: "/api/blade-user/deptUserList?deptPid={{key}}",
  936. props: {
  937. label: "realName",
  938. value: "id"
  939. }
  940. }, {
  941. label: '委托日期',
  942. prop: 'bsDate',
  943. type: "datetime",
  944. format: 'yyyy-MM-dd HH:mm',
  945. valueFormat: 'yyyy-MM-dd HH:mm:ss',
  946. }, {
  947. label: '票据号',
  948. prop: 'receiptNo'
  949. }, {
  950. label: '联系电话',
  951. prop: 'tel'
  952. }, {
  953. label: '提单号',
  954. prop: 'billNo',
  955. rules: [{
  956. required: true,
  957. message: " ",
  958. trigger: "blur"
  959. }],
  960. }, {
  961. label: '场站',
  962. prop: 'station',
  963. rules: [{
  964. required: true,
  965. message: " ",
  966. trigger: "blur"
  967. }],
  968. },
  969. // {
  970. // label: '货运日期',
  971. // type: "datetime",
  972. // format: 'yyyy-MM-dd HH:mm:ss',
  973. // valueFormat: 'yyyy-MM-dd HH:mm:ss',
  974. // prop: 'arrivalTime',
  975. // rules: [{
  976. // required: true,
  977. // message: " ",
  978. // trigger: "blur"
  979. // }],
  980. // },
  981. {
  982. label: '备注',
  983. span: 24,
  984. minRows: 2,
  985. prop: 'remarks',
  986. type: 'textarea'
  987. }]
  988. },
  989. goodsOptionFormTwo: {
  990. menuBtn: false,
  991. disabled: true,
  992. span: 8,
  993. column: [
  994. // {
  995. // label: '所属公司',
  996. // formslot: true,
  997. // prop: 'belongCompany',
  998. // rules: [{
  999. // required: false,
  1000. // message: " ",
  1001. // trigger: "blur"
  1002. // }],
  1003. // },
  1004. {
  1005. label: '船名航次',
  1006. prop: 'factory',
  1007. rules: [{
  1008. required: false,
  1009. message: " ",
  1010. trigger: "blur"
  1011. }],
  1012. }
  1013. // , {
  1014. // label: '货物名称',
  1015. // prop: 'goods',
  1016. // rules: [{
  1017. // required: false,
  1018. // message: " ",
  1019. // trigger: "blur"
  1020. // }],
  1021. // }
  1022. , {
  1023. label: '开船日期',
  1024. prop: 'etd',
  1025. type: 'date'
  1026. }, {
  1027. label: '预配箱量',
  1028. prop: 'expectCtnQty',
  1029. }, {
  1030. label: '起运港',
  1031. prop: 'polId'
  1032. }, {
  1033. label: '目的港',
  1034. prop: 'podId'
  1035. }, {
  1036. label: '截港日期',
  1037. prop: 'etc',
  1038. type: 'date'
  1039. }, {
  1040. label: '截单日期',
  1041. prop: 'siCutoffDate',
  1042. type: 'date'
  1043. }, {
  1044. label: '订舱代理',
  1045. prop: 'agentId'
  1046. }]
  1047. },
  1048. entrustOptionTwo: {
  1049. align: 'center',
  1050. menuAlign: 'center',
  1051. addBtnText: '录入箱信息',
  1052. index: true,
  1053. cellBtn: true,
  1054. addBtn: false,
  1055. addRowBtn: true,
  1056. showSummary: true,
  1057. summaryText: "合计",
  1058. sumColumnList: [
  1059. {
  1060. name: 'landWeight',
  1061. type: 'sum',
  1062. decimals: 2
  1063. }, {
  1064. name: 'landAmountD',
  1065. type: 'sum',
  1066. decimals: 2
  1067. }, {
  1068. name: 'ctnQuantity',
  1069. type: 'sum',
  1070. decimals: 7
  1071. }],
  1072. column: [{
  1073. label: '尺寸箱型',
  1074. cell: true,
  1075. prop: 'ctnType',
  1076. type: 'select',
  1077. width: 100,
  1078. dicUrl: "/api/blade-system/dict-biz/dictionary?code=boxType",
  1079. props: {
  1080. label: "dictValue",
  1081. value: "dictKey"
  1082. }
  1083. }, {
  1084. label: '箱量',
  1085. cell: true,
  1086. prop: 'ctnQuantity',
  1087. controls: false,
  1088. precision: 0,
  1089. width: 100,
  1090. type: 'number'
  1091. }, {
  1092. label: '总重量(吨)',
  1093. cell: true,
  1094. prop: 'landWeight',
  1095. controls: false,
  1096. width: 200,
  1097. precision: 2,
  1098. type: 'number'
  1099. }, {
  1100. label: '单柜运费',
  1101. cell: true,
  1102. prop: 'landAmountD',
  1103. controls: false,
  1104. width: 200,
  1105. precision: 2,
  1106. type: 'number'
  1107. }, {
  1108. label: '备注',
  1109. cell: true,
  1110. width: 200,
  1111. prop: 'remarks'
  1112. }
  1113. ]
  1114. },
  1115. collectionList: [],
  1116. collectionOption: {},
  1117. collectionOptionBackup: {
  1118. align: 'center',
  1119. menuAlign: 'center',
  1120. index: true,
  1121. cancelBtn: false,
  1122. editBtn: false,
  1123. delBtn: false,
  1124. cellBtn: false,
  1125. addBtn: false,
  1126. addRowBtn: false,
  1127. showSummary: true,
  1128. addBtnText: '录入明细',
  1129. summaryText: "合计",
  1130. sumColumnList: [{
  1131. name: 'price',
  1132. type: 'sum',
  1133. decimals: 2
  1134. }, {
  1135. name: 'amount',
  1136. type: 'sum',
  1137. decimals: 2
  1138. }, {
  1139. name: 'quantity',
  1140. type: 'sum',
  1141. decimals: 1
  1142. }],
  1143. column: [{
  1144. label: '客户名称',
  1145. slot: true,
  1146. width: 300,
  1147. prop: 'corpId'
  1148. }, {
  1149. label: '车号',
  1150. cell: true,
  1151. prop: 'plateNo',
  1152. type: "select",
  1153. props: {
  1154. label: "label",
  1155. value: "label"
  1156. },
  1157. }, {
  1158. label: '费用名称',
  1159. slot: true,
  1160. width: 200,
  1161. prop: 'feeId'
  1162. }, {
  1163. label: '计价单位',
  1164. cell: true,
  1165. prop: 'unit',
  1166. type: "select",
  1167. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1168. props: {
  1169. label: "dictValue",
  1170. value: "dictKey"
  1171. }
  1172. }, {
  1173. label: '单价',
  1174. cell: true,
  1175. type: 'number',
  1176. controls: false,
  1177. prop: 'price'
  1178. }, {
  1179. label: '数量',
  1180. cell: true,
  1181. controls: false,
  1182. type: 'number',
  1183. prop: 'quantity'
  1184. }, {
  1185. label: '金额',
  1186. cell: true,
  1187. type: 'number',
  1188. controls: false,
  1189. prop: 'amount'
  1190. }, {
  1191. label: '税率',
  1192. cell: true,
  1193. prop: 'taxRate'
  1194. }, {
  1195. label: '币别',
  1196. cell: true,
  1197. prop: 'currency',
  1198. type: "select",
  1199. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1200. props: {
  1201. label: "dictValue",
  1202. value: "dictKey"
  1203. },
  1204. }
  1205. ]
  1206. },
  1207. paymentList: [],
  1208. paymentOption: {},
  1209. paymentOptionBackup: {
  1210. align: 'center',
  1211. menuAlign: 'center',
  1212. index: true,
  1213. cancelBtn: false,
  1214. editBtn: false,
  1215. delBtn: false,
  1216. cellBtn: false,
  1217. addBtn: false,
  1218. addRowBtn: false,
  1219. showSummary: true,
  1220. addBtnText: '录入明细',
  1221. summaryText: "合计",
  1222. sumColumnList: [{
  1223. name: 'price',
  1224. type: 'sum',
  1225. decimals: 2
  1226. }, {
  1227. name: 'amount',
  1228. type: 'sum',
  1229. decimals: 2
  1230. }, {
  1231. name: 'quantity',
  1232. type: 'sum',
  1233. decimals: 1
  1234. }],
  1235. column: [{
  1236. label: '客户名称',
  1237. cell: true,
  1238. width: 300,
  1239. prop: 'fleetId',
  1240. type: "select",
  1241. cascader: ['plateNo'],
  1242. props: {
  1243. label: "fleetName",
  1244. value: "fleetId"
  1245. },
  1246. change: (data) => {
  1247. data.row.plateNo = ''
  1248. }
  1249. },
  1250. // {
  1251. // label: '客户名称',
  1252. // slot: true,
  1253. // width: 300,
  1254. // prop: 'corpId'
  1255. // },
  1256. {
  1257. label: '车号',
  1258. cell: true,
  1259. prop: 'plateNo',
  1260. type: "select",
  1261. props: {
  1262. label: "label",
  1263. value: "label"
  1264. }
  1265. }, {
  1266. label: '费用名称',
  1267. slot: true,
  1268. width: 200,
  1269. prop: 'feeId'
  1270. }, {
  1271. label: '计价单位',
  1272. cell: true,
  1273. prop: 'unit',
  1274. type: "select",
  1275. dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit",
  1276. props: {
  1277. label: "dictValue",
  1278. value: "dictKey"
  1279. }
  1280. }, {
  1281. label: '单价',
  1282. cell: true,
  1283. controls: false,
  1284. type: 'number',
  1285. prop: 'price',
  1286. }, {
  1287. label: '数量',
  1288. cell: true,
  1289. controls: false,
  1290. type: 'number',
  1291. prop: 'quantity'
  1292. }, {
  1293. label: '金额',
  1294. cell: true,
  1295. controls: false,
  1296. type: 'number',
  1297. prop: 'amount'
  1298. }, {
  1299. label: '税率',
  1300. cell: true,
  1301. prop: 'taxRate'
  1302. }, {
  1303. label: '币别',
  1304. cell: true,
  1305. prop: 'currency',
  1306. type: "select",
  1307. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  1308. props: {
  1309. label: "dictValue",
  1310. value: "dictKey"
  1311. },
  1312. },
  1313. ]
  1314. }
  1315. };
  1316. },
  1317. watch: {
  1318. goodsForm: {
  1319. handler(newValue, oldValue) {
  1320. if (this.roleNameTwo.indexOf('调度中心业务员') !== -1 || this.roleNameTwo.indexOf('调度中心经理') !== -1) {
  1321. this.paymentOption.menu = false
  1322. this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
  1323. this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
  1324. }
  1325. }
  1326. },
  1327. entrustOptionTwoT: {
  1328. handler(newValue, oldValue) {
  1329. if (this.roleNameTwo.indexOf('调度中心业务员') !== -1 || this.roleNameTwo.indexOf('调度中心经理') !== -1) {
  1330. this.paymentOption.menu = false
  1331. this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
  1332. this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
  1333. }
  1334. if (this.roleNameTwo == '平台,调度派单') {
  1335. // this.findObject(this.entrustOptionTwoT.column, "landAmountC").hide = true
  1336. // this.findObject(this.entrustOptionTwoT.column, "landAmountC").showColumn = false
  1337. this.findObject(this.entrustOptionTwoT.column, "landAmountD").hide = true
  1338. this.findObject(this.entrustOptionTwoT.column, "landAmountD").showColumn = false
  1339. }
  1340. }
  1341. }
  1342. },
  1343. async created() {
  1344. this.activeIndex = this.roleNameTwo.indexOf('调度中心业务员') !== -1 ? '2' : this.roleNameTwo.indexOf('调度中心经理') !== -1 ? '2' : '1'
  1345. this.entrustOptionTwoT = await this.getColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1346. this.collectionOption = await this.getColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1347. this.paymentOption = await this.getColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1348. this.KeyBoxTwo++
  1349. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1350. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1351. this.findObject(this.paymentOption.column, "plateNo").dicFormatter = (data) => {
  1352. let list = []
  1353. data.data.forEach(ele => {
  1354. list.push({ label: ele })
  1355. })
  1356. return list
  1357. }
  1358. if (this.findObject(this.collectionOption.column, "price") != -1) {
  1359. this.findObject(this.collectionOption.column, "price").change = (data) => {
  1360. if (data.row.price && data.row.quantity) {
  1361. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1362. }
  1363. }
  1364. this.findObject(this.collectionOption.column, "quantity").change = (data) => {
  1365. if (data.row.price && data.row.quantity) {
  1366. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1367. }
  1368. }
  1369. this.findObject(this.paymentOption.column, "price").change = (data) => {
  1370. if (data.row.price && data.row.quantity) {
  1371. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1372. }
  1373. }
  1374. this.findObject(this.paymentOption.column, "quantity").change = (data) => {
  1375. if (data.row.price && data.row.quantity) {
  1376. data.row.amount = Number(data.row.price) * Number(data.row.quantity)
  1377. }
  1378. }
  1379. }
  1380. this.KeyBoxTwo++
  1381. if (this.id) {
  1382. detailDelegationList({ id: this.id, kind: '2' }).then(res => {
  1383. this.goodsForm = res.data.data
  1384. this.tableData = res.data.data.orderAddressList
  1385. this.entrustList = res.data.data.orderItemList
  1386. this.goodsList = res.data.data.orderItemList
  1387. this.orderFilesList = res.data.data.fileList
  1388. if (res.data.data.orderFeeList.length > 0) {
  1389. res.data.data.orderFeeList.forEach(item => {
  1390. if (item.type == 1) {
  1391. this.collectionList.push(item)
  1392. } else {
  1393. this.paymentList.push(item)
  1394. }
  1395. })
  1396. }
  1397. delete this.goodsForm.orderAddressList
  1398. delete this.goodsForm.orderItemList
  1399. delete this.goodsForm.orderFeeList
  1400. // this.tableData.forEach(item => {
  1401. // if (item.region) item.region = item.region.split(',')
  1402. // })
  1403. if (this.roleNameTwo.indexOf('总调度') !== -1) {
  1404. this.entrustOptionTwoT.menu = false
  1405. this.collectionOption.menu = false
  1406. this.paymentOption.menu = false
  1407. }
  1408. })
  1409. }
  1410. this.KeyBoxTwo++
  1411. this.findObject(this.entrustOptionTwoT.column, "plateNo").change = (data) => {
  1412. fleetList({ fleetId: data.row.fleetId }).then(res => {
  1413. for (let item in res.data.data) {
  1414. if (data.value === res.data.data[item].plateNo) {
  1415. this.entrustList[data.index].driverId = res.data.data[item].driverId
  1416. this.entrustList[data.index].driverName = res.data.data[item].driverName
  1417. this.entrustList[data.index].tel = res.data.data[item].tel
  1418. }
  1419. }
  1420. })
  1421. }
  1422. queryVehicle({ orderId: this.id }).then(res => {
  1423. const column = this.findObject(this.collectionOption.column, "plateNo");
  1424. column.dicData = []
  1425. res.data.data.forEach(item => {
  1426. column.dicData.push({ label: item })
  1427. })
  1428. this.key++
  1429. });
  1430. // this.findObject(this.paymentOption.column, "plateNo").change = (data) => {
  1431. // const columnTwo = this.findObject(this.paymentOption.column, "plateNo");
  1432. // columnTwo.dicData = []
  1433. // queryVehicle({orderId: this.id,fleetId:data.row.fleetId}).then(res => {
  1434. // res.data.data.forEach(item => {
  1435. // columnTwo.dicData.push({label: item})
  1436. // })
  1437. // });
  1438. // this.key++
  1439. // }
  1440. this.$refs.other.show = false
  1441. // 非租户模式默认加载管理组数据
  1442. if (!website.tenantMode) {
  1443. this.initData(website.tenantId);
  1444. } else {
  1445. this.initData();
  1446. }
  1447. this.KeyBoxTwo++
  1448. },
  1449. methods: {
  1450. openReport() {
  1451. this.switchDialog = !this.switchDialog;
  1452. },
  1453. onClose(val) {
  1454. this.switchDialog = val;
  1455. },
  1456. updateFee() {
  1457. const loading = this.$loading({
  1458. lock: true,
  1459. text: '加载中',
  1460. spinner: 'el-icon-loading',
  1461. background: 'rgba(255,255,255,0.7)'
  1462. });
  1463. generateBill({ id: this.goodsForm.id }).then(res => {
  1464. this.$message.success("更新账单成功")
  1465. loading.close();
  1466. }).catch(() => {
  1467. loading.close();
  1468. })
  1469. },
  1470. schedulingFileSaving() {
  1471. this.c_button = true
  1472. conserveDispatch({
  1473. fileList: this.orderFilesList,
  1474. id: this.goodsForm.id
  1475. }).then(res => {
  1476. checkAttachment({ id: this.goodsForm.id }).then(res => {
  1477. this.orderFilesList = res.data.data
  1478. this.c_button = false
  1479. })
  1480. })
  1481. },
  1482. openTrack(row) {
  1483. gaude({ itemId: row.id, plateNo: row.plateNo, tenantId: '234557', color: '2' }).then(res => {
  1484. this.lineArr = res.data.data.trackArray
  1485. this.dialogVisibleTwo = true
  1486. let this_ = this
  1487. setTimeout(function () {
  1488. this_.$refs.playback.initMap();
  1489. }, 100)
  1490. })
  1491. // location({itemId: row.id,plateNo:'陕YH0008'}).then(res => {
  1492. // // console.log(res.data.data)
  1493. // // console.log(this.lineArr[this.lineArr.length - 1])
  1494. // })
  1495. },
  1496. //自定义列保存
  1497. async saveColumnBoxTwo() {
  1498. /**
  1499. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1500. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1501. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1502. */
  1503. const inSave = await this.saveColumnData(this.getColumnName(86.1), this.entrustOptionTwoT);
  1504. if (inSave) {
  1505. this.$message.success("保存成功");
  1506. //关闭窗口
  1507. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1508. }
  1509. },
  1510. //自定义列重置
  1511. async resetColumnBoxTwo() {
  1512. this.entrustOptionTwoT = this.entrustOptionTwoTBackup;
  1513. const inSave = await this.delColumnData(this.getColumnName(86.1), this.entrustOptionTwoTBackup);
  1514. if (inSave) {
  1515. this.$message.success("重置成功");
  1516. this.$refs.crudBoxTwo.$refs.dialogColumn.columnBox = false;
  1517. }
  1518. if (this.roleNameTwo.indexOf('总调度') !== -1) {
  1519. this.entrustOptionTwoT.menu = false
  1520. this.collectionOption.menu = false
  1521. this.paymentOption.menu = false
  1522. }
  1523. },
  1524. //自定义列保存
  1525. async saveColumnCollection() {
  1526. /**
  1527. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1528. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1529. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1530. */
  1531. const inSave = await this.saveColumnData(this.getColumnName(86.4), this.collectionOption);
  1532. if (inSave) {
  1533. this.$message.success("保存成功");
  1534. //关闭窗口
  1535. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1536. }
  1537. },
  1538. //自定义列重置
  1539. async resetColumnCollection() {
  1540. this.collectionOption = this.collectionOptionBackup;
  1541. const inSave = await this.delColumnData(this.getColumnName(86.4), this.collectionOptionBackup);
  1542. if (inSave) {
  1543. this.$message.success("重置成功");
  1544. this.$refs.collection.$refs.dialogColumn.columnBox = false;
  1545. }
  1546. },
  1547. //自定义列保存
  1548. async saveColumnPayment() {
  1549. /**
  1550. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1551. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1552. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1553. */
  1554. const inSave = await this.saveColumnData(this.getColumnName(86.5), this.paymentOption);
  1555. if (inSave) {
  1556. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1557. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1558. this.$message.success("保存成功");
  1559. //关闭窗口
  1560. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1561. }
  1562. },
  1563. //自定义列重置
  1564. async resetColumnPayment() {
  1565. this.paymentOption = this.paymentOptionBackup;
  1566. const inSave = await this.delColumnData(this.getColumnName(86.5), this.paymentOptionBackup);
  1567. if (inSave) {
  1568. this.$message.success("重置成功");
  1569. this.findObject(this.paymentOption.column, "fleetId").dicUrl = "/api/blade-land/order-fee/fleet?orderId=" + this.id
  1570. this.findObject(this.paymentOption.column, "plateNo").dicUrl = "api/blade-land/order-fee/plate-no?orderId=" + this.id + '&fleetId={{key}}'
  1571. this.$refs.payment.$refs.dialogColumn.columnBox = false;
  1572. }
  1573. },
  1574. //打开附件
  1575. annexOpen(row, index) {
  1576. if (row.id) {
  1577. this.enclosure = true
  1578. this.formAnnex = row
  1579. getFee({ id: row.id }).then(res => {
  1580. this.orderList = res.data.data
  1581. })
  1582. } else {
  1583. this.$message.error('请保存后再上传附件');
  1584. }
  1585. },
  1586. //保存
  1587. saveAnnex() {
  1588. saveFile({
  1589. id: this.formAnnex.id,
  1590. fileList: this.orderList
  1591. }).then(res => {
  1592. this.$message.success("保存成功");
  1593. this.annexOpen(this.formAnnex)
  1594. })
  1595. },
  1596. getCorpData(val) {
  1597. this.formData.fleetName = val.cname
  1598. },
  1599. confirmChange() {
  1600. changeFleet({
  1601. ...this.formData,
  1602. id: this.formDataList.id,
  1603. orderId: this.goodsForm.id,
  1604. originalFleetName: this.formDataList.fleetName
  1605. }).then(res => {
  1606. this.$refs.saveForm.resetForm()
  1607. this.entrustList = res.data.data
  1608. this.dialogChange = false
  1609. this.$message.success("变更成功");
  1610. })
  1611. },
  1612. //查询业务部门
  1613. initData(tenantId) {
  1614. getDeptTree(tenantId).then(res => {
  1615. const column = this.findObject(this.goodsOptionForm.column, "salesmanDept");
  1616. column.dicData = res.data.data;
  1617. });
  1618. },
  1619. //多选触发
  1620. selectionChange(list) {
  1621. this.selectionList = list
  1622. if (this.selectionList.length === 0) {
  1623. return this.batchDuling = true
  1624. } else {
  1625. for (let item in this.selectionList) {
  1626. if (this.selectionList[item].status > 0) {
  1627. return this.batchDuling = true
  1628. }
  1629. }
  1630. return this.batchDuling = false
  1631. }
  1632. },
  1633. //批量调度
  1634. batchScheduling() {
  1635. this.form = {}
  1636. this.dialogVisible = true
  1637. },
  1638. //提交调度
  1639. saveScheduling() {
  1640. this.$refs['form'].validate((valid, done) => {
  1641. done()
  1642. if (valid) {
  1643. let data = []
  1644. this.$confirm('是否确认调度?', '提示', {
  1645. confirmButtonText: '确定',
  1646. cancelButtonText: '取消',
  1647. type: 'warning'
  1648. }).then(() => {
  1649. this.selectionList.forEach(item => data.push(item.id))
  1650. dispatchBatch({
  1651. ...this.form,
  1652. idList: data,
  1653. orderId: this.goodsForm.id
  1654. }).then(res => {
  1655. this.entrustList = res.data.data
  1656. this.dialogVisible = false
  1657. })
  1658. }).catch(() => {
  1659. this.$message({
  1660. type: 'info',
  1661. message: '已取消'
  1662. });
  1663. });
  1664. } else {
  1665. return false
  1666. }
  1667. })
  1668. },
  1669. //刷新数据
  1670. refreshData() {
  1671. detailDelegationList({ id: this.id, kind: '2' }).then(res => {
  1672. this.goodsForm = res.data.data
  1673. this.tableData = res.data.data.orderAddressList
  1674. this.entrustList = res.data.data.orderItemList
  1675. this.goodsList = res.data.data.orderItemList
  1676. this.orderFilesList = res.data.data.fileList
  1677. if (res.data.data.orderFeeList.length > 0) {
  1678. res.data.data.orderFeeList.forEach(item => {
  1679. if (item.type == 1) {
  1680. this.collectionList.push(item)
  1681. } else {
  1682. this.paymentList.push(item)
  1683. }
  1684. })
  1685. }
  1686. delete this.goodsForm.orderAddressList
  1687. delete this.goodsForm.orderItemList
  1688. delete this.goodsForm.orderFeeList
  1689. // this.tableData.forEach(item => {
  1690. // if (item.region) item.region = item.region.split(',')
  1691. // })
  1692. })
  1693. },
  1694. //切换收付费
  1695. handleSelect(tab, event) {
  1696. this.activeIndex = tab.name
  1697. },
  1698. //箱信息保存
  1699. rowSaveT(row, index, done, loading) {
  1700. if (row.$cellEdit) {
  1701. fleetDriverSave(row).then(res => {
  1702. this.$message.success("保存成功");
  1703. })
  1704. }
  1705. this.$refs.crudBoxTwo.rowCell(row, index)
  1706. },
  1707. //调度并且派车
  1708. rowSaveThree(row, index, done, loading) {
  1709. if (row.$cellEdit) {
  1710. if (!row.plateNo) {
  1711. return this.$message.warning('未选择车号,请选择');
  1712. }
  1713. if (!row.fleetId) {
  1714. return this.$message.warning('请选择车队');
  1715. }
  1716. this.$confirm('是否确定调度派车', '提示', {
  1717. confirmButtonText: '确定',
  1718. cancelButtonText: '取消',
  1719. type: 'warning'
  1720. }).then(() => {
  1721. sendACarCollection(row).then(res => {
  1722. this.$message.success('操作成功');
  1723. this.$refs.crudBoxTwo.rowCell(row, index)
  1724. this.refreshData()
  1725. })
  1726. }).catch(() => {
  1727. this.$message({
  1728. type: 'info',
  1729. message: '已取消'
  1730. });
  1731. this.$refs.crudBoxTwo.rowCell(row, index)
  1732. });
  1733. } else {
  1734. this.entrustOptionTwoT.column.forEach(item => {
  1735. if (item.prop === 'plateNo') {
  1736. item.cell = true
  1737. }
  1738. if (item.prop === 'driverName') {
  1739. item.cell = true
  1740. }
  1741. if (item.prop === 'tel') {
  1742. item.cell = true
  1743. }
  1744. })
  1745. this.$refs.crudBoxTwo.rowCell(row, index)
  1746. }
  1747. },
  1748. rowSaveWell(row, index, done, loading) {
  1749. done()
  1750. },
  1751. //箱信息调度
  1752. designate(row, index) {
  1753. if (row.fleetId) {
  1754. this.$confirm('是否确定调度', '提示', {
  1755. confirmButtonText: '确定',
  1756. cancelButtonText: '取消',
  1757. type: 'warning'
  1758. }).then(() => {
  1759. dispatchCollection(row).then(res => {
  1760. this.$message.success('操作成功');
  1761. this.entrustList[index].status = res.data.data.status
  1762. })
  1763. }).catch(() => {
  1764. this.$message({
  1765. type: 'info',
  1766. message: '已取消'
  1767. });
  1768. });
  1769. } else {
  1770. this.$message.warning('请选择车队');
  1771. }
  1772. },
  1773. //变更车队
  1774. changeFleetT(row, index) {
  1775. this.formDataList = row
  1776. this.dialogChange = true
  1777. this.formData = row
  1778. },
  1779. //打开变更记录
  1780. recordsOfChanges(row, index) {
  1781. this.dialogRecord = true
  1782. recordingDetails({ itemId: row.id, kind: 2 }).then(res => {
  1783. this.dataRecord = res.data.data
  1784. })
  1785. },
  1786. //取消调度
  1787. cancelDesignate(row, index) {
  1788. this.$confirm('是否确定取消调度', '提示', {
  1789. confirmButtonText: '确定',
  1790. cancelButtonText: '取消',
  1791. type: 'warning'
  1792. }).then(() => {
  1793. cancelDispatchCollection({ id: row.id }).then(res => {
  1794. this.$message.success('操作成功');
  1795. this.entrustList[index].status = res.data.data.status
  1796. })
  1797. }).catch(() => {
  1798. this.$message({
  1799. type: 'info',
  1800. message: '已取消'
  1801. });
  1802. });
  1803. },
  1804. //箱信息选择车队
  1805. getfleetIdT(data, row) {
  1806. this.$set(row, 'fleetName', data.cname)
  1807. console.log(this.$refs.crudBoxTwo)
  1808. // this.$refs.crudBoxTwo.handleChange({
  1809. // label: '车队',
  1810. // width: 200,
  1811. // index: 5,
  1812. // prop: 'fleetId',
  1813. // cascader: ['plateNo'],
  1814. // },row)
  1815. },
  1816. //地址新增
  1817. addAddress() {
  1818. this.tableData.splice(this.tableData.length - 1, 0, { leas: 1111 })
  1819. },
  1820. //返回主列表
  1821. backToList(value) {
  1822. if (value === 0) {
  1823. this.$emit('backToList')
  1824. } else if (value === 1) {
  1825. this.$emit('backToList', true)
  1826. } else if (value === 2) {
  1827. this.$router.push({
  1828. path: '/landTransportation/reportAnalysis/index'
  1829. });
  1830. }
  1831. },
  1832. //删除途径地址
  1833. deleteAddress(scope) {
  1834. this.tableData.splice(scope.$index, 1);
  1835. },
  1836. //箱信息保存
  1837. rowSave(row, index, done, loading) {
  1838. row.$cellEdit = false
  1839. done()
  1840. },
  1841. rowCell(row, index) {
  1842. if (row.$cellEdit) {
  1843. if (row.plateNo) {
  1844. if (row.feeId) {
  1845. incidentalSubmit(row).then(res => {
  1846. this.$refs.collection.rowCell(row, index)
  1847. row = res.data.data
  1848. this.$message.success("保存成功");
  1849. })
  1850. } else {
  1851. this.$message.error("请选择费用名称");
  1852. }
  1853. } else {
  1854. this.$message.error("请选择车号");
  1855. }
  1856. } else {
  1857. this.$refs.collection.rowCell(row, index)
  1858. }
  1859. },
  1860. paymentRowCell(row, index) {
  1861. if (row.$cellEdit) {
  1862. if (row.plateNo) {
  1863. if (row.feeId) {
  1864. incidentalSubmit(row).then(res => {
  1865. row = {
  1866. ...res.data.data,
  1867. $cellEdit: true
  1868. }
  1869. this.$message.success("保存成功");
  1870. this.$refs.payment.rowCell(row, index)
  1871. })
  1872. } else {
  1873. this.$message.error("请选择费用名称");
  1874. }
  1875. } else {
  1876. this.$message.error("请选择车号");
  1877. }
  1878. } else {
  1879. this.$refs.payment.rowCell(row, index)
  1880. }
  1881. },
  1882. //箱信息移除
  1883. rowDel(row, index) {
  1884. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1885. confirmButtonText: '确定',
  1886. cancelButtonText: '取消',
  1887. type: 'warning'
  1888. }).then(() => {
  1889. this.entrustList.splice(index, 1);
  1890. }).catch(() => {
  1891. this.$message({
  1892. type: 'info',
  1893. message: '已取消删除'
  1894. });
  1895. });
  1896. },
  1897. //保存
  1898. editCustomer() {
  1899. let data = JSON.parse(JSON.stringify(this.tableData))
  1900. // data.forEach(item => {
  1901. // if (item.region.length !== 0) item.region = item.region.join(',')
  1902. // })
  1903. saveDelegationList({
  1904. ...this.goodsForm,
  1905. kind: '2',
  1906. orderAddressList: data,
  1907. orderItemList: this.entrustList,
  1908. orderFeeList: this.collectionList.concat(this.paymentList)
  1909. }).then(res => {
  1910. this.$message.success('保存成功');
  1911. })
  1912. },
  1913. //收费新增
  1914. addRowCollection() {
  1915. if (this.selectionList.length == 1) {
  1916. customerList({ size: 10, current: 1 }).then(res => {
  1917. this.$refs.collection.rowCellAdd({
  1918. currency: '1',
  1919. type: '1',
  1920. itemId: this.selectionList[0].id,
  1921. // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
  1922. // unit: '件数',
  1923. // corpId: this.goodsForm.corpId,
  1924. // corpName: this.goodsForm.corpName,
  1925. // quantity: 1,
  1926. orderId: this.id,
  1927. $cellEdit: true
  1928. });
  1929. })
  1930. } else if (this.selectionList.length == 0) {
  1931. this.$message.warning('请选择一条车辆信息')
  1932. } else if (this.selectionList.length > 0) {
  1933. this.$message.warning('请选择一条车辆信息')
  1934. }
  1935. },
  1936. //付费新增
  1937. addRowPayment() {
  1938. if (this.selectionList.length == 1) {
  1939. customerList({ size: 10, current: 1 }).then(res => {
  1940. this.$refs.payment.rowCellAdd({
  1941. currency: '1',
  1942. type: '2',
  1943. itemId: this.selectionList[0].id,
  1944. // feeId: res.data.data.records.length > 0 ? res.data.data.records[0].id : '',
  1945. // unit: '件数',
  1946. // quantity: 1,
  1947. // corpId: '1526835847238901762',
  1948. orderId: this.id,
  1949. $cellEdit: true
  1950. });
  1951. })
  1952. } else if (this.selectionList.length == 0) {
  1953. this.$message.warning('请选择一条车辆信息')
  1954. } else if (this.selectionList.length > 0) {
  1955. this.$message.warning('请选择一条车辆信息')
  1956. }
  1957. },
  1958. //选择费用
  1959. selectValue(value, row) {
  1960. this.$set(row, 'feeName', value.cname)
  1961. },
  1962. //选择客户信息触发
  1963. getfleetId(data, row) {
  1964. this.$set(row, 'corpName', data.cname)
  1965. },
  1966. //收款信息移除
  1967. makeDel(row, index) {
  1968. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1969. confirmButtonText: '确定',
  1970. cancelButtonText: '取消',
  1971. type: 'warning'
  1972. }).then(() => {
  1973. if (row.id) removeCollection(row.id)
  1974. this.collectionList.splice(index, 1);
  1975. }).catch(() => {
  1976. this.$message({
  1977. type: 'info',
  1978. message: '已取消删除'
  1979. });
  1980. });
  1981. },
  1982. //付款信息移除
  1983. feeDel(row, index) {
  1984. this.$confirm('此操作将永久删除该单据, 是否继续?', '提示', {
  1985. confirmButtonText: '确定',
  1986. cancelButtonText: '取消',
  1987. type: 'warning'
  1988. }).then(() => {
  1989. if (row.id) removeCollection(row.id)
  1990. this.paymentList.splice(index, 1);
  1991. }).catch(() => {
  1992. this.$message({
  1993. type: 'info',
  1994. message: '已取消删除'
  1995. });
  1996. });
  1997. },
  1998. //自定义表头
  1999. renderHeader(h) {
  2000. return (
  2001. <div>
  2002. <el-tooltip className="item" effect="dark" content="增加途径地址" placement="top">
  2003. <el-button type="primary" icon="el-icon-plus" size="mini" circle onClick={() => this.addAddress()}
  2004. style="margin-right: 1.25rem;"></el-button>
  2005. </el-tooltip>
  2006. </div>
  2007. )
  2008. }
  2009. }
  2010. }
  2011. </script>
  2012. <style scoped lang="scss">
  2013. ::v-deep .el-form-item {
  2014. margin-bottom: 8px;
  2015. }
  2016. ::v-deep .el-form-item__content {
  2017. line-height: 32px;
  2018. }
  2019. ::v-deep .el-card__body {
  2020. padding: 10px 15px;
  2021. font-size: 14px;
  2022. }
  2023. </style>