sum_list.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358
  1. <template>
  2. <div class="app-container">
  3. <!-- 筛选条件 -->
  4. <div class="screen-container">
  5. <Collapse :is-collapse="isCollapse" :screen-form="screenForm">
  6. <template #right_btn>
  7. <el-button size="mini" @click="resetScreenForm">清空</el-button>
  8. <el-button size="mini" type="primary" @click="submitScreenForm">搜索</el-button>
  9. </template>
  10. <template #search>
  11. <el-form ref="screenForm" :model="screenForm" label-width="100px" size="mini" label-position="left">
  12. <el-row :gutter="20">
  13. <el-col :xs="24" :sm="12" :lg="6">
  14. <el-form-item label="申请发货单号" prop="orderNum">
  15. <el-input v-model="screenForm.orderNum" 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="jxsName">
  20. <el-input v-model="screenForm.jxsName" 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="jxsNum">
  25. <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码"></el-input>
  26. </el-form-item>
  27. </el-col>
  28. <el-col :xs="24" :sm="12" :lg="6">
  29. <el-form-item label="仓库" prop="warehouse">
  30. <el-input v-model="screenForm.warehouse" placeholder="请输入仓库"></el-input>
  31. </el-form-item>
  32. </el-col>
  33. <el-col :xs="24" :sm="12" :lg="6">
  34. <el-form-item label="状态" prop="status">
  35. <el-select v-model="screenForm.status" placeholder="请选择">
  36. <el-option label="未打单" :value="0"> </el-option>
  37. <el-option label="已打单" :value="1"> </el-option>
  38. </el-select>
  39. </el-form-item>
  40. </el-col>
  41. <el-col :xs="24" :sm="12" :lg="6">
  42. <el-form-item label="手机号" prop="takerPhone">
  43. <el-input
  44. type="number"
  45. @mousewheel.native.prevent
  46. v-model.number="screenForm.takerPhone"
  47. placeholder="请输入手机号"
  48. ></el-input>
  49. </el-form-item>
  50. </el-col>
  51. <el-col :xs="24" :sm="12" :lg="6">
  52. <el-form-item label="提货人" prop="takerId">
  53. <el-select v-model="screenForm.takerId" placeholder="请选择">
  54. <el-option v-for="item in pickupManList" :key="item.id" :label="item.takerName" :value="item.id">
  55. </el-option>
  56. </el-select>
  57. </el-form-item>
  58. </el-col>
  59. <el-col :xs="24" :sm="12" :lg="6">
  60. <el-form-item label="申请日期" prop="date">
  61. <el-date-picker
  62. v-model="screenForm.date"
  63. type="datetimerange"
  64. range-separator="至"
  65. style="width: 100%"
  66. value-format="yyyy-MM-dd HH:mm:ss"
  67. start-placeholder="开始日期"
  68. end-placeholder="结束日期"
  69. >
  70. </el-date-picker>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :xs="24" :sm="12" :lg="6">
  74. <el-form-item label="打印时间" prop="printTime">
  75. <el-date-picker
  76. v-model="screenForm.printTime"
  77. type="datetimerange"
  78. range-separator="至"
  79. style="width: 100%"
  80. value-format="yyyy-MM-dd HH:mm:ss"
  81. start-placeholder="开始日期"
  82. end-placeholder="结束日期"
  83. >
  84. </el-date-picker>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :xs="24" :sm="12" :lg="6">
  88. <el-form-item label="出库单号" prop="salesOrderId">
  89. <el-input
  90. type="number"
  91. @mousewheel.native.prevent
  92. v-model.number="screenForm.salesOrderId"
  93. placeholder="请输入出库单号"
  94. ></el-input>
  95. </el-form-item>
  96. </el-col>
  97. </el-row>
  98. </el-form>
  99. </template>
  100. </Collapse>
  101. </div>
  102. <div class="mymain-container">
  103. <div class="btn-group clearfix">
  104. <div class="fr">
  105. <ExportButton :exUrl="'pick/export'" :exParams="exParams" />
  106. </div>
  107. </div>
  108. <div class="table">
  109. <el-table
  110. v-loading="listLoading"
  111. :data="dataList"
  112. element-loading-text="Loading"
  113. border
  114. fit
  115. highlight-current-row
  116. stripe
  117. >
  118. <el-table-column align="left" label="状态" min-width="80" show-overflow-tooltip>
  119. <template slot-scope="scope">
  120. {{ scope.row.printNum ? '已打单' : '未打单' }}
  121. </template>
  122. </el-table-column>
  123. <el-table-column align="left" label="打单日期" prop="printTime" min-width="160" show-overflow-tooltip>
  124. </el-table-column>
  125. <!-- <el-table-column align="left" label="信息密钥" prop="informationKey" min-width="100" show-overflow-tooltip>
  126. <template slot-scope="scope">
  127. <CopyButton :copyText="scope.row.informationKey" />
  128. <span>{{ scope.row.informationKey }}</span>
  129. </template>
  130. </el-table-column> -->
  131. <el-table-column align="left" label="出库单号" prop="salesOrderId" min-width="130" show-overflow-tooltip>
  132. <template slot-scope="scope">
  133. <CopyButton :copyText="scope.row.salesOrderId" />
  134. <span>{{ scope.row.salesOrderId }}</span>
  135. </template>
  136. </el-table-column>
  137. <el-table-column align="left" label="发货申请单号" prop="invoiceId" min-width="130" show-overflow-tooltip>
  138. <template slot-scope="scope">
  139. <CopyButton :copyText="scope.row.invoiceId" />
  140. <span>{{ scope.row.invoiceId }}</span>
  141. </template>
  142. </el-table-column>
  143. <el-table-column align="left" label="销售订单号" prop="mainOrderId" min-width="140" show-overflow-tooltip>
  144. <template slot-scope="scope">
  145. <CopyButton :copyText="scope.row.mainOrderId" />
  146. <span>{{ scope.row.mainOrderId }}</span>
  147. </template>
  148. </el-table-column>
  149. <el-table-column align="left" label="物料编码" prop="materialCode" min-width="120" show-overflow-tooltip>
  150. <template slot-scope="scope">
  151. <CopyButton :copyText="scope.row.materialCode" />
  152. <span>{{ scope.row.materialCode }}</span>
  153. </template>
  154. </el-table-column>
  155. <el-table-column align="left" label="产品编码" prop="materialOldNumber" min-width="140" show-overflow-tooltip>
  156. <template slot-scope="scope">
  157. <CopyButton :copyText="scope.row.materialOldNumber" />
  158. <span>{{ scope.row.materialOldNumber }}</span>
  159. </template>
  160. </el-table-column>
  161. <el-table-column align="left" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip>
  162. <template slot-scope="scope">
  163. <CopyButton :copyText="scope.row.materialName" />
  164. <span>{{ scope.row.materialName }}</span>
  165. </template>
  166. </el-table-column>
  167. <el-table-column align="left" label="规格型号" prop="specification" min-width="350" show-overflow-tooltip>
  168. <template slot-scope="scope">
  169. <CopyButton :copyText="scope.row.specification" />
  170. <span>{{ scope.row.specification }}</span>
  171. </template>
  172. </el-table-column>
  173. <el-table-column align="left" label="提货总数量" prop="refundableQty" min-width="100" show-overflow-tooltip>
  174. </el-table-column>
  175. <el-table-column align="left" label="提货人" prop="takerName" min-width="100" show-overflow-tooltip>
  176. </el-table-column>
  177. <el-table-column align="left" label="提货人手机号" prop="takerPhone" min-width="100" show-overflow-tooltip>
  178. </el-table-column>
  179. <el-table-column align="left" label="经销商编码" prop="customerNumber" min-width="100" show-overflow-tooltip>
  180. <template slot-scope="scope">
  181. <CopyButton :copyText="scope.row.customerNumber" />
  182. <span>{{ scope.row.customerNumber }}</span>
  183. </template>
  184. </el-table-column>
  185. <el-table-column align="left" label="经销商名称" prop="customerName" min-width="250" show-overflow-tooltip>
  186. <template slot-scope="scope">
  187. <CopyButton :copyText="scope.row.customerName" />
  188. <span>{{ scope.row.customerName }}</span>
  189. </template>
  190. </el-table-column>
  191. <el-table-column align="left" label="工程编号" prop="enginOrderNo" min-width="150" show-overflow-tooltip>
  192. <template slot-scope="scope">
  193. <CopyButton :copyText="scope.row.enginOrderNo" />
  194. <span>{{ scope.row.enginOrderNo }}</span>
  195. </template>
  196. </el-table-column>
  197. <el-table-column align="left" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
  198. <template slot-scope="scope">
  199. {{ scope.row.pickTime | dateToDayFilter }}
  200. </template>
  201. </el-table-column>
  202. <el-table-column align="left" label="提货时段" min-width="100" show-overflow-tooltip>
  203. <template slot-scope="scope">
  204. {{ scope.row.pickStatus == '1' ? '上午' : '下午' }}
  205. </template>
  206. </el-table-column>
  207. <!-- <el-table-column align="left" label="手机号" prop="phone" min-width="100" show-overflow-tooltip></el-table-column> -->
  208. <el-table-column align="left" label="提货仓库" prop="correspondName" min-width="100" show-overflow-tooltip>
  209. </el-table-column>
  210. <el-table-column align="left" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
  211. <template slot-scope="scope">
  212. {{ scope.row.pickType == '1' ? '自提' : '物流快递' }}
  213. </template>
  214. </el-table-column>
  215. <el-table-column align="left" label="单据日期" prop="theTime" min-width="120" show-overflow-tooltip>
  216. <template slot-scope="scope">
  217. {{ scope.row.theTime | dateToDayFilter }}
  218. </template>
  219. </el-table-column>
  220. <el-table-column align="left" label="备注" prop="remark" min-width="100" show-overflow-tooltip>
  221. </el-table-column>
  222. </el-table>
  223. </div>
  224. </div>
  225. <div class="pagination clearfix">
  226. <div class="fr">
  227. <el-pagination
  228. @size-change="handleSizeChange"
  229. @current-change="handleCurrentChange"
  230. :current-page="currentPage"
  231. :page-sizes="[10, 20, 30, 50]"
  232. :page-size="10"
  233. layout="total, sizes, prev, pager, next, jumper"
  234. :total="listTotal"
  235. >
  236. </el-pagination>
  237. </div>
  238. </div>
  239. </div>
  240. </template>
  241. <script>
  242. import { getPickupList, getPickupManList } from '@/api/supply/pickup'
  243. export default {
  244. data() {
  245. return {
  246. currentPage: 1, // 当前页码
  247. pageSize: 10, // 每页数量
  248. listTotal: 0, // 列表总数
  249. dataList: null, // 列表数据
  250. listLoading: false, // 列表加载loading
  251. screenForm: {
  252. // 筛选表单数据
  253. orderNum: '',
  254. jxsName: '',
  255. jxsNum: '',
  256. warehouse: '',
  257. date: '',
  258. status: '',
  259. takerPhone: '',
  260. takerId: '',
  261. printTime: '',
  262. salesOrderId: ''
  263. },
  264. pickupManList: '',
  265. isCollapse: true
  266. }
  267. },
  268. computed: {
  269. exParams() {
  270. return {
  271. invoiceId: this.screenForm.orderNum,
  272. customerName: this.screenForm.jxsName,
  273. customerNumber: this.screenForm.jxsNum,
  274. stockName: this.screenForm.warehouse,
  275. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  276. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  277. status: this.screenForm.status,
  278. takerPhone: this.screenForm.takerPhone,
  279. takerId: this.screenForm.takerId,
  280. printStartTime: this.screenForm.printTime[0],
  281. printEndTime: this.screenForm.printTime[1],
  282. salesOrderId: this.screenForm.salesOrderId
  283. }
  284. }
  285. },
  286. created() {
  287. this.getList()
  288. this.getPickupManList()
  289. },
  290. methods: {
  291. // 查询列表
  292. getList() {
  293. this.listLoading = true
  294. let params = {
  295. pageNum: this.currentPage,
  296. pageSize: this.pageSize,
  297. invoiceId: this.screenForm.orderNum,
  298. customerName: this.screenForm.jxsName,
  299. customerNumber: this.screenForm.jxsNum,
  300. stockName: this.screenForm.warehouse,
  301. startTime: this.screenForm.date ? this.screenForm.date[0] : '',
  302. endTime: this.screenForm.date ? this.screenForm.date[1] : '',
  303. status: this.screenForm.status,
  304. takerPhone: this.screenForm.takerPhone,
  305. takerId: this.screenForm.takerId,
  306. printStartTime: this.screenForm.printTime[0],
  307. printEndTime: this.screenForm.printTime[1],
  308. salesOrderId: this.screenForm.salesOrderId
  309. }
  310. getPickupList(params).then(res => {
  311. this.dataList = res.data.records
  312. this.listTotal = res.data.total
  313. this.listLoading = false
  314. })
  315. },
  316. getPickupManList() {
  317. getPickupManList({ pageNum: 1, pageSize: -1 }).then(res => {
  318. this.pickupManList = res.data.records
  319. })
  320. },
  321. // 提交筛选表单
  322. submitScreenForm() {
  323. this.currentPage = 1
  324. this.getList()
  325. },
  326. // 重置筛选表单
  327. resetScreenForm() {
  328. this.$refs.screenForm.resetFields()
  329. this.currentPage = 1
  330. this.getList()
  331. },
  332. // 更改每页数量
  333. handleSizeChange(val) {
  334. this.pageSize = val
  335. this.currentPage = 1
  336. this.getList()
  337. },
  338. // 更改当前页
  339. handleCurrentChange(val) {
  340. this.currentPage = val
  341. this.getList()
  342. }
  343. }
  344. }
  345. </script>
  346. <style lang="scss" scoped></style>