check.vue 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <div class="app-container">
  3. <div class="main-title">
  4. <div class="title">仓库提货确认</div>
  5. </div>
  6. <div>
  7. <el-form ref="screenForm" :model="screenForm" label-width="96px" size="small" label-position="right">
  8. <el-row :gutter="20">
  9. <el-col :xs="24" :sm="12" :lg="6">
  10. <el-form-item label="提货人手机号" prop="phone">
  11. <el-input v-model="screenForm.phone" placeholder="请输入提货人手机号"></el-input>
  12. </el-form-item>
  13. </el-col>
  14. <el-col :xs="24" :sm="12" :lg="3">
  15. <el-button size="small" type="primary" @click="getCode" :disabled="!screenForm.phone || countDown != 60">{{countDown == 60 ? getCodeText : '重新获取('+countDown+'s)'}}</el-button>
  16. </el-col>
  17. <el-col :xs="24" :sm="12" :lg="8">
  18. <el-form-item label="验证码" prop="code">
  19. <el-input v-model="screenForm.code" placeholder="请输入验证码"></el-input>
  20. </el-form-item>
  21. </el-col>
  22. <el-col :xs="24" :sm="12" :lg="3">
  23. <el-button size="small" type="primary" :disabled="!screenForm.phone || !screenForm.code" @click="getPickupManInfo">确 认</el-button>
  24. </el-col>
  25. </el-row>
  26. <el-row :gutter="20">
  27. <el-col :xs="24" :sm="12" :lg="9">
  28. <el-form-item label="提货人姓名" prop="name">
  29. <el-input v-model="screenForm.name" placeholder="请通过手机验证获取" readonly></el-input>
  30. </el-form-item>
  31. </el-col>
  32. <el-col :xs="24" :sm="12" :lg="8">
  33. <el-form-item label="提货人身份证" prop="idCard">
  34. <el-input v-model="screenForm.idCard" placeholder="请通过手机验证获取" readonly></el-input>
  35. </el-form-item>
  36. </el-col>
  37. <el-col :xs="24" :sm="12" :lg="3">
  38. <el-button size="small" type="primary" @click="getList">查 询</el-button>
  39. </el-col>
  40. </el-row>
  41. <el-row :gutter="20">
  42. <el-col :xs="24" :sm="24" :lg="24">
  43. <el-form-item prop="orderNum" label-width="0">
  44. <el-radio-group v-model="screenForm.status" size="medium">
  45. <el-radio-button label="0">未打印</el-radio-button>
  46. <el-radio-button label="1">已打印</el-radio-button>
  47. </el-radio-group>
  48. </el-form-item>
  49. </el-col>
  50. </el-row>
  51. </el-form>
  52. </div>
  53. <div class="main-title">
  54. <div class="title">提货单</div>
  55. </div>
  56. <div class="mymain-container">
  57. <div class="table">
  58. <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
  59. <el-table-column align="center" label="状态" min-width="160" show-overflow-tooltip>
  60. <template slot-scope="scope">
  61. {{ scope.row.printNum ? '已打单':'未打单' }}
  62. </template>
  63. </el-table-column>
  64. <el-table-column align="center" label="信息密钥" prop="informationKey" min-width="180" show-overflow-tooltip></el-table-column>
  65. <el-table-column align="center" label="预约日期" prop="pickTime" min-width="120" show-overflow-tooltip>
  66. <template slot-scope="scope">
  67. {{ scope.row.pickTime | dateToDayFilter }}
  68. </template>
  69. </el-table-column>
  70. <el-table-column align="center" label="提货时段" min-width="100" show-overflow-tooltip>
  71. <template slot-scope="scope">
  72. {{ scope.row.pickStatus == '1' ? '上午':'下午' }}
  73. </template>
  74. </el-table-column>
  75. <el-table-column align="center" label="销售订单号" prop="mainOrderId" min-width="200" show-overflow-tooltip></el-table-column>
  76. <el-table-column align="center" label="发货申请单号" prop="invoiceOrderId" min-width="180" show-overflow-tooltip></el-table-column>
  77. <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="120" show-overflow-tooltip></el-table-column>
  78. <el-table-column align="center" label="产品大类" prop="mainName" min-width="120" show-overflow-tooltip></el-table-column>
  79. <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
  80. <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
  81. <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
  82. <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
  83. <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
  84. <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
  85. <el-table-column align="center" label="金额" prop="payAmount" min-width="100" show-overflow-tooltip></el-table-column>
  86. <el-table-column align="center" label="使用返利金额" prop="payRebateAmount" min-width="120" show-overflow-tooltip></el-table-column>
  87. <el-table-column align="center" label="格力折扣" prop="totalDiscAmount" min-width="100" show-overflow-tooltip></el-table-column>
  88. <el-table-column align="center" label="仓库" prop="correspondName" min-width="160" show-overflow-tooltip></el-table-column>
  89. <el-table-column align="center" label="提货方式" prop="pickType" min-width="100" show-overflow-tooltip>
  90. <template slot-scope="scope">
  91. {{ scope.row.pickType == '1' ? '自提':'物流快递' }}
  92. </template>
  93. </el-table-column>
  94. <el-table-column align="center" label="提货人/物流公司" prop="takerName" min-width="160" show-overflow-tooltip>
  95. <template slot-scope="scope">
  96. {{ scope.row.pickType == '1' ? scope.row.takerName:scope.row.pickLogistics }}
  97. </template>
  98. </el-table-column>
  99. </el-table>
  100. </div>
  101. </div>
  102. <div class="pagination clearfix">
  103. <div class="fr">
  104. <el-pagination
  105. @size-change="handleSizeChange"
  106. @current-change="handleCurrentChange"
  107. :current-page="currentPage"
  108. :page-sizes="[10, 20, 30, 50]"
  109. :page-size="10"
  110. layout="total, sizes, prev, pager, next, jumper"
  111. :total="listTotal">
  112. </el-pagination>
  113. </div>
  114. </div>
  115. </div>
  116. </template>
  117. <script>
  118. import { getPickupList, getCode, getPickupManInfo } from "@/api/supply/pickup";
  119. export default {
  120. data() {
  121. return {
  122. currentPage: 1, // 当前页码
  123. pageSize: 10, // 每页数量
  124. listTotal: 0, // 列表总数
  125. dataList: null, // 列表数据
  126. listLoading: false, // 列表加载loading
  127. screenForm: { // 筛选表单数据
  128. phone: '',
  129. code: '',
  130. name: '',
  131. idCard: '',
  132. pickupWay: '',
  133. company: '',
  134. secretKey: '',
  135. },
  136. getCodeText: '获取验证码',
  137. countDown: 60,
  138. timer: null,
  139. }
  140. },
  141. computed: {
  142. },
  143. created() {
  144. },
  145. methods: {
  146. // 查询按钮权限
  147. checkBtnRole(value) {
  148. // let btnRole = this.$route.meta.roles;
  149. // if(!btnRole) {return true}
  150. // let index = btnRole.indexOf(value);
  151. // return index >= 0;
  152. return true
  153. },
  154. // 获取短信验证码
  155. getCode() {
  156. getCode({mobile: this.screenForm.phone}).then(res => {
  157. this.$successMsg('短信已发送');
  158. this.countDown--;
  159. this.timer = setInterval(() => {
  160. this.countDown--;
  161. if (this.countDown == 0) {
  162. this.countDown = 60;
  163. this.getCodeText = '重新获取';
  164. clearInterval(this.timer)
  165. }
  166. }, 1000)
  167. })
  168. },
  169. // 获取提货人信息
  170. getPickupManInfo() {
  171. getPickupManInfo({
  172. mobile: this.screenForm.phone,
  173. code: this.screenForm.code,
  174. }).then(res => {
  175. this.$successMsg('验证成功');
  176. this.screenForm.name = res.data.takerName;
  177. this.screenForm.idCard = res.data.identity;
  178. })
  179. },
  180. // 查询列表
  181. getList() {
  182. this.listLoading = true;
  183. let params = {
  184. pageNum: this.currentPage,
  185. pageSize: this.pageSize,
  186. userName: this.screenForm.account,
  187. nickName: this.screenForm.nickName,
  188. linkPhone: this.screenForm.phone,
  189. email: this.screenForm.email,
  190. status: this.screenForm.status,
  191. };
  192. getPickupList(params).then((res) => {
  193. this.dataList = res.data.records;
  194. this.listTotal = res.data.total;
  195. this.listLoading = false;
  196. })
  197. },
  198. // 更改每页数量
  199. handleSizeChange(val) {
  200. this.pageSize = val;
  201. this.currentPage = 1;
  202. this.getList();
  203. },
  204. // 更改当前页
  205. handleCurrentChange(val) {
  206. this.currentPage = val;
  207. this.getList();
  208. },
  209. }
  210. }
  211. </script>
  212. <style lang="scss" scoped>
  213. .main-title {
  214. display: flex;
  215. justify-content: space-between;
  216. align-items: center;
  217. height: 60px;
  218. border-bottom: 1px solid #DCDFE6;
  219. margin-bottom: 20px;
  220. .title {
  221. font-size: 16px;
  222. font-weight: 600;
  223. padding-left: 10px;
  224. }
  225. }
  226. </style>