check.vue 11 KB

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