warehousing.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164
  1. <template>
  2. <div class="bulkWarehousingOrderWarehousing-wrap">
  3. <a-page-header :ghost="false" @back="handleBack" >
  4. <!-- 自定义的二级文字标题 -->
  5. <template slot="subTitle">
  6. <a id="bulkWarehousingOrderWarehousing-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
  7. </template>
  8. </a-page-header>
  9. <!-- 内容 -->
  10. <a-page-header title="单号:CG2021010100001" ></a-page-header>
  11. <a-card :bordered="false" class="bulkWarehousingOrderWarehousing-cont">
  12. <!-- 搜索条件 -->
  13. <div class="table-page-search-wrapper">
  14. <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
  15. <a-row :gutter="15">
  16. <a-col :md="6" :sm="24">
  17. <a-form-item label="关键词">
  18. <a-input id="bulkWarehousingOrderWarehousing-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="产品名称/产品编码/原厂编码"/>
  19. </a-form-item>
  20. </a-col>
  21. <a-col :md="6" :sm="24">
  22. <a-form-item label="产品品牌">
  23. <a-select placeholder="请选择" id="bulkWarehousingOrderWarehousing-state" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
  24. <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
  25. </a-select>
  26. </a-form-item>
  27. </a-col>
  28. <a-col :md="6" :sm="24">
  29. <a-form-item label="产品类别">
  30. <a-cascader :options="typeData" id="bulkWarehousingOrderWarehousing-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
  31. </a-form-item>
  32. </a-col>
  33. <a-col :md="6" :sm="24">
  34. <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkWarehousingOrderWarehousing-refresh">查询</a-button>
  35. <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="bulkWarehousingOrderWarehousing-reset">重置</a-button>
  36. </a-col>
  37. </a-row>
  38. </a-form>
  39. </div>
  40. <!-- 总计 -->
  41. <a-alert type="info" showIcon style="margin-bottom:15px">
  42. <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
  43. </a-alert>
  44. <!-- 列表 -->
  45. <s-table
  46. class="sTable"
  47. ref="table"
  48. size="default"
  49. :rowKey="(record) => record.id"
  50. :columns="columns"
  51. :data="loadData"
  52. bordered>
  53. <!-- 入库数量 -->
  54. <template slot="storageQuantity" slot-scope="text, record">
  55. <span>{{record.storageQuantity}}</span>
  56. <a-input-number
  57. id="bulkWarehousingOrderWarehousing-storageQuantity"
  58. :value="record.storageQuantity"
  59. :precision="0"
  60. :min="0"
  61. :max="999999"
  62. placeholder="请输入" />
  63. </template>
  64. <!-- 仓库仓位 -->
  65. <template slot="warehousePosition" slot-scope="text, record">
  66. <a-cascader :options="typeData" id="bulkWarehousingOrderWarehousing-state" placeholder="请选择" allowClear v-model="record.brand" />
  67. </template>
  68. </s-table>
  69. </a-card>
  70. <a-affix :offset-bottom="0">
  71. <div style="text-align: center;width: 100%;background-color: #fff;padding: 30px 0;box-shadow: 0 0 20px #dcdee2;">
  72. <a-button type="primary" id="bulkWarehousingOrderWarehousing-warehousing" size="large" @click="handleWarehousing" style="padding: 0 60px;">确认入库</a-button>
  73. </div>
  74. </a-affix>
  75. </div>
  76. </template>
  77. <script>
  78. import { STable, VSelect } from '@/components'
  79. export default{
  80. components: { STable, VSelect },
  81. data(){
  82. return{
  83. queryParam: {
  84. },
  85. brandData: [], // 产品品牌 下拉数据
  86. typeData: [], // 产品类别 下拉数据
  87. disabled: false, // 查询、重置按钮是否可操作
  88. // 表头
  89. columns: [
  90. { title: '序号', dataIndex: 'no', align: 'center' },
  91. { title: '产品编码', dataIndex: 'creatDate', align: 'center' },
  92. { title: '产品名称', dataIndex: 'custName', align: 'center' },
  93. { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
  94. { title: '采购单价', dataIndex: 'totalNums', align: 'center' },
  95. { title: '采购数量', scopedSlots: { customRender: 'purchaseNum' }, align: 'center' },
  96. { title: '缺货数量', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
  97. { title: '单位', dataIndex: 'mementPay', align: 'center' },
  98. { title: '采购金额', dataIndex: 'shDate', align: 'center' },
  99. { title: '入库数量', scopedSlots: { customRender: 'storageQuantity' }, align: 'center' },
  100. { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, align: 'center' },
  101. ],
  102. // 加载数据方法 必须为 Promise 对象
  103. loadData: parameter => {
  104. this.disabled = true
  105. // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
  106. // const data = res.data
  107. // const no = (data.pageNo - 1) * data.pageSize
  108. // for (var i = 0; i < data.list.length; i++) {
  109. // data.list[i].no = no + i + 1
  110. // }
  111. // this.disabled = false
  112. // return data
  113. // })
  114. const _this = this
  115. return new Promise(function(resolve, reject){
  116. const data = {
  117. pageNo: 1,
  118. pageSize: 10,
  119. list: [
  120. { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
  121. ],
  122. count: 10
  123. }
  124. const no = (data.pageNo - 1) * data.pageSize
  125. for (var i = 0; i < data.list.length; i++) {
  126. data.list[i].no = no + i + 1
  127. }
  128. _this.disabled = false
  129. resolve(data)
  130. })
  131. },
  132. }
  133. },
  134. methods: {
  135. // 重置
  136. resetSearchForm () {
  137. this.queryParam.orderBundleNo = ''
  138. this.queryParam.orderBundle.custMobile = ''
  139. this.queryParam.bundleName = ''
  140. this.queryParam.itemName = ''
  141. this.oldTime = undefined
  142. this.newTime = undefined
  143. this.$refs.table.refresh(true)
  144. },
  145. // 确认入库
  146. handleWarehousing(){
  147. },
  148. // 返回列表
  149. handleBack(){
  150. this.$router.push({ path: '/purchasingManagement/purchaseOrder/list'})
  151. },
  152. filterOption(input, option) {
  153. return (
  154. option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
  155. )
  156. },
  157. }
  158. }
  159. </script>
  160. <style lang="less"></style>