apply_list.vue 10 KB

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