|
@@ -15,94 +15,95 @@
|
|
|
</a-page-header>
|
|
|
<!-- 选择产品 -->
|
|
|
<div class="purchaseReturnEdit-cont">
|
|
|
- <a-collapse :activeKey="['1']">
|
|
|
- <a-collapse-panel key="1" header="选择产品">
|
|
|
- <!-- 筛选条件 -->
|
|
|
- <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="产品编码" prop="productCode">
|
|
|
- <a-input id="bulkReturnGoodsEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-item label="产品名称" prop="productName">
|
|
|
- <a-input id="bulkReturnGoodsEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
- <a-form-model-item label="仓库">
|
|
|
- <a-select
|
|
|
- placeholder="请选择仓库"
|
|
|
- id="bulkReturnGoodsEdit-warehouseSn"
|
|
|
- allowClear
|
|
|
- v-model="queryParam.warehouseSn"
|
|
|
- :showSearch="true"
|
|
|
- option-filter-prop="children"
|
|
|
- :filter-option="filterOption">
|
|
|
- <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
- </a-select>
|
|
|
- </a-form-model-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkReturnGoodsEdit-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkReturnGoodsEdit-reset">重置</a-button>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
- size="small"
|
|
|
- :rowKey="(record) => record.stockDetailSn"
|
|
|
- rowKeyName="stockDetailSn"
|
|
|
- :columns="columns"
|
|
|
- :data="loadData"
|
|
|
- :pageSize="10"
|
|
|
- :scroll="{ y: 149 }"
|
|
|
- bordered>
|
|
|
- <!-- 数量 -->
|
|
|
- <template slot="returnQty" slot-scope="text, record">
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- id="purchaseReturnEdit-returnQty"
|
|
|
- v-model="record.returnQty"
|
|
|
- :precision="0"
|
|
|
- :min="1"
|
|
|
- :max="record.refundableQty"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </template>
|
|
|
- <!-- 单价 -->
|
|
|
- <template slot="returnPrice" slot-scope="text, record">
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- id="purchaseReturnEdit-returnPrice"
|
|
|
- v-model="record.returnPrice"
|
|
|
- :precision="2"
|
|
|
- :min="0"
|
|
|
- :max="999999"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <span v-if="record.refundableQty==0">--</span>
|
|
|
- <a-button
|
|
|
- v-else
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- class="button-primary"
|
|
|
- @click="handleAdd(record)"
|
|
|
- id="purchaseReturnEdit-add-btn">添加</a-button>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-collapse-panel>
|
|
|
- </a-collapse>
|
|
|
- </div>
|
|
|
+ <a-collapse :activeKey="['1']">
|
|
|
+ <a-collapse-panel key="1" header="选择产品">
|
|
|
+ <!-- 筛选条件 -->
|
|
|
+ <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="产品编码" prop="productCode">
|
|
|
+ <a-input id="bulkReturnGoodsEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-item label="产品名称" prop="productName">
|
|
|
+ <a-input id="bulkReturnGoodsEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
+ </a-form-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24">
|
|
|
+ <a-form-model-item label="仓库">
|
|
|
+ <a-select
|
|
|
+ placeholder="请选择仓库"
|
|
|
+ id="bulkReturnGoodsEdit-warehouseSn"
|
|
|
+ allowClear
|
|
|
+ v-model="queryParam.warehouseSn"
|
|
|
+ :showSearch="true"
|
|
|
+ option-filter-prop="children"
|
|
|
+ :filter-option="filterOption">
|
|
|
+ <a-select-option v-for="item in warehouseList" :key="item.warehouseSn" :value="item.warehouseSn">{{ item.name }}</a-select-option>
|
|
|
+ </a-select>
|
|
|
+ </a-form-model-item>
|
|
|
+ </a-col>
|
|
|
+ <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
+ <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="bulkReturnGoodsEdit-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="bulkReturnGoodsEdit-reset">重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ :rowKey="(record) => record.stockDetailSn"
|
|
|
+ rowKeyName="stockDetailSn"
|
|
|
+ :columns="columns"
|
|
|
+ :data="loadData"
|
|
|
+ :pageSize="10"
|
|
|
+ :scroll="{ y: 149 }"
|
|
|
+ bordered>
|
|
|
+ <!-- 数量 -->
|
|
|
+ <template slot="returnQty" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ size="small"
|
|
|
+ :id="'purchaseReturnEdit-returnQty-'+record.id"
|
|
|
+ v-model="record.returnQty"
|
|
|
+ :precision="0"
|
|
|
+ :min="1"
|
|
|
+ :max="record.refundableQty"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </template>
|
|
|
+ <!-- 单价 -->
|
|
|
+ <template slot="returnPrice" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
+ size="small"
|
|
|
+ :id="'purchaseReturnEdit-returnPrice-'+record.id"
|
|
|
+ v-model="record.returnPrice"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :max="999999"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <span v-if="record.refundableQty==0">--</span>
|
|
|
+ <a-button
|
|
|
+ v-else
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleAdd(record)"
|
|
|
+ :id="'purchaseReturnEdit-add-'+record.id"
|
|
|
+ >添加</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-collapse-panel>
|
|
|
+ </a-collapse>
|
|
|
+ </div>
|
|
|
<!-- 已选产品 -->
|
|
|
<div class="purchaseReturnEdit-cont">
|
|
|
<a-collapse :activeKey="['1']">
|
|
@@ -167,7 +168,7 @@
|
|
|
<template slot="qty" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="purchaseReturnEdit-qty"
|
|
|
+ :id="'bulkReturnGoodsEdit-qty-'+recod.id"
|
|
|
v-model="record.qty"
|
|
|
:precision="0"
|
|
|
:min="1"
|
|
@@ -179,7 +180,7 @@
|
|
|
<template slot="price" slot-scope="text, record">
|
|
|
<a-input-number
|
|
|
size="small"
|
|
|
- id="purchaseReturnEdit-cost"
|
|
|
+ :id="'bulkReturnGoodsEdit-cost-'+recod.id"
|
|
|
v-model="record.cost"
|
|
|
:precision="2"
|
|
|
:min="0"
|
|
@@ -194,7 +195,7 @@
|
|
|
</template>
|
|
|
<!-- 操作 -->
|
|
|
<template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="purchaseReturnEdit-del-btn">删除</a-button>
|
|
|
+ <a-button :id="'bulkReturnGoodsEdit-del-'+recod.id" size="small" type="link" class="button-error" @click="handleDel(record)">删除</a-button>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-collapse-panel>
|
|
@@ -239,11 +240,11 @@ export default {
|
|
|
spinning: false,
|
|
|
detailData: null,
|
|
|
queryParam: {
|
|
|
- purchaseBillNo: '',
|
|
|
- productCode: '',
|
|
|
- productName: ''
|
|
|
+ purchaseBillNo: '', // 采购单号
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '' // 产品名称
|
|
|
},
|
|
|
- dataSource: [],
|
|
|
+ dataSource: [], // 列表数据
|
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
|
advanced: false, // 高级搜索 展开/关闭
|
|
|
// 表头
|
|
@@ -285,10 +286,10 @@ export default {
|
|
|
{ title: '退货金额', scopedSlots: { customRender: 'amount' }, width: '6%', align: 'center' },
|
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
|
|
|
],
|
|
|
- chooseDisabled: false,
|
|
|
+ chooseDisabled: false, // 禁用按钮
|
|
|
chooseQueryParam: {
|
|
|
- productCode: '',
|
|
|
- productName: ''
|
|
|
+ productCode: '', // 产品编码
|
|
|
+ productName: '' // 产品名称
|
|
|
},
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
chooseLoadData: parameter => {
|
|
@@ -329,6 +330,7 @@ export default {
|
|
|
_this.spinning = false
|
|
|
})
|
|
|
},
|
|
|
+ // 重置列表
|
|
|
resetSearchForm () {
|
|
|
this.queryParam.productCode = ''
|
|
|
this.queryParam.productName = ''
|
|
@@ -399,8 +401,6 @@ export default {
|
|
|
handleClickRow (record) {
|
|
|
this.handleAdd(record)
|
|
|
},
|
|
|
- // 导入明细
|
|
|
- handleImport () {},
|
|
|
// 删除
|
|
|
handleDel (row, isAll) {
|
|
|
const _this = this
|
|
@@ -481,6 +481,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 供应商名称筛选
|
|
|
filterOption (input, option) {
|
|
|
return (
|
|
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
|
@@ -499,6 +500,7 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 初始化页面
|
|
|
pageInit () {
|
|
|
this.getWarehouse()
|
|
|
this.getDetail(true, true)
|