pickup_list.vue 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  1. <template>
  2. <div class="app-container">
  3. <div v-show="!isShowForm">
  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="12" :lg="6">
  9. <el-form-item label="申请发货单号" prop="orderNum">
  10. <el-input v-model="screenForm.orderNum" placeholder="请输入申请发货单号"></el-input>
  11. </el-form-item>
  12. </el-col>
  13. <el-col :xs="24" :sm="12" :lg="6">
  14. <el-form-item label="申请人" prop="applyName">
  15. <el-input v-model="screenForm.applyName" placeholder="请输入申请人"></el-input>
  16. </el-form-item>
  17. </el-col>
  18. <el-col :xs="24" :sm="12" :lg="6">
  19. <el-form-item label="提货仓库" prop="warehouse">
  20. <el-input v-model="screenForm.warehouse" placeholder="请输入提货仓库"></el-input>
  21. </el-form-item>
  22. </el-col>
  23. <el-col :xs="24" :sm="12" :lg="6">
  24. <el-form-item label="提货日期" prop="date">
  25. <el-date-picker
  26. v-model="screenForm.date"
  27. type="datetimerange"
  28. range-separator="至"
  29. style="width: 100%;"
  30. value-format="yyyy-MM-dd HH:mm:ss"
  31. start-placeholder="开始日期"
  32. end-placeholder="结束日期">
  33. </el-date-picker>
  34. </el-form-item>
  35. </el-col>
  36. <el-col :xs="24" :sm="24" :lg="24" class="tr">
  37. <el-form-item label="">
  38. <el-button size="small" @click="resetScreenForm">清空</el-button>
  39. <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
  40. </el-form-item>
  41. </el-col>
  42. </el-row>
  43. </el-form>
  44. </div>
  45. <div class="mymain-container">
  46. <div class="btn-group clearfix">
  47. <div class="fl">
  48. <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
  49. </div>
  50. <div class="fr">
  51. <ExportButton :exUrl="'pick/export'" :exParams="exParams" />
  52. </div>
  53. </div>
  54. <div class="table">
  55. <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
  56. <el-table-column align="center" label="状态" min-width="100" show-overflow-tooltip>
  57. <template slot-scope="scope">
  58. {{ scope.row.printNum ? '已打单':'未打单' }}
  59. </template>
  60. </el-table-column>
  61. <el-table-column align="center" label="打单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
  62. <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
  63. <el-table-column align="center" label="发货申请单号" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
  64. <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
  65. <template slot-scope="scope">
  66. {{ scope.row.pickTime | dateToDayFilter }}
  67. </template>
  68. </el-table-column>
  69. <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
  70. <template slot-scope="scope">
  71. {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
  72. </template>
  73. </el-table-column>
  74. <el-table-column align="center" label="提货仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
  75. <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
  76. <template slot-scope="scope">
  77. {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
  78. </template>
  79. </el-table-column>
  80. <el-table-column align="center" label="单据日期" prop="theTime" min-width="120" show-overflow-tooltip>
  81. <template slot-scope="scope">
  82. {{ scope.row.theTime | dateToDayFilter }}
  83. </template>
  84. </el-table-column>
  85. <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="180" show-overflow-tooltip></el-table-column>
  86. <el-table-column align="center" label="工程编号" prop="enginOrderNo" min-width="180" show-overflow-tooltip></el-table-column>
  87. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
  88. <el-table-column align="center" label="产品编号" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  89. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  90. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  91. <el-table-column align="center" label="提货总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  92. <el-table-column align="center" label="备注" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
  93. <el-table-column align="center" label="操作" width="100" fixed="right">
  94. <template slot-scope="scope">
  95. <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
  96. </template>
  97. </el-table-column>
  98. </el-table>
  99. </div>
  100. </div>
  101. <div class="pagination clearfix">
  102. <div class="fr">
  103. <el-pagination
  104. @size-change="handleSizeChange"
  105. @current-change="handleCurrentChange"
  106. :current-page="currentPage"
  107. :page-sizes="[10, 20, 30, 50]"
  108. :page-size="10"
  109. layout="total, sizes, prev, pager, next, jumper"
  110. :total="listTotal">
  111. </el-pagination>
  112. </div>
  113. </div>
  114. </div>
  115. <PickupForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
  116. </div>
  117. </template>
  118. <script>
  119. import { getPickupList } from "@/api/supply/pickup";
  120. import PickupForm from "@/views/supply/pickup/components/pickup_form";
  121. export default {
  122. components: {
  123. PickupForm
  124. },
  125. data() {
  126. return {
  127. currentPage: 1, // 当前页码
  128. pageSize: 10, // 每页数量
  129. listTotal: 0, // 列表总数
  130. dataList: null, // 列表数据
  131. listLoading: false, // 列表加载loading
  132. screenForm: { // 筛选表单数据
  133. orderNum: '',
  134. applyName: '',
  135. warehouse: '',
  136. date: '',
  137. },
  138. queryItem: {},
  139. isShowForm: false,
  140. }
  141. },
  142. computed: {
  143. exParams() {
  144. return {
  145. shipOrderNo: this.screenForm.orderNum,
  146. createBy: this.screenForm.applyName,
  147. stockName: this.screenForm.warehouse,
  148. pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',
  149. pickEndTime: this.screenForm.date ? this.screenForm.date[1] : '',
  150. }
  151. },
  152. },
  153. created() {
  154. this.getList();
  155. },
  156. methods: {
  157. // 查询按钮权限
  158. checkBtnRole(value) {
  159. // let btnRole = this.$route.meta.roles;
  160. // if(!btnRole) {return true}
  161. // let index = btnRole.indexOf(value);
  162. // return index >= 0;
  163. return true
  164. },
  165. // 查询列表
  166. getList() {
  167. this.listLoading = true;
  168. let params = {
  169. pageNum: this.currentPage,
  170. pageSize: this.pageSize,
  171. shipOrderNo: this.screenForm.orderNum,
  172. createBy: this.screenForm.applyName,
  173. stockName: this.screenForm.warehouse,
  174. pickStartTime: this.screenForm.date ? this.screenForm.date[0] : '',
  175. pickEndTime: this.screenForm.date ? this.screenForm.date[1] : '',
  176. };
  177. getPickupList(params).then((res) => {
  178. this.dataList = res.data.records;
  179. this.listTotal = res.data.total;
  180. this.listLoading = false;
  181. })
  182. },
  183. // 提交筛选表单
  184. submitScreenForm() {
  185. this.currentPage = 1;
  186. this.getList();
  187. },
  188. // 重置筛选表单
  189. resetScreenForm() {
  190. this.$refs.screenForm.resetFields();
  191. this.currentPage = 1;
  192. this.getList();
  193. },
  194. // 更改每页数量
  195. handleSizeChange(val) {
  196. this.pageSize = val;
  197. this.currentPage = 1;
  198. this.getList();
  199. },
  200. // 更改当前页
  201. handleCurrentChange(val) {
  202. this.currentPage = val;
  203. this.getList();
  204. },
  205. // 进入表单
  206. toForm(item) {
  207. this.queryItem = item;
  208. this.isShowForm = true;
  209. },
  210. backList() {
  211. this.queryItem = {};
  212. this.isShowForm = false;
  213. },
  214. }
  215. }
  216. </script>
  217. <style lang="scss" scoped>
  218. </style>