sum_list.vue 14 KB

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