countDetailOrder.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. // 计费详单
  2. <template>
  3. <div class="steel_inbound">
  4. <div class="sache">
  5. <span>详单时间:</span>
  6. <el-date-picker
  7. v-model="startTime"
  8. type="datetime"
  9. placeholder="选择日期"
  10. >
  11. </el-date-picker>
  12. <span>至</span>
  13. <el-date-picker v-model="endTime" type="datetime" placeholder="选择日期">
  14. </el-date-picker>
  15. <el-button type="primary" class="btn" @click="onclick">
  16. <i class="el-icon-search"></i>查询
  17. </el-button>
  18. <el-button type="primary" @click="exportData()"
  19. ><i class="el-icon-download"></i>导出(Excel)</el-button
  20. >
  21. </div>
  22. <div class="table">
  23. <el-tabs v-model="activeName">
  24. <!-- 未结算 -->
  25. <el-tab-pane label="未结算" name="first">
  26. <dilTable v-bind.sync="options1">
  27. </dilTable>
  28. </el-tab-pane>
  29. <!-- 已结算 -->
  30. <el-tab-pane label="已结算" name="second">
  31. <dilTable v-bind.sync="options2">
  32. </dilTable>
  33. </el-tab-pane>
  34. </el-tabs>
  35. </div>
  36. </div>
  37. </template>
  38. <script>
  39. import { sjTime } from "@/utils/sharedJsFile";
  40. import { getCookie } from "@/utils/util.js";
  41. export default {
  42. data() {
  43. return {
  44. startTime: null,
  45. endTime: null,
  46. totalMoney: null,
  47. totalTime: null,
  48. //单价
  49. Fee: null,
  50. //加载
  51. selectLineLoading: false,
  52. input: "",
  53. activeName: "first",
  54. ssoId: null,
  55. //详单Id
  56. detailsId: null,
  57. options1: {
  58. // first请求数据的地址
  59. requestUrl: ""
  60. },
  61. options2: {
  62. // second请求数据的地址
  63. requestUrl: ""
  64. },
  65. //是否打开修改详单地址弹出框
  66. dialogFormVisible: false,
  67. //原详单单价
  68. originalPriceValue: null,
  69. //新详单单价
  70. newPriceValue: null,
  71. //原详单地址
  72. originalAddress: null,
  73. //新详单地址
  74. newAddress: null,
  75. //新单价Id
  76. priceId: null,
  77. //是否打开运输单价的模态框
  78. addressDrawer: false,
  79. //运输单价的表格
  80. Address: {
  81. requestUrl: "/api/v1/ams/getAddressDeliveryAddress?apiId=255",
  82. selectionType: "radio"
  83. },
  84. // addressText:null,
  85. //缓存当前选中的运输单价
  86. priceMap: {},
  87. formLabelWidth: "125px",
  88. tableTitle: "内转计次计费详单"
  89. };
  90. },
  91. created(){
  92. this.options1GetRequestUrl();
  93. this.options2GetRequestUrl();
  94. },
  95. methods:{
  96. //未结算数据
  97. options1GetRequestUrl(){
  98. if(getCookie("orgCode") == "chengyunshang"){
  99. this.ssoId=getCookie('userId');
  100. this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0&carrierSsoId="+ getCookie('userId');
  101. }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
  102. this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0"
  103. }else{
  104. this.options1.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0&userId=" + getCookie("orgCode");
  105. }
  106. },
  107. //已结算数据
  108. options2GetRequestUrl(){
  109. if(getCookie("orgCode") == "chengyunshang"){
  110. this.ssoId=getCookie('userId');
  111. this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1&carrierSsoId="+ getCookie('userId');
  112. }else if(getCookie("orgCode") == "dagangadmin"||getCookie("orgCode")=="zidonghuabu"||getCookie("orgCode")=="wuliuchuyunzhongxin"){
  113. this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1"
  114. }else{
  115. this.options2.requestUrl = "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1&userId=" + getCookie("orgCode");
  116. }
  117. },
  118. onclick() {
  119. let startTime = null;
  120. let endTime = null;
  121. if (this.startTime) {
  122. startTime = sjTime(this.startTime);
  123. }
  124. if (this.endTime) {
  125. endTime = sjTime(this.endTime);
  126. }
  127. if (startTime && endTime) {
  128. if (startTime < endTime) {
  129. if (
  130. getCookie("orgCode") == "dagangadmin" ||
  131. getCookie("orgCode") == "zidonghuabu" ||
  132. getCookie("orgCode") == "wuliuchuyunzhongxin"
  133. ) {
  134. this.options1.requestUrl =
  135. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0" +
  136. "&startTime=" +
  137. startTime +
  138. "&endTime=" +
  139. endTime +
  140. "&i" +
  141. new Date();
  142. this.options2.requestUrl =
  143. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1" +
  144. "&startTime=" +
  145. startTime +
  146. "&endTime=" +
  147. endTime +
  148. "&i" +
  149. new Date();
  150. } else if (getCookie("orgCode") == "chengyunshang") {
  151. this.options1.requestUrl =
  152. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0&carrierSsoId=" +
  153. getCookie("userId") +
  154. "&startTime=" +
  155. startTime +
  156. "&endTime=" +
  157. endTime +
  158. "&i" +
  159. new Date();
  160. this.options2.requestUrl =
  161. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1&carrierSsoId=" +
  162. getCookie("userId") +
  163. "&startTime=" +
  164. startTime +
  165. "&endTime=" +
  166. endTime +
  167. "&i" +
  168. new Date();
  169. } else {
  170. this.options1.requestUrl =
  171. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=0&userId=" +
  172. getCookie("orgCode") +
  173. "&startTime=" +
  174. startTime +
  175. "&endTime=" +
  176. endTime +
  177. "&i" +
  178. new Date();
  179. this.options2.requestUrl =
  180. "/api/v1/bms/getInwardWeightDetailsOrder?apiId=465&orderType=26&detailStatus=1&userId=" +
  181. getCookie("orgCode") +
  182. "&startTime=" +
  183. startTime +
  184. "&endTime=" +
  185. endTime +
  186. "&i" +
  187. new Date();
  188. }
  189. } else {
  190. this.startTime = null;
  191. this.endTime = null;
  192. this.$message.warning("开始时间要比结束时间早");
  193. }
  194. }
  195. },
  196. //运输订单点击浏览的事件
  197. select(){
  198. this.addressDrawer = true;
  199. }
  200. }
  201. }
  202. </script>
  203. <style lang="scss" scode>
  204. .steel_inbound{
  205. .sache{
  206. padding: 1.25rem 0.375rem;
  207. .el-input {
  208. width: 20%;
  209. margin-right: 1.25rem;
  210. }
  211. }
  212. }
  213. </style>