apply_list.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowDetail && !isShowExamine">
  4. <!-- 筛选条件 -->
  5. <div class="screen-container">
  6. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
  7. <el-row :gutter="20">
  8. <el-col :xs="24" :sm="24" :lg="24">
  9. <el-form-item prop="orderNum" label-width="0">
  10. <el-radio-group v-model="screenForm.status" size="medium">
  11. <el-radio-button label="1">全部</el-radio-button>
  12. <el-radio-button label="2">已保存</el-radio-button>
  13. <el-radio-button label="3">待审核</el-radio-button>
  14. <el-radio-button label="3">审核通过</el-radio-button>
  15. <el-radio-button label="3">审核驳回</el-radio-button>
  16. <el-radio-button label="3">已发货</el-radio-button>
  17. </el-radio-group>
  18. </el-form-item>
  19. </el-col>
  20. <el-col :xs="24" :sm="12" :lg="6">
  21. <el-form-item label="发货申请单" prop="orderNum">
  22. <el-input v-model="screenForm.orderNum" placeholder="请输入发货申请单"></el-input>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :xs="24" :sm="12" :lg="6">
  26. <el-form-item label="仓库" prop="orderNum">
  27. <el-input v-model="screenForm.orderNum" placeholder="请输入仓库"></el-input>
  28. </el-form-item>
  29. </el-col>
  30. <el-col :xs="24" :sm="12" :lg="6">
  31. <el-form-item label="经销商编码" prop="jxsName">
  32. <el-input v-model="screenForm.jxsName" placeholder="请输入经销商编码"></el-input>
  33. </el-form-item>
  34. </el-col>
  35. <el-col :xs="24" :sm="12" :lg="6">
  36. <el-form-item label="经销商名称" prop="jxsNum">
  37. <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商名称"></el-input>
  38. </el-form-item>
  39. </el-col>
  40. <el-col :xs="24" :sm="12" :lg="6">
  41. <el-form-item label="发货申请日期" prop="date">
  42. <el-date-picker
  43. v-model="screenForm.date"
  44. type="datetimerange"
  45. range-separator="至"
  46. style="width: 100%;"
  47. value-format="yyyy-MM-dd HH:mm:ss"
  48. start-placeholder="开始日期"
  49. end-placeholder="结束日期">
  50. </el-date-picker>
  51. </el-form-item>
  52. </el-col>
  53. <el-col :xs="24" :sm="12" :lg="6">
  54. <el-form-item label="产品名称" prop="chName">
  55. <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :xs="24" :sm="12" :lg="6">
  59. <el-form-item label="规格型号" prop="model">
  60. <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
  61. </el-form-item>
  62. </el-col>
  63. <el-col :xs="24" :sm="12" :lg="6" class="tr">
  64. <el-form-item label="">
  65. <el-button size="small" @click="resetScreenForm">清空</el-button>
  66. <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
  67. </el-form-item>
  68. </el-col>
  69. </el-row>
  70. </el-form>
  71. </div>
  72. <div class="mymain-container">
  73. <div class="btn-group clearfix">
  74. <div class="fr">
  75. <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
  76. </div>
  77. </div>
  78. <div class="table">
  79. <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
  80. <el-table-column align="center" label="发货申请单" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
  81. <el-table-column align="center" label="发货申请日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
  82. <el-table-column align="center" label="仓库" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
  83. <el-table-column align="center" label="经销商编码" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  84. <el-table-column align="center" label="经销商名称" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
  85. <el-table-column align="center" label="产品名称" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
  86. <el-table-column align="center" label="规格型号" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
  87. <el-table-column align="center" label="计量单位" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
  88. <el-table-column align="center" label="数量" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
  89. <el-table-column align="center" label="备注信息" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
  90. <el-table-column align="center" label="制单人" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
  91. <el-table-column align="center" label="制单日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  92. <el-table-column align="center" label="审核人" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
  93. <el-table-column align="center" label="审核日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  94. <el-table-column align="center" label="审核状态" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
  95. <el-table-column align="center" label="操作" width="120" fixed="right">
  96. <template slot-scope="scope">
  97. <el-button type="text" @click="toExamine(scope.row)">审单</el-button>
  98. <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
  99. </template>
  100. </el-table-column>
  101. </el-table>
  102. </div>
  103. </div>
  104. <div class="pagination clearfix">
  105. <div class="fr">
  106. <el-pagination
  107. @size-change="handleSizeChange"
  108. @current-change="handleCurrentChange"
  109. :current-page="currentPage"
  110. :page-sizes="[10, 20, 30, 50]"
  111. :page-size="10"
  112. layout="total, sizes, prev, pager, next, jumper"
  113. :total="listTotal">
  114. </el-pagination>
  115. </div>
  116. </div>
  117. </div>
  118. <ApplyDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
  119. <ApplyExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
  120. </div>
  121. </template>
  122. <script>
  123. import { getList } from "@/api/supply/apply";
  124. import ApplyDetail from "@/views/supply/apply/components/apply_detail";
  125. import ApplyExamine from "@/views/supply/apply/components/apply_examine";
  126. export default {
  127. components: {
  128. ApplyDetail,
  129. ApplyExamine,
  130. },
  131. data() {
  132. return {
  133. currentPage: 1, // 当前页码
  134. pageSize: 10, // 每页数量
  135. listTotal: 0, // 列表总数
  136. dataList: null, // 列表数据
  137. listLoading: false, // 列表加载loading
  138. screenForm: { // 筛选表单数据
  139. orderNum: '',
  140. jxsName: '',
  141. chName: '',
  142. model: '',
  143. date: '',
  144. jxsNum: '',
  145. status: '',
  146. },
  147. queryItem: {},
  148. isShowDetail: false,
  149. isShowExamine: false,
  150. }
  151. },
  152. computed: {
  153. exParams() {
  154. return {
  155. retreatOrderNo: this.screenForm.orderNum,
  156. customerNumber: this.screenForm.jxsNum,
  157. customerName: this.screenForm.jxsName,
  158. productName: this.screenForm.chName,
  159. specification: this.screenForm.model,
  160. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  161. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  162. status: 2, // 1:发货单,2:工程发货单
  163. }
  164. },
  165. },
  166. created() {
  167. this.getList();
  168. },
  169. methods: {
  170. // 查询按钮权限
  171. checkBtnRole(value) {
  172. // let btnRole = this.$route.meta.roles;
  173. // if(!btnRole) {return true}
  174. // let index = btnRole.indexOf(value);
  175. // return index >= 0;
  176. return true
  177. },
  178. // 查询列表
  179. getList() {
  180. this.listLoading = true;
  181. let params = {
  182. pageNum: this.currentPage,
  183. pageSize: this.pageSize,
  184. retreatOrderNo: this.screenForm.orderNum,
  185. customerNumber: this.screenForm.jxsNum,
  186. customerName: this.screenForm.jxsName,
  187. productName: this.screenForm.chName,
  188. specification: this.screenForm.model,
  189. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  190. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  191. status: 2, // 1:发货单,2:工程发货单
  192. };
  193. getList(params).then((res) => {
  194. this.dataList = res.data.records;
  195. this.listTotal = res.data.total;
  196. this.listLoading = false;
  197. })
  198. },
  199. // 提交筛选表单
  200. submitScreenForm() {
  201. this.currentPage = 1;
  202. this.getList();
  203. },
  204. // 重置筛选表单
  205. resetScreenForm() {
  206. this.$refs.screenForm.resetFields();
  207. this.currentPage = 1;
  208. this.getList();
  209. },
  210. // 更改每页数量
  211. handleSizeChange(val) {
  212. this.pageSize = val;
  213. this.currentPage = 1;
  214. this.getList();
  215. },
  216. // 更改当前页
  217. handleCurrentChange(val) {
  218. this.currentPage = val;
  219. this.getList();
  220. },
  221. // 进入审批
  222. toExamine(item) {
  223. this.queryItem = item;
  224. this.isShowExamine = true;
  225. },
  226. // 进入详情
  227. toDetail(item) {
  228. this.queryItem = item;
  229. this.isShowDetail = true;
  230. },
  231. backList() {
  232. this.queryItem = {};
  233. this.isShowDetail = false;
  234. this.isShowExamine = false;
  235. },
  236. handleDelete(id) {
  237. }
  238. }
  239. }
  240. </script>
  241. <style lang="scss" scoped>
  242. </style>