saleOrder.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <!-- 销售订单页面 -->
  3. <div class="salePlan">
  4. <div class="top">
  5. <el-input placeholder="请输入内容" v-model="input" clearable> </el-input>
  6. <el-button type="primary" class="btn" @click="onclick">
  7. <i class="el-icon-search"></i>查询
  8. </el-button>
  9. <el-button type="primary" @click="btnclick(0)">
  10. <i class="el-icon-plus"></i>钢材订单新增
  11. </el-button>
  12. </div>
  13. <el-tabs v-model="activeName" @tab-click="handleClick">
  14. <el-tab-pane label="未上报" name="first">
  15. <dilTable v-bind.sync="option">
  16. <el-table-column fixed="right" label="操作" align="center" width="150">
  17. <template slot-scope="scope">
  18. <el-button
  19. @click="uploadclick(scope.row.saleOrderId)"
  20. type="text"
  21. size="small"
  22. >上传</el-button
  23. >
  24. <el-button
  25. @click="click(scope.row.saleOrderId)"
  26. type="text"
  27. size="small"
  28. >修改</el-button
  29. >
  30. <el-button
  31. type="text"
  32. size="small"
  33. @click="deleteclick(scope.row.saleOrderId)"
  34. >删除</el-button
  35. >
  36. </template>
  37. </el-table-column>
  38. </dilTable>
  39. </el-tab-pane>
  40. <!-- 已下发 -->
  41. <el-tab-pane label="已上报" name="second">
  42. <dilTable v-bind.sync="option2"> </dilTable>
  43. </el-tab-pane>
  44. <!-- 财务已审批 -->
  45. <el-tab-pane label="财务已审批" name="third">
  46. <dilTable v-bind.sync="option3">
  47. <el-table-column fixed="right" label="操作" width="200">
  48. <template slot-scope="scope">
  49. <el-button
  50. @click="lookclick(scope.row.saleOrderId)"
  51. type="text"
  52. size="small"
  53. >查看</el-button
  54. >
  55. <el-button
  56. @click="passclick(scope.row.saleOrderId)"
  57. type="text"
  58. size="small"
  59. >修改日志</el-button
  60. >
  61. </template>
  62. </el-table-column>
  63. </dilTable>
  64. </el-tab-pane>
  65. <!-- 销售公司已审批 -->
  66. <el-tab-pane label="销售公司已审批" name="four">
  67. <dilTable v-bind.sync="option4">
  68. <el-table-column fixed="right" label="操作" width="130">
  69. <template slot-scope="scope">
  70. <el-button
  71. @click="addClick(scope.row.saleOrderId)"
  72. type="text"
  73. size="small"
  74. >新增车序号</el-button
  75. >
  76. <el-button
  77. @click="detailedClick(scope.row.saleOrderId)"
  78. type="text"
  79. size="small"
  80. >物资详情</el-button
  81. >
  82. </template>
  83. </el-table-column>
  84. </dilTable>
  85. </el-tab-pane>
  86. </el-tabs>
  87. </div>
  88. </template>
  89. <script>
  90. export default {
  91. name: "saleOrder",
  92. data() {
  93. return {
  94. activeName: "first",
  95. input: "",
  96. option: {
  97. // 表格请求数据的地址
  98. requestUrl:
  99. "/api/v1/ams/getSaleOrderInfoes?apiId=408",
  100. },
  101. option2: {
  102. // 表格请求数据的地址
  103. requestUrl:
  104. "/api/v1/ams/getSaleOrderReportedes?apiId=408",
  105. },
  106. option3: {
  107. // 表格请求数据的地址
  108. requestUrl:
  109. "/api/v1/ams/getAmsSaleOrderApprovedes?apiId=409",
  110. },
  111. option4: {
  112. // 表格请求数据的地址
  113. requestUrl:
  114. "/api/v1/ams/getSaleOrderListBySaleCompanyes?apiId=409",
  115. },
  116. };
  117. },
  118. methods: {
  119. handleClick(tab, event) {
  120. console.log(tab, event);
  121. },
  122. onclick() {
  123. console.log(this.input);
  124. },
  125. seeclick(saleOrderId) {
  126. this.$router.push("/saleOrderDetail/" + saleOrderId);
  127. },
  128. btnclick() {
  129. this.$router.push("/addSaleOrder");
  130. },
  131. click(saleOrderId) {
  132. this.$router.push("/editSaleOrder/" + saleOrderId);
  133. },
  134. addClick(saleOrderId){
  135. this.$router.push("/addSaleOrderArrange/" + saleOrderId);
  136. },
  137. detailedClick(saleOrderId){
  138. this.$router.push("saleOrderMaterial/" + saleOrderId);
  139. },
  140. // 上传
  141. uploadclick(saleOrderId) {
  142. this.$confirm("是否上传", "提示", {
  143. confirmButtonText: "确定",
  144. cancelButtonText: "取消",
  145. type: "warning",
  146. center: true,
  147. })
  148. .then(() => {
  149. this.$message({
  150. type: "success",
  151. message: "上传成功!",
  152. });
  153. this.axios
  154. .post(
  155. "/api/v1/ams/uploadSaleOrder?saleOrderId=" +
  156. saleOrderId
  157. )
  158. .then(() => {
  159. this.$router.go(0);
  160. });
  161. })
  162. .catch(() => {
  163. this.$message({
  164. type: "info",
  165. message: "取消上传!",
  166. });
  167. });
  168. },
  169. //删除
  170. deleteclick(scope) {
  171. let saleOrderId = scope;
  172. this.$confirm("是否删除", "提示", {
  173. confirmButtonText: "确定",
  174. cancelButtonText: "取消",
  175. type: "warning",
  176. center: true,
  177. })
  178. .then(() => {
  179. this.$message({
  180. type: "success",
  181. message: "删除成功!",
  182. });
  183. this.axios
  184. .post(
  185. "/api/v1/ams/deleteAmsSaleOrderBySaleOrderId?saleOrderId=" +
  186. saleOrderId
  187. )
  188. .then(() => {
  189. this.$router.go(0);
  190. });
  191. })
  192. .catch(() => {
  193. this.$message({
  194. type: "info",
  195. message: "取消删除!",
  196. });
  197. });
  198. },
  199. },
  200. };
  201. </script>
  202. <style lang='scss' scoped>
  203. .salePlan {
  204. .top {
  205. padding: 1.25rem 0.375rem;
  206. .el-input {
  207. width: 20%;
  208. margin-right: 1.25rem;
  209. }
  210. }
  211. }
  212. </style>