orderAudit.vue 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944
  1. // 订单审核
  2. <template>
  3. <div class="center">
  4. <div class="center_css">
  5. <div class="top_css">
  6. <el-row>
  7. <el-col :span="14">
  8. <el-button type="primary" @click="billing" style="margin-right:10px">批量开票</el-button>
  9. <el-date-picker v-model="value1" value-format="yyyy-MM-dd" @change="dateChange" type="daterange"
  10. range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期">
  11. </el-date-picker>
  12. </el-col>
  13. <el-col :span="10">
  14. <div class="screen">
  15. <el-input class='find' placeholder="可按订单编号、姓名、账号查找" @keyup.enter.native="find" v-model="searchkeyWord" clearable @change="find"></el-input>
  16. <el-button class="search" @click="find"><img width="16" height="16" style="margin-left: -8px"
  17. src="../../../public/img/sousuo.png" /></el-button><span
  18. class="count_css">共{{ deptBudgetTotal }}条</span>
  19. </div>
  20. </el-col>
  21. </el-row>
  22. <el-row>
  23. <el-col>
  24. <div class="search_btn">
  25. <div :class="search == '' ? 'search' : 'searchNo'" class="search_item search_block"
  26. @click="searchBtn('')">
  27. 全部
  28. </div>
  29. <div :class="search == 1 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(1)">
  30. 待审核
  31. </div>
  32. <div :class="search == 2 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(2)">
  33. 待付款
  34. </div>
  35. <div :class="search == 3 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(3)">
  36. 待还款
  37. </div>
  38. <div :class="search == 4 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(4)">
  39. 待开票
  40. </div>
  41. <div :class="search == 5 ? 'search' : 'searchNo'" class="search_item" @click="searchBtn(5)">
  42. 已完结
  43. </div>
  44. </div>
  45. </el-col>
  46. </el-row>
  47. </div>
  48. <el-table :data="tableData" style="width: 98%; margin: 0 auto; border-radius: 10px" height="60vh" border
  49. @row-click="handleRowClick" @selection-change="handleSelectionChange" highlight-current-row>
  50. <el-table-column type="selection" width="55" :selectable="selectInit">
  51. </el-table-column>
  52. <el-table-column fixed="left" type="index" label="序号" width="50">
  53. <template scope="scope">
  54. <span v-if="scope.$index < 9">0{{ scope.$index + 1 }}</span>
  55. <span v-else>{{ scope.$index + 1 }}</span>
  56. </template>
  57. </el-table-column>
  58. <el-table-column fixed="left" prop="orderNo" label="订单编号" min-width="182">
  59. <template scope="scope">
  60. <div>{{scope.row.orderNo}} <span class="pad_css" v-if="scope.row.freightAdvance == '垫付'">垫</span></div>
  61. </template>
  62. </el-table-column>
  63. <el-table-column min-width="160" prop="cargoOwner" label="货主">
  64. <template scope="scope">
  65. <div>{{scope.row.cargoOwner}} </div>
  66. <div>({{scope.row.cargoOwnerPhone}})</div>
  67. </template>
  68. </el-table-column>
  69. <el-table-column min-width="160" prop="driverName" label="司机">
  70. <template scope="scope">
  71. <div>{{scope.row.driverName}} </div>
  72. <div>({{scope.row.driverPhone}})</div>
  73. </template>
  74. </el-table-column>
  75. <!-- <el-table-column prop="freight" label="运费(元)">
  76. <template slot-scope="scope">
  77. //用货主订单key值来判断(装车前不显示)3未装车
  78. {{scope.row.cargoOwnerStatusKey > 3 ? scope.row.freight : ""}}
  79. </template>
  80. </el-table-column> -->
  81. <el-table-column prop="freight" label="预计运费(元)"></el-table-column>
  82. <el-table-column prop="actualFreight" label="实际运费(元)"></el-table-column>
  83. <el-table-column prop="advanceCharge" label="预付运费(元)"></el-table-column>
  84. <el-table-column prop="amountMoney" label="司机费用结算">
  85. <!-- <el-table-column prop="driverServiceCharge" label="服务费(元)"></el-table-column> -->
  86. <el-table-column prop="payable" label="应付(元)"></el-table-column>
  87. <el-table-column prop="payabled" label="已付(元)"></el-table-column>
  88. <el-table-column prop="nopayable" label="未付(元)"></el-table-column>
  89. </el-table-column>
  90. <el-table-column prop="amountMoney" label="货主费用结算">
  91. <el-table-column prop="ownerServiceCharge" label="工本费(元)"></el-table-column>
  92. <el-table-column prop="overdueFee" label="超期费(元)">
  93. <template slot-scope="scope">
  94. <span class="btn_css" @click="costLook(scope.row)">{{scope.row.overdueFee }}</span>
  95. </template>
  96. </el-table-column>
  97. <el-table-column prop="receivable" label="应收(元)"></el-table-column>
  98. <el-table-column prop="receivabled" label="已收(元)"></el-table-column>
  99. </el-table-column>
  100. <el-table-column prop="invoicing" label="发票"></el-table-column>
  101. <el-table-column prop="driverContractUrl" label="合同">
  102. <template scope="scope">
  103. <span @click="contract(scope.row)" class="btn_css" v-if="scope.row.orderStatusKey>3 && scope.row.cargoOwnerStatus != '已终止'">查看</span>
  104. </template>
  105. </el-table-column>
  106. <el-table-column prop="updateDate" label="更新时间" min-width="160"></el-table-column>
  107. <!-- <el-table-column prop="cargoOwnerStatus" label="状态" min-width="92">
  108. <template scope="scope">
  109. <span>{{scope.row.cargoOwnerStatus}}</span>
  110. <i v-if='scope.row.cargoOwnerStatus=="已"' class="el-icon-question"></i>
  111. </template>
  112. </el-table-column> -->
  113. <el-table-column prop="cargoOwnerStatus" label="状态" min-width="92">
  114. <template slot-scope="scope">
  115. <span>{{scope.row.cargoOwnerStatus}}</span>
  116. <el-popover
  117. v-if='scope.row.terminator==1||scope.row.terminator==2'
  118. placement="top-start"
  119. :title="scope.row.terminator==1?'司机终止订单':'货主终止订单'"
  120. width="200"
  121. trigger="hover">
  122. <div v-html='scope.row.content'></div>
  123. <i v-if='scope.row.cargoOwnerStatus=="已终止"&&scope.row.terminator' slot="reference" class="el-icon-question"></i>
  124. </el-popover>
  125. </template>
  126. </el-table-column>
  127. <el-table-column label="操作" min-width="350">
  128. <template slot-scope="scope">
  129. <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false"
  130. :disabled="scope.row.orderStatusKey != 9 && scope.row.orderStatusKey != 19">确认
  131. <!-- 9待平台确认装车 19待平台确认卸车 -->
  132. <!-- 待平台确认装车和待平台确认卸车时显示 -->
  133. </el-link>
  134. <el-divider direction="vertical"></el-divider>
  135. <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false"
  136. :disabled="scope.row.orderStatusKey != 9 && scope.row.orderStatusKey != 19">驳回
  137. <!-- 9待平台确认装车 19待平台确认卸车 -->
  138. <!-- 待平台确认装车和待平台确认卸车时显示 -->
  139. </el-link>
  140. <el-divider direction="vertical"></el-divider>
  141. <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false">查看</el-link>
  142. <el-divider direction="vertical"></el-divider>
  143. <el-dropdown>
  144. <span class="btn_css">•••</span>
  145. <el-dropdown-menu slot="dropdown">
  146. <el-dropdown-item>
  147. <el-link target="_blank" @click="end(scope.row)" type="primary" :underline="false"
  148. :disabled="scope.row.cargoOwnerStatusKey > 18">终止</el-link>
  149. <!-- cargoOwnerStatusKey=19待平台确认卸车,待货主确认卸车key = 18 -->
  150. </el-dropdown-item>
  151. <el-dropdown-item>
  152. <el-link target="_blank" @click="see(scope.row)" type="primary" :underline="false"
  153. :disabled="scope.row.freightAdvance =='非垫付' && scope.row.cargoOwnerStatusKey != 29">完结</el-link>
  154. <!-- 完结:支付完尾款后从未进行过完结操作前显示的操作。 -->
  155. </el-dropdown-item>
  156. <el-dropdown-item>
  157. <!-- 运输中的可以付预付款-->
  158. <!-- <el-link target="_blank" type="primary" :underline="false" v-if="scope.row.freightAdvance == '垫付'"
  159. :disabled="scope.row.cargoOwnerStatusKey == 13?'true':'false' && scope.row.payabled " @click="preMoneyChange(scope.row)">预付</el-link> -->
  160. <!-- 垫付类型的订单,平台确认装车后从未进行过预付操作(即预付款=0)时显示的按钮。 -->
  161. </el-dropdown-item>
  162. <!-- 货主订单状态key(1待接单3未装车5待确认装车7已驳回装车信息9待平台确认装车11平台驳回装车信息13运输中15待收货17已驳回卸车信息19待平台确认卸车21平台驳回卸车信息
  163. * 23待结算25已结算27待还款29已还款31已完结33已终止) -->
  164. <el-dropdown-item>
  165. <!-- 垫付 待结算 未付过尾款的 -->
  166. <!-- <el-link target="_blank" type="primary" :underline="false" v-if="scope.row.freightAdvance == '垫付'"
  167. :disabled="scope.row.cargoOwnerStatusKey == 23?'false':'true' && scope.row.payabled == scope.row.payable" @click="tailmoneyChange(scope.row)">尾款</el-link> -->
  168. <!-- 垫付类型的订单,平台确认卸车后从未进行过尾款操作(即尾款=0)时显示的按钮。 -->
  169. </el-dropdown-item>
  170. <el-dropdown-item>
  171. <el-link :disabled="scope.row.orderStatus != '运输中'&&scope.row.orderStatus != '已完结'" target="_blank" type="primary" :underline="false" @click="toMapPage(scope.row)">轨迹</el-link>
  172. </el-dropdown-item>
  173. </el-dropdown-menu>
  174. </el-dropdown>
  175. </template>
  176. </el-table-column>
  177. </el-table>
  178. </div>
  179. <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
  180. style="text-align: center; margin-top: 10px" :page-size="deptCircularPage.pageSize"
  181. layout="total, sizes, prev, pager, next, jumper" :total="deptBudgetTotal">
  182. </el-pagination>
  183. <el-dialog :close-on-click-modal='false' title="超期费用" :visible.sync="costInfo" width="500px" :before-close="costClose">
  184. <div class="cost_css">
  185. <div class="cost_item">
  186. <div class="cost_title">起计日期</div>
  187. <div class="cost_value">2022-02-15</div>
  188. </div>
  189. <div class="cost_item">
  190. <div class="cost_title">终止日期</div>
  191. <div class="cost_value">2022-02-15</div>
  192. </div>
  193. <div class="cost_item">
  194. <div class="cost_title">超期费率</div>
  195. <div class="cost_value">{{costData.interestRate}}</div>
  196. </div>
  197. <el-divider></el-divider>
  198. <div class="cost_item">
  199. <div class="cost_title">已付运费</div>
  200. <div class="cost_value">{{costData.interestRate}}</div>
  201. </div>
  202. <div class="cost_item">
  203. <div class="cost_title">超期费用</div>
  204. <div class="cost_value">{{costData.interestRate}}</div>
  205. </div>
  206. <div class="right_btn">
  207. <el-button @click="costInfo = false" type="primary">关闭</el-button>
  208. </div>
  209. </div>
  210. </el-dialog>
  211. <el-dialog :close-on-click-modal='false' title="账户信息" :visible.sync="userInfo" width="500px" :before-close="userClose">
  212. <div class="user" v-for="(item,index) in 2" :key="index">
  213. <div class="user_id">
  214. <div class="id_css">12121212121212121212</div>
  215. <div class="name_css">张三</div>
  216. </div>
  217. <div>中国银行-鲅鱼圈支行</div>
  218. <img src="../../../public/img/yonghu.jpg" class="user_item" />
  219. </div>
  220. </el-dialog>
  221. <el-drawer title="订单详情" :visible.sync="rightSee" style="overflow-y: auto !important">
  222. <div class="right_css">
  223. <div style='height:80vh;overflow-y:scroll;'>
  224. <div class="title_name">基本信息</div>
  225. <div class="right_item">订单编号:{{costData.orderNo}}</div>
  226. <div class="right_title">货主</div>
  227. <div class="right_item">{{costData.cargoOwner}}</div>
  228. <div class="right_title">司机</div>
  229. <div class="right_item">{{costData.driverName}}</div>
  230. <div class="right_title">发货单位</div>
  231. <div class="right_item">{{costData.compName}}</div>
  232. <div class="right_title">发货地</div>
  233. <div class="right_item">
  234. {{costData.sendPrivate}}{{costData.sendCity}}{{costData.sendArea}}{{costData.sendDetailedAddress}}
  235. </div>
  236. <div class="right_title">卸货地</div>
  237. <div class="right_item">
  238. {{costData.unloadPrivate}}{{costData.unloadCity}}{{costData.unloadArea}}{{costData.unloadDetailedAddress}}
  239. </div>
  240. <div class="right_title">货物类别</div>
  241. <div class="right_item">{{costData.goodsType}}</div>
  242. <div class="right_title">货名</div>
  243. <div class="right_item">{{costData.goodsName}}</div>
  244. <div class="right_title">发货联系人</div>
  245. <div class="right_item">{{costData.publishTaskInfo.sender}}</div>
  246. <div class="right_title">发货联系人电话</div>
  247. <div class="right_item">{{costData.publishTaskInfo.senderPhone}}</div>
  248. <div class="right_title">收货联系人</div>
  249. <div class="right_item">{{costData.publishTaskInfo.receiver}}</div>
  250. <div class="right_title">收货联系人电话</div>
  251. <div class="right_item">{{costData.publishTaskInfo.receiverPhone}}</div>
  252. <div class="right_title">收货人身份证号</div>
  253. <div class="right_item">{{costData.publishTaskInfo.receiverIdcard}}</div>
  254. <div class="right_title">收货方信用代码(选填)</div>
  255. <div class="right_item">{{costData.publishTaskInfo.receiverCreditCode?costData.publishTaskInfo.receiverCreditCode:'暂无'}}</div>
  256. <div class="right_title">距离</div>
  257. <div class="right_item">约{{costData.distance ? costData.distance : 0}}km</div>
  258. <div class="right_title">运费</div>
  259. <div class="right_item">{{costData.freight}}</div>
  260. <el-divider v-if="costData.hyCarrierInfo"></el-divider>
  261. <div v-if="costData.hyCarrierInfo">
  262. <div class="title_name">承运信息</div>
  263. <div class="right_title">承运合同编号</div>
  264. <div class="right_item">{{costData.contractNo}}</div>
  265. <div class="right_title">委托合同编号</div>
  266. <div class="right_item">{{costData.wtContractNo}}</div>
  267. <div class="right_title">车牌号</div>
  268. <div class="right_item">{{costData.hyCarrierInfo.carNo}}</div>
  269. <div class="right_title" v-if="costData.hyCarrierInfo.loadingWeight">装车净重(吨)</div>
  270. <div class="right_item" v-if="costData.hyCarrierInfo.loadingWeight">{{costData.hyCarrierInfo.loadingWeight}}</div>
  271. <div class="right_title" v-if="costData.hyCarrierInfo.unloadingWeight">卸车净重(吨)</div>
  272. <div class="right_item" v-if="costData.hyCarrierInfo.unloadingWeight">{{costData.hyCarrierInfo.unloadingWeight}}</div>
  273. <div class="right_title">预计运费</div>
  274. <div class="right_item">{{costData.hyCarrierInfo.estimatedFreight}}</div>
  275. <div class="right_title">装车时间</div>
  276. <div class="right_item">{{costData.hyCarrierInfo.loadingDate}}</div>
  277. <div class="right_title">运输时长</div>
  278. <div class="right_item">{{costData.hyCarrierInfo.transportationDuration}}</div>
  279. <div class="right_title" v-if="costData.hyCarrierInfo.loadingCity">装车定位</div>
  280. <div class="right_item">{{costData.hyCarrierInfo.loadingCity}}{{costData.hyCarrierInfo.loadingArea}}</div>
  281. <div class="right_title">装车照片</div>
  282. <div style="display: flex;" v-if="costData.hyCarrierInfo.loadingImg">
  283. <div v-for="(item,index) in costData.hyCarrierInfo.loadingImg.split(',')" :key="index">
  284. <img :src="item" class="img_css" @click="enlarge(item)">
  285. </div>
  286. </div>
  287. <div class="right_title" v-if="costData.hyCarrierInfo.totalFreight">合计应付运费</div>
  288. <div class="right_item">{{costData.hyCarrierInfo.totalFreight}}</div>
  289. <div class="right_title" v-if="costData.hyCarrierInfo.unloadingDate">卸车时间</div>
  290. <div class="right_item">{{costData.hyCarrierInfo.unloadingDate}}</div>
  291. <div class="right_title" v-if="costData.hyCarrierInfo.unloadingCity">卸车定位</div>
  292. <div class="right_item">{{costData.hyCarrierInfo.unloadingCity}}{{costData.hyCarrierInfo.unloadingArea}}</div>
  293. <div class="right_title" v-if="costData.hyCarrierInfo.unloadingImg">卸车照片</div>
  294. <div style="display: flex;" v-if="costData.hyCarrierInfo.unloadingImg">
  295. <div v-for="(item,index) in costData.hyCarrierInfo.unloadingImg.split(',')" :key="index">
  296. <img :src="item" class="img_css" @click="enlarge(item)">
  297. </div>
  298. </div>
  299. <div class="right_title" v-if="costData.hyCarrierInfo.receiptImg">回单照片</div>
  300. <div style="display: flex;" v-if="costData.hyCarrierInfo.receiptImg">
  301. <div v-for="(item,index) in costData.hyCarrierInfo.receiptImg.split(',')" :key="index">
  302. <img :src="item" class="img_css" @click="enlarge(item)">
  303. </div>
  304. </div>
  305. </div>
  306. <el-divider v-if="costData.freightInfo"></el-divider>
  307. <div v-if="costData.freightInfo">
  308. <div class="title_name">运费信息(单位:元)</div>
  309. <div class="right_title">预付运费</div>
  310. <div class="right_item">{{costData.freightInfo.prepaidFreight}} <span
  311. style="margin-left: 100px;">{{costData.freightInfo.prepaidFreightDate}}</span></div>
  312. <div class="right_title">运费尾款</div>
  313. <div class="right_item">{{costData.freightInfo.freightBalance?costData.freightInfo.freightBalance:'未支付'}}
  314. <span style="margin-left: 100px;">{{costData.freightInfo.freightBalanceDate}}</span></div>
  315. <div class="right_title" v-if="costData.freightInfo.freightBalance">明细</div>
  316. <div class="right_item" v-if="costData.freightInfo.freightBalance">
  317. 预付{{costData.freightInfo.prepaidFreight ? costData.freightInfo.prepaidFreight : 0}}元,服务费{{costData.freightInfo.driverServiceCharge ? costData.freightInfo.driverServiceCharge:0}}元,尾款{{costData.freightInfo.freightBalance ? costData.freightInfo.freightBalance:0}}元,合计收款{{costData.freightInfo.totalCollection ? costData.freightInfo.totalCollection:0}}元。
  318. </div>
  319. </div>
  320. <el-divider v-if="costData.repaymentInfo"></el-divider>
  321. <div v-if="costData.repaymentInfo">
  322. <div class="title_name">还款信息</div>
  323. <div class="right_title">运费</div>
  324. <div class="right_item">{{costData.freight}}</div>
  325. <div class="right_title">超期费(每天3%)</div>
  326. <div class="right_item">{{costData.repaymentInfo.overdueFee}}</div>
  327. <div class="right_title">合计应还</div>
  328. <div class="right_item">{{costData.repaymentInfo.totalRepayable}}</div>
  329. <div class="right_title">还款(尾号6666)</div>
  330. <div class="right_item">{{costData.repaymentInfo.alreadyRepaid}}</div>
  331. </div>
  332. </div>
  333. <div class="right_btn">
  334. <el-button @click="submit(1)" v-if="costData.orderStatusKey == 9 || costData.orderStatusKey == 19">
  335. 确认</el-button>
  336. <el-button @click="submit(2)" v-if="costData.orderStatusKey == 9 || costData.orderStatusKey == 19">
  337. 驳回</el-button>
  338. <el-button @click="complete" v-if="costData.cargoOwnerStatusKey == 29">完结</el-button>
  339. <el-button @click="rightSee = false">关闭</el-button>
  340. </div>
  341. </div>
  342. </el-drawer>
  343. <el-image-viewer v-if="imgsVisible" :on-close="closeImgViewer" :url-list="srcList" style="z-index:9999" />
  344. </div>
  345. </template>
  346. <script>
  347. import {
  348. getListData,
  349. getData,
  350. auditData,
  351. endData,
  352. editEndData,
  353. batchData,
  354. preMoney,
  355. tailMoney
  356. } from '@/api/orderManagement'
  357. export default {
  358. components: {
  359. "el-image-viewer": () =>
  360. import("element-ui/packages/image/src/image-viewer"),
  361. },
  362. data() {
  363. return {
  364. tableData: [],
  365. //分页
  366. searchkeyWord: "",
  367. currentPage: 1,
  368. pageSize: 10,
  369. deptBudgetTotal: 0,
  370. deptCircularPage: {},
  371. search: "",
  372. addressUrl: [],
  373. disabled: false,
  374. costInfo: false,
  375. userInfo: false,
  376. rejectInfo: false,
  377. startDate: "",
  378. endDate: "",
  379. form: {
  380. checkList: [],
  381. textarea: "",
  382. },
  383. value1: "",
  384. costData: {
  385. publishTaskInfo:{}
  386. },
  387. rightSee: false,
  388. modification: [],
  389. //图片预览
  390. srcList: [],
  391. imgsVisible: false,
  392. };
  393. },
  394. mounted() {
  395. this.getList()
  396. },
  397. methods: {
  398. //预付
  399. preMoneyChange(val){
  400. this.$confirm('垫付预付款'+val.advanceCharge+'元?', '提示', {
  401. confirmButtonText: '确定',
  402. cancelButtonText: '取消',
  403. type: 'warning',
  404. })
  405. .then(() => {
  406. this.listLoading = true
  407. preMoney({
  408. id: val.freightId,
  409. prepaidFreight:val.advanceCharge
  410. }).then(response => {
  411. this.$notify({
  412. title: '成功',
  413. message: '操作成功!',
  414. type: 'success'
  415. });
  416. this.getList()
  417. this.listLoading = false
  418. })
  419. .catch(() => {
  420. this.listLoading = false
  421. })
  422. })
  423. },
  424. //尾款
  425. tailmoneyChange(val){
  426. // 合计运费-预付款-司机服务费=尾款
  427. let money = Number(val.actualFreight) - Number(val.prepaidFreight) - Number(val.driverServiceCharge)
  428. this.$confirm('确定垫付尾款:'+ money+'元?', '提示', {
  429. confirmButtonText: '确定',
  430. cancelButtonText: '取消',
  431. type: 'warning',
  432. })
  433. .then(() => {
  434. this.listLoading = true
  435. tailMoney({
  436. id: val.freightId,
  437. freightBalance:money
  438. }).then(response => {
  439. this.$notify({
  440. title: '成功',
  441. message: '操作成功!',
  442. type: 'success'
  443. });
  444. this.getList()
  445. this.listLoading = false
  446. })
  447. .catch(() => {
  448. this.listLoading = false
  449. })
  450. })
  451. },
  452. closeImgViewer() {
  453. this.srcList = []
  454. this.imgsVisible = false;
  455. },
  456. enlarge(url) {
  457. this.imgsVisible = true;
  458. this.srcList.push(url)
  459. },
  460. toMapPage(row) {
  461. this.$router.push({
  462. path: 'trajectory',
  463. query: {
  464. id: row.id,
  465. orderNo:row.orderNo,
  466. sendPrivate:row.sendPrivate,
  467. sendCity:row.sendCity,
  468. sendArea:row.sendArea,
  469. sendDetailedAddress:row.sendDetailedAddress,
  470. unloadPrivate:row.unloadPrivate,
  471. unloadCity:row.unloadCity,
  472. unloadArea:row.unloadArea,
  473. unloadDetailedAddress:row.unloadDetailedAddress,
  474. orderStatus:row.orderStatus
  475. }
  476. })
  477. },
  478. getList() {
  479. this.loading = true
  480. let _obj = {}
  481. _obj.currentPage = this.currentPage
  482. _obj.pageSize = this.pageSize
  483. _obj.searchKeyWord = this.searchkeyWord
  484. _obj.searchType = this.search
  485. _obj.startDate = this.startDate
  486. _obj.endDate = this.endDate
  487. getListData(_obj).then(response => {
  488. if(response.data.records){
  489. for (let i = 0; i < response.data.records.length; i++) {
  490. if(response.data.records[i].cargoOwnerStatus=='已终止'){
  491. if(response.data.records[i].terminator==1){
  492. if(response.data.records[i].terminationReason==1){
  493. response.data.records[i].content='原因:已与货主协商<br/>描述:'+response.data.records[i].terminationReasonDescription
  494. }else if(response.data.records[i].terminationReason==2){
  495. response.data.records[i].content='原因:货主原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
  496. }else if(response.data.records[i].terminationReason==3){
  497. response.data.records[i].content='原因:货主个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
  498. }else if(response.data.records[i].terminationReason==4){
  499. response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
  500. }
  501. }else if(response.data.records[i].terminator==2){
  502. if(response.data.records[i].terminationReason==1){
  503. response.data.records[i].content='原因:已与司机协商<br/>描述:'+response.data.records[i].terminationReasonDescription
  504. }else if(response.data.records[i].terminationReason==2){
  505. response.data.records[i].content='原因:司机原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
  506. }else if(response.data.records[i].terminationReason==3){
  507. response.data.records[i].content='原因:司机个人原因终止<br/>描述:'+response.data.records[i].terminationReasonDescription
  508. }else if(response.data.records[i].terminationReason==4){
  509. response.data.records[i].content='原因:其他<br/>描述:'+response.data.records[i].terminationReasonDescription
  510. }
  511. }
  512. }else{
  513. response.data.records[i].content=''
  514. }
  515. }
  516. }
  517. this.tableData = response.data.records
  518. this.deptBudgetTotal = response.data.total
  519. this.listLoading = false
  520. })
  521. .catch(() => {
  522. this.listLoading = false
  523. })
  524. },
  525. //开票
  526. billing() {
  527. if(this.modification.length==0){
  528. this.$message.error('请选择一条未开票条目!');
  529. }
  530. let data = {
  531. orderInfoList: this.modification,
  532. }
  533. this.listLoading = true
  534. batchData(data).then(response => {
  535. this.getList()
  536. this.listLoading = false
  537. })
  538. .catch(() => {
  539. this.listLoading = false
  540. })
  541. },
  542. selectInit() {
  543. return true;
  544. },
  545. handleRowClick() {},
  546. handleSelectionChange(val) {
  547. this.modification = val
  548. },
  549. see(row) {
  550. this.loading = true
  551. getData({
  552. id: row.id
  553. }).then(response => {
  554. this.costData = response.data
  555. this.rightSee = true
  556. // this.deptBudgetTotal = response.data.total
  557. this.listLoading = false
  558. })
  559. .catch(() => {
  560. this.listLoading = false
  561. })
  562. },
  563. complete() {
  564. this.$confirm('确定订单已完结?', '提示', {
  565. confirmButtonText: '确定',
  566. cancelButtonText: '取消',
  567. type: 'warning',
  568. })
  569. .then(() => {
  570. this.listLoading = true
  571. editEndData({
  572. id: this.costData.id
  573. }).then(response => {
  574. this.getList()
  575. this.listLoading = false
  576. })
  577. .catch(() => {
  578. this.listLoading = false
  579. })
  580. })
  581. },
  582. end(row) {
  583. this.$confirm('确定终止该订单?', '提示', {
  584. confirmButtonText: '确定',
  585. cancelButtonText: '取消',
  586. type: 'warning',
  587. })
  588. .then(() => {
  589. this.listLoading = true
  590. endData({
  591. id: row.id,
  592. terminator: '3'
  593. }).then(response => {
  594. this.$notify({
  595. title: '成功',
  596. message: '终止成功!',
  597. type: 'success'
  598. });
  599. this.getList()
  600. this.listLoading = false
  601. })
  602. .catch(() => {
  603. this.listLoading = false
  604. })
  605. })
  606. },
  607. dateChange(e) {
  608. this.startDate = e[0]
  609. this.endDate = e[1]
  610. this.getList()
  611. },
  612. contract(row) {
  613. window.open(row.driverContractUrl)
  614. // this.userInfo = true;
  615. },
  616. userClose() {
  617. this.userInfo = false;
  618. },
  619. costLook(row) {
  620. this.costData = row
  621. this.costInfo = true;
  622. },
  623. costClose() {
  624. this.costInfo = false;
  625. },
  626. searchBtn(num) {
  627. this.search = num;
  628. this.getList();
  629. },
  630. find() {
  631. this.currentPage = 1
  632. this.getList();
  633. },
  634. submit(num) {
  635. var _data = {}
  636. _data.id = this.costData.id
  637. _data.examineFlag = num
  638. if (this.costData.orderStatusKey == 9) {
  639. _data.loadingFlag = 1
  640. } else if (this.costData.orderStatusKey == 19) {
  641. _data.loadingFlag = 2
  642. }
  643. this.$confirm(num==1?'确定通过订单?':'确定驳回订单?', '提示', {
  644. confirmButtonText: '确定',
  645. cancelButtonText: '取消',
  646. type: 'warning',
  647. })
  648. .then(() => {
  649. this.listLoading = true
  650. auditData(_data).then(response => {
  651. this.$notify({
  652. title: '成功',
  653. message: '操作成功!',
  654. type: 'success'
  655. });
  656. this.rightSee = false
  657. this.getList()
  658. this.listLoading = false
  659. })
  660. .catch(() => {
  661. this.listLoading = false
  662. })
  663. })
  664. },
  665. reject(row) {
  666. this.rejectInfo = true
  667. },
  668. rejectClose() {
  669. this.form = {}
  670. this.form.checkList = []
  671. this.rejectInfo = false
  672. },
  673. onChange() {
  674. this.$refs.upload
  675. .handleSaveBill()
  676. .then(async (response) => {
  677. this.formData.addressUrl = response;
  678. })
  679. .catch((res) => {
  680. EventBus.$emit("error", (JSON.parse(res) || {}).message);
  681. this.$refs.upload.clearFiles();
  682. });
  683. },
  684. handleSizeChange(val) {
  685. console.log(`每页 ${val} 条`);
  686. this.pageSize = val;
  687. this.getList();
  688. },
  689. handleCurrentChange(val) {
  690. this.currentPage = val;
  691. console.log(`当前页: ${val}`);
  692. this.getList();
  693. },
  694. },
  695. };
  696. </script>
  697. <style lang="scss" scoped>
  698. .center {
  699. padding: 10px 20px;
  700. background: #f5f6f7;
  701. height: calc(100vh - 5vh);
  702. .top_css {
  703. padding: 10px;
  704. .search_btn {
  705. height: 80px;
  706. background: linear-gradient(#fafbfb, #ffffff);
  707. display: flex;
  708. margin-top: 20px;
  709. .search_block {
  710. margin-left: 20px;
  711. }
  712. .search_item {
  713. text-align: center;
  714. font-size: 14px;
  715. font-weight: 600;
  716. line-height: 40px;
  717. width: 112px;
  718. height: 40px;
  719. background: #f7f8f9;
  720. cursor: pointer;
  721. margin-top: 30px;
  722. }
  723. .searchNo {
  724. color: #323233;
  725. }
  726. .search {
  727. color: #2f53eb;
  728. background: #ffffff;
  729. }
  730. }
  731. }
  732. .center_css {
  733. background: #ffffff;
  734. border-radius: 1px;
  735. margin-top: 10px;
  736. padding-bottom: 10px;
  737. }
  738. .screen {
  739. display: flex;
  740. .search {
  741. width: 40px;
  742. height: 40px;
  743. background: #2f53eb;
  744. border-radius: 0px 2px 2px 0px;
  745. border: 1px solid #DCDFE6;
  746. margin-left:-1px;
  747. }
  748. .count_css {
  749. width: 80px;
  750. text-align: center;
  751. line-height: 40px;
  752. color: #666666;
  753. }
  754. }
  755. .el-button {
  756. padding: 10px 20px !important;
  757. }
  758. .center_css {
  759. ::v-deep .el-table th,
  760. ::v-deep .el-table td {
  761. text-align: center;
  762. }
  763. .fujian {
  764. font-size: 24px;
  765. color: #409eff;
  766. }
  767. .warning {
  768. font-size: 14px;
  769. color: #ed1d1d;
  770. }
  771. }
  772. }
  773. .el-button--primary {
  774. color: #FFF;
  775. background-color: #2f53eb;
  776. border-color: #2f53eb;
  777. }
  778. .cost_css {
  779. .cost_item {
  780. width: 100%;
  781. display: flex;
  782. margin-bottom: 20px;
  783. .cost_title {
  784. width: 50%;
  785. text-align: left;
  786. color: #9D9D9D;
  787. }
  788. .cost_value {
  789. width: 50%;
  790. color: #0D0D0D;
  791. text-align: right;
  792. }
  793. }
  794. .right_btn {
  795. text-align: right;
  796. margin-top: 10px;
  797. }
  798. }
  799. .user {
  800. margin-bottom: 20px;
  801. .user_id {
  802. display: flex;
  803. height: 30px;
  804. }
  805. .name_css,
  806. .id_css {
  807. width: 50%;
  808. }
  809. .name_css {
  810. text-align: right;
  811. }
  812. .user_item {
  813. width: 450px;
  814. height: 300px;
  815. }
  816. }
  817. ::v-deep .el-table--border .el-table__header th {
  818. background: #f7f8f9;
  819. }
  820. .btn_css {
  821. color: #409EFF;
  822. cursor: pointer
  823. }
  824. .sign {
  825. font-size: 14px;
  826. color: red;
  827. }
  828. .form_css {
  829. width: 100%;
  830. margin: 20px auto 20px;
  831. ::v-deep .el-checkbox {
  832. width: 40%;
  833. height: 30px;
  834. }
  835. // ::v-deep .el-dialog__body{
  836. // padding: 10px 20px;
  837. // }
  838. ::v-deep .el-dialog__title {
  839. font-size: 16px;
  840. }
  841. ::v-deep .el-textarea__inner {
  842. background: #F0F1F2;
  843. }
  844. .form_btn {
  845. text-align: right;
  846. margin-top: 10px;
  847. }
  848. }
  849. .right_css {
  850. // overflow-y: auto !important;
  851. min-height: 1266px;
  852. padding: 0 20px;
  853. .right_title {
  854. color: #9D9D9D;
  855. font-size: 14px;
  856. margin-bottom: 4px;
  857. }
  858. .title_name {
  859. margin-bottom: 10px;
  860. }
  861. .right_item {
  862. color: #0D0D0D;
  863. font-size: 14px;
  864. margin-bottom: 10px;
  865. }
  866. .right_btn {
  867. text-align: right;
  868. margin: 10px 0;
  869. }
  870. .img_css {
  871. width: 100px;
  872. height: 80px;
  873. margin-right: 5px;
  874. }
  875. .right_img {
  876. width: 200px;
  877. height: 120px;
  878. margin-top: 10px;
  879. }
  880. }
  881. .pad_css {
  882. background: #F0F4FF;
  883. color: #2F53EB;
  884. padding: 2px;
  885. margin-left: 10px;
  886. }
  887. ::v-deep .el-drawer {
  888. overflow: auto;
  889. }
  890. .find::v-deep input.el-input__inner{
  891. border-radius:0;
  892. }
  893. </style>