sum_list.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216
  1. <template>
  2. <div class="app-container">
  3. <!-- 筛选条件 -->
  4. <div class="screen-container">
  5. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
  6. <el-row :gutter="20">
  7. <el-col :xs="24" :sm="12" :lg="6">
  8. <el-form-item label="销售单号" prop="orderNum">
  9. <el-input v-model="screenForm.orderNum" placeholder="请输入销售单号"></el-input>
  10. </el-form-item>
  11. </el-col>
  12. <el-col :xs="24" :sm="12" :lg="6">
  13. <el-form-item label="销售类型" prop="chName">
  14. <el-input v-model="screenForm.chName" placeholder="请输入销售类型"></el-input>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :xs="24" :sm="12" :lg="6">
  18. <el-form-item label="产品名称" prop="chName">
  19. <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :xs="24" :sm="12" :lg="6">
  23. <el-form-item label="产品编码" prop="chName">
  24. <el-input v-model="screenForm.chName" placeholder="请输入产品编码"></el-input>
  25. </el-form-item>
  26. </el-col>
  27. <el-col :xs="24" :sm="12" :lg="6">
  28. <el-form-item label="规格型号" prop="chName">
  29. <el-input v-model="screenForm.chName" placeholder="请输入规格型号"></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :xs="24" :sm="12" :lg="6">
  33. <el-form-item label="品类" prop="status">
  34. <el-select v-model="screenForm.status" placeholder="全部">
  35. <el-option label="全部" value=""></el-option>
  36. <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
  37. </el-select>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :xs="24" :sm="12" :lg="6">
  41. <el-form-item label="经销商名称" prop="chName">
  42. <el-input v-model="screenForm.chName" placeholder="请输入经销商名称"></el-input>
  43. </el-form-item>
  44. </el-col>
  45. <el-col :xs="24" :sm="12" :lg="6">
  46. <el-form-item label="经销商编码" prop="chName">
  47. <el-input v-model="screenForm.chName" placeholder="请输入经销商编码"></el-input>
  48. </el-form-item>
  49. </el-col>
  50. <el-col :xs="24" :sm="24" :lg="24" class="tr">
  51. <el-form-item label="">
  52. <el-button size="small" @click="resetScreenForm">清空</el-button>
  53. <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
  54. </el-form-item>
  55. </el-col>
  56. </el-row>
  57. </el-form>
  58. </div>
  59. <div class="mymain-container">
  60. <div class="btn-group clearfix">
  61. <div class="fr">
  62. <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
  63. </div>
  64. </div>
  65. <div class="table">
  66. <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
  67. <el-table-column align="center" label="单据号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  68. <el-table-column align="center" label="订单类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  69. <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  70. <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  71. <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  72. <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  73. <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  74. <el-table-column align="center" label="数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  75. <el-table-column align="center" label="单价" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
  76. <el-table-column align="center" label="金额" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  77. <el-table-column align="center" label="经销商编码" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  78. <el-table-column align="center" label="经销商名称" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  79. </el-table>
  80. </div>
  81. </div>
  82. <div class="pagination clearfix">
  83. <div class="fr">
  84. <el-pagination
  85. @size-change="handleSizeChange"
  86. @current-change="handleCurrentChange"
  87. :current-page="currentPage"
  88. :page-sizes="[10, 20, 30, 50]"
  89. :page-size="10"
  90. layout="total, sizes, prev, pager, next, jumper"
  91. :total="listTotal">
  92. </el-pagination>
  93. </div>
  94. </div>
  95. <div class="">
  96. <div>
  97. <el-button size="small" type="primary">提 交</el-button>
  98. </div>
  99. <div style="margin-top: 10px; font-size: 14px; color: #666;">注:提交成功后,系统将自动生成采购计划订单</div>
  100. </div>
  101. </div>
  102. </template>
  103. <script>
  104. import { COMMON_SELECT } from '@/utils/select_data'
  105. import { getList } from "@/api/supply/purchase";
  106. export default {
  107. data() {
  108. return {
  109. currentPage: 1, // 当前页码
  110. pageSize: 10, // 每页数量
  111. listTotal: 0, // 列表总数
  112. dataList: null, // 列表数据
  113. listLoading: false, // 列表加载loading
  114. screenForm: { // 筛选表单数据
  115. orderNum: '',
  116. jxsName: '',
  117. chName: '',
  118. model: '',
  119. date: '',
  120. jxsNum: '',
  121. status: '',
  122. },
  123. select_status: [ // 筛选字段 - 状态
  124. { label: '正常', value: true },
  125. { label: '冻结', value: false }
  126. ],
  127. jumpType: '',
  128. queryItem: {},
  129. }
  130. },
  131. computed: {
  132. exParams() {
  133. return {
  134. userName: this.screenForm.account,
  135. nickName: this.screenForm.nickName,
  136. linkPhone: this.screenForm.phone,
  137. email: this.screenForm.email,
  138. status: this.screenForm.status,
  139. }
  140. },
  141. },
  142. created() {
  143. this.getList();
  144. },
  145. methods: {
  146. // 查询按钮权限
  147. checkBtnRole(value) {
  148. // let btnRole = this.$route.meta.roles;
  149. // if(!btnRole) {return true}
  150. // let index = btnRole.indexOf(value);
  151. // return index >= 0;
  152. return true
  153. },
  154. // 查询列表
  155. getList() {
  156. this.listLoading = true;
  157. let params = {
  158. pageNum: this.currentPage,
  159. pageSize: this.pageSize,
  160. userName: this.screenForm.account,
  161. nickName: this.screenForm.nickName,
  162. linkPhone: this.screenForm.phone,
  163. email: this.screenForm.email,
  164. status: this.screenForm.status,
  165. };
  166. getList(params).then((res) => {
  167. this.dataList = res.data.records;
  168. this.listTotal = res.data.total;
  169. this.listLoading = false;
  170. })
  171. },
  172. // 提交筛选表单
  173. submitScreenForm() {
  174. this.currentPage = 1;
  175. this.getList();
  176. },
  177. // 重置筛选表单
  178. resetScreenForm() {
  179. this.$refs.screenForm.resetFields();
  180. this.currentPage = 1;
  181. this.getList();
  182. },
  183. // 更改每页数量
  184. handleSizeChange(val) {
  185. this.pageSize = val;
  186. this.currentPage = 1;
  187. this.getList();
  188. },
  189. // 更改当前页
  190. handleCurrentChange(val) {
  191. this.currentPage = val;
  192. this.getList();
  193. },
  194. }
  195. }
  196. </script>
  197. <style lang="scss" scoped>
  198. </style>