123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <template>
- <div class="purchaseOrderWarehousing-wrap">
- <a-page-header :ghost="false" @back="handleBack" >
- <!-- 自定义的二级文字标题 -->
- <template slot="subTitle">
- <a id="purchaseOrderWarehousing-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
- </template>
- </a-page-header>
- <!-- 内容 -->
- <a-page-header title="单号:CG2021010100001" ></a-page-header>
- <a-card size="small" :bordered="false" class="purchaseOrderWarehousing-cont">
- <!-- 搜索条件 -->
- <div class="table-page-search-wrapper">
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
- <a-row :gutter="15">
- <a-col :md="6" :sm="24">
- <a-form-item label="关键词">
- <a-input id="purchaseOrderWarehousing-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="产品名称/产品编码/原厂编码"/>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="24">
- <a-form-item label="产品品牌">
- <a-select
- placeholder="请选择"
- id="purchaseOrderWarehousing-state"
- allowClear
- v-model="queryParam.dataSourceNo"
- :showSearch="true"
- option-filter-prop="children"
- :filter-option="filterOption">
- <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
- </a-select>
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="24">
- <a-form-item label="产品类别">
- <a-cascader :options="typeData" expand-trigger="hover" id="purchaseOrderWarehousing-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
- </a-form-item>
- </a-col>
- <a-col :md="6" :sm="24">
- <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderWarehousing-refresh">查询</a-button>
- <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseOrderWarehousing-reset">重置</a-button>
- </a-col>
- </a-row>
- </a-form>
- </div>
- <!-- 总计 -->
- <a-alert type="info" showIcon style="margin-bottom:15px">
- <div slot="message">产品款数 <strong>6</strong> ,采购数量合计 <strong>6</strong> ,采购金额合计¥<strong>6.33</strong></div>
- </a-alert>
- <!-- 列表 -->
- <s-table
- class="sTable"
- ref="table"
- size="default"
- :rowKey="(record) => record.id"
- :columns="columns"
- :data="loadData"
- :scroll="{ x: 1360 }"
- bordered>
- <!-- 入库数量 -->
- <template slot="storageQuantity" slot-scope="text, record">
- <span>{{ record.storageQuantity }}</span>
- <a-input-number
- id="purchaseOrderWarehousing-storageQuantity"
- :value="record.storageQuantity"
- :precision="0"
- :min="0"
- :max="999999"
- placeholder="请输入" />
- </template>
- <!-- 仓库仓位 -->
- <template slot="warehousePosition" slot-scope="text, record">
- <a-cascader :options="typeData" expand-trigger="hover" id="purchaseOrderWarehousing-state" placeholder="请选择" allowClear v-model="record.brand" />
- </template>
- </s-table>
- </a-card>
- <a-affix :offset-bottom="0">
- <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
- <a-button type="primary" id="purchaseOrderWarehousing-warehousing" size="large" @click="handleWarehousing" style="padding: 0 60px;">确认入库</a-button>
- </div>
- </a-affix>
- </div>
- </template>
- <script>
- import { STable, VSelect } from '@/components'
- export default {
- components: { STable, VSelect },
- data () {
- return {
- queryParam: {
- },
- brandData: [], // 产品品牌 下拉数据
- typeData: [], // 产品类别 下拉数据
- disabled: false, // 查询、重置按钮是否可操作
- // 表头
- columns: [
- { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
- { title: '产品编码', dataIndex: 'creatDate', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
- { title: '产品名称', dataIndex: 'custName', align: 'center', customRender: function (text) { return text || '--' } },
- { title: '原厂编码', dataIndex: 'totalP', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
- { title: '采购单价', dataIndex: 'totalNums', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- { title: '采购数量', scopedSlots: { customRender: 'purchaseNum' }, width: 100, align: 'center' },
- { title: '缺货数量', scopedSlots: { customRender: 'outOfStockNum' }, width: 100, align: 'center' },
- { title: '单位', dataIndex: 'mementPay', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
- { title: '采购金额', dataIndex: 'shDate', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
- { title: '入库数量', scopedSlots: { customRender: 'storageQuantity' }, width: 150, align: 'center' },
- { title: '仓库仓位', scopedSlots: { customRender: 'warehousePosition' }, width: 150, align: 'center' }
- ],
- // 加载数据方法 必须为 Promise 对象
- loadData: parameter => {
- this.disabled = true
- // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
- // const data = res.data
- // const no = (data.pageNo - 1) * data.pageSize
- // for (var i = 0; i < data.list.length; i++) {
- // data.list[i].no = no + i + 1
- // }
- // this.disabled = false
- // return data
- // })
- const _this = this
- return new Promise(function (resolve, reject) {
- const data = {
- pageNo: 1,
- pageSize: 10,
- list: [
- { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
- ],
- count: 10
- }
- const no = (data.pageNo - 1) * data.pageSize
- for (var i = 0; i < data.list.length; i++) {
- data.list[i].no = no + i + 1
- }
- _this.disabled = false
- resolve(data)
- })
- }
- }
- },
- methods: {
- // 重置
- resetSearchForm () {
- this.queryParam.orderBundleNo = ''
- this.queryParam.orderBundle.custMobile = ''
- this.queryParam.bundleName = ''
- this.queryParam.itemName = ''
- this.oldTime = undefined
- this.newTime = undefined
- this.$refs.table.refresh(true)
- },
- // 确认入库
- handleWarehousing () {
- },
- // 返回列表
- handleBack () {
- this.$router.push({ path: '/purchasingManagement/purchaseOrder/list' })
- },
- filterOption (input, option) {
- return (
- option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
- )
- }
- }
- }
- </script>
- <style lang="less">
- .purchaseOrderWarehousing-wrap{
- .btn-cont {
- text-align: center;
- margin: 35px 0 10px;
- }
- }
- </style>
|