|
@@ -13,7 +13,7 @@
|
|
|
</template>
|
|
|
<!-- 操作区,位于 title 行的行尾 -->
|
|
|
<template slot="extra">
|
|
|
- <print :params="{allocateReturnSn: allocateReturnSn || outBizSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
|
|
|
+ <print :params="{allocateReturnSn: allocateReturnSn}" :basicInfoData="basicInfoData" :disabled="localDataSource.length==0" @loading="spinning=true" @unloading="spinning=false"></print>
|
|
|
</template>
|
|
|
</a-page-header>
|
|
|
<a-card size="small" :bordered="false" v-if="basicInfoData" class="allocateBillEdit-cont" v-show="showDetail">
|
|
@@ -51,160 +51,160 @@
|
|
|
</a-card>
|
|
|
<!-- 选择产品 -->
|
|
|
<a-card size="small" title="选择产品" :bordered="false" class="allocateBillEdit-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="产品编码" prop="productCode">
|
|
|
+ <a-input id="allocateBillEdit-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="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
+ </a-form-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="storeTransferOutList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ </a-form>
|
|
|
+ </div>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="table"
|
|
|
+ size="small"
|
|
|
+ index="0"
|
|
|
+ tableId="table1"
|
|
|
+ :rowKey="(record) => record.stockSn"
|
|
|
+ :columns="columns"
|
|
|
+ :customRow="handleClickRow"
|
|
|
+ :data="loadData"
|
|
|
+ :scroll="{ y: 300 }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 退货单价 -->
|
|
|
+ <template slot="returnPrice" slot-scope="text, record">
|
|
|
+ <div @dblclick.stop>
|
|
|
+ <a-input-number
|
|
|
+ size="small"
|
|
|
+ v-model="record.productPrice"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :max="99999999"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 退货数量 -->
|
|
|
+ <template slot="returnQty" slot-scope="text, record">
|
|
|
+ <div @dblclick.stop>
|
|
|
+ <a-input-number
|
|
|
+ size="small"
|
|
|
+ v-model="record.qty"
|
|
|
+ :precision="0"
|
|
|
+ :min="1"
|
|
|
+ :max="99999999"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.lastStockCost"
|
|
|
+ class="button-primary"
|
|
|
+ @click="handleAdd(record)"
|
|
|
+ id="allocateBillEdit-add-btn">添加</a-button>
|
|
|
+ <span v-else>--</span>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
+ </a-card>
|
|
|
+ <!-- 已选产品 -->
|
|
|
+ <a-card size="small" title="已选产品" :bordered="false" class="allocateBillEdit-cont">
|
|
|
+ <!-- 总计 -->
|
|
|
+ <a-alert type="info" style="margin-bottom:10px">
|
|
|
+ <div slot="message">
|
|
|
+ 退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ;
|
|
|
+ <span>退货总金额:<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? toThousands(basicInfoData.totalPrice) : '--' }}</strong>;</span>
|
|
|
+ </div>
|
|
|
+ </a-alert>
|
|
|
+ <!-- 筛选条件 -->
|
|
|
+ <a-row :gutter="15">
|
|
|
+ <a-col :span="17">
|
|
|
<div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
|
|
|
+ <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
<a-row :gutter="15">
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="9" :sm="24">
|
|
|
<a-form-item label="产品编码" prop="productCode">
|
|
|
- <a-input id="allocateBillEdit-productCode" v-model.trim="queryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
+ <a-input id="editGrap-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
- <a-col :md="6" :sm="24">
|
|
|
+ <a-col :md="9" :sm="24">
|
|
|
<a-form-item label="产品名称" prop="productName">
|
|
|
- <a-input id="allocateBillEdit-productName" v-model.trim="queryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
+ <a-input id="editGrap-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
</a-form-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="storeTransferOutList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
+ <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
|
</div>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="table"
|
|
|
+ </a-col>
|
|
|
+ <a-col :span="7" style="text-align: right;">
|
|
|
+ <!-- <a-button size="small" id="editGrap-import-btn" @click="openGuideModal=true">导入产品</a-button> -->
|
|
|
+ <!-- <a-button size="small" type="danger" style="margin-left: 5px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button> -->
|
|
|
+ </a-col>
|
|
|
+ </a-row>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <s-table
|
|
|
+ class="sTable"
|
|
|
+ ref="chooseTable"
|
|
|
+ size="small"
|
|
|
+ index="1"
|
|
|
+ tableId="table2"
|
|
|
+ :rowKey="(record) => record.id"
|
|
|
+ :columns="chooseColumns"
|
|
|
+ :data="chooseLoadData"
|
|
|
+ :scroll="{ y: 300 }"
|
|
|
+ :defaultLoadData="false"
|
|
|
+ bordered>
|
|
|
+ <!-- 退货单价 -->
|
|
|
+ <template slot="returnPrice" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
size="small"
|
|
|
- index="0"
|
|
|
- tableId="table1"
|
|
|
- :rowKey="(record) => record.stockSn"
|
|
|
- :columns="columns"
|
|
|
- :customRow="handleClickRow"
|
|
|
- :data="loadData"
|
|
|
- :scroll="{ y: 300 }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- 退货单价 -->
|
|
|
- <template slot="returnPrice" slot-scope="text, record">
|
|
|
- <div @dblclick.stop>
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- v-model="record.productPrice"
|
|
|
- :precision="2"
|
|
|
- :min="0"
|
|
|
- :max="99999999"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <!-- 退货数量 -->
|
|
|
- <template slot="returnQty" slot-scope="text, record">
|
|
|
- <div @dblclick.stop>
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- v-model="record.qty"
|
|
|
- :precision="0"
|
|
|
- :min="1"
|
|
|
- :max="99999999"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button
|
|
|
- size="small"
|
|
|
- type="link"
|
|
|
- v-if="record.lastStockCost"
|
|
|
- class="button-primary"
|
|
|
- @click="handleAdd(record)"
|
|
|
- id="allocateBillEdit-add-btn">添加</a-button>
|
|
|
- <span v-else>--</span>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
- </a-card>
|
|
|
- <!-- 已选产品 -->
|
|
|
- <a-card size="small" title="已选产品" :bordered="false" class="allocateBillEdit-cont">
|
|
|
- <!-- 总计 -->
|
|
|
- <a-alert type="info" style="margin-bottom:10px">
|
|
|
- <div slot="message">
|
|
|
- 退货总数量:<strong>{{ (basicInfoData&&(basicInfoData.totalQty || basicInfoData.totalQty==0)) ? basicInfoData.totalQty : '--' }}</strong> ;
|
|
|
- <span>退货总金额:<strong>{{ (basicInfoData&&(basicInfoData.totalPrice || basicInfoData.totalPrice==0)) ? toThousands(basicInfoData.totalPrice) : '--' }}</strong>;</span>
|
|
|
- </div>
|
|
|
- </a-alert>
|
|
|
- <!-- 筛选条件 -->
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :span="17">
|
|
|
- <div class="table-page-search-wrapper">
|
|
|
- <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
|
|
|
- <a-row :gutter="15">
|
|
|
- <a-col :md="9" :sm="24">
|
|
|
- <a-form-item label="产品编码" prop="productCode">
|
|
|
- <a-input id="editGrap-productCode" v-model.trim="chooseQueryParam.productCode" placeholder="请输入产品编码" allowClear />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="9" :sm="24">
|
|
|
- <a-form-item label="产品名称" prop="productName">
|
|
|
- <a-input id="editGrap-productName" v-model.trim="chooseQueryParam.productName" placeholder="请输入产品名称" allowClear />
|
|
|
- </a-form-item>
|
|
|
- </a-col>
|
|
|
- <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
|
- <a-button type="primary" @click="$refs.chooseTable.refresh(true)" :disabled="chooseDisabled" id="storeTransferOutList-refresh">查询</a-button>
|
|
|
- <a-button style="margin-left: 8px" @click="chooseResetSearchForm" :disabled="chooseDisabled" id="storeTransferOutList-reset">重置</a-button>
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- </a-form>
|
|
|
- </div>
|
|
|
- </a-col>
|
|
|
- <a-col :span="7" style="text-align: right;">
|
|
|
- <!-- <a-button size="small" id="editGrap-import-btn" @click="openGuideModal=true">导入产品</a-button> -->
|
|
|
- <!-- <a-button size="small" type="danger" style="margin-left: 5px" @click.stop="handleDel('', 'all')" id="chainTransferOutEdit-del-all-btn">整单删除</a-button> -->
|
|
|
- </a-col>
|
|
|
- </a-row>
|
|
|
- <!-- 列表 -->
|
|
|
- <s-table
|
|
|
- class="sTable"
|
|
|
- ref="chooseTable"
|
|
|
+ v-model="record.price"
|
|
|
+ :precision="2"
|
|
|
+ :min="0"
|
|
|
+ :max="99999999"
|
|
|
+ @blur="e => priceChange(e.target.value, record)"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </template>
|
|
|
+ <!-- 退货数量 -->
|
|
|
+ <template slot="returnQty" slot-scope="text, record">
|
|
|
+ <a-input-number
|
|
|
size="small"
|
|
|
- index="1"
|
|
|
- tableId="table2"
|
|
|
- :rowKey="(record) => record.id"
|
|
|
- :columns="chooseColumns"
|
|
|
- :data="chooseLoadData"
|
|
|
- :scroll="{ y: 300 }"
|
|
|
- :defaultLoadData="false"
|
|
|
- bordered>
|
|
|
- <!-- 退货单价 -->
|
|
|
- <template slot="returnPrice" slot-scope="text, record">
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- v-model="record.price"
|
|
|
- :precision="2"
|
|
|
- :min="0"
|
|
|
- :max="99999999"
|
|
|
- @blur="e => priceChange(e.target.value, record)"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </template>
|
|
|
- <!-- 退货数量 -->
|
|
|
- <template slot="returnQty" slot-scope="text, record">
|
|
|
- <a-input-number
|
|
|
- size="small"
|
|
|
- v-model="record.returnQty"
|
|
|
- :precision="0"
|
|
|
- :min="1"
|
|
|
- :max="99999999"
|
|
|
- @blur="e => qtyBlur(e.target.value, record)"
|
|
|
- placeholder="请输入"
|
|
|
- style="width: 100%;" />
|
|
|
- </template>
|
|
|
- <!-- 操作 -->
|
|
|
- <template slot="action" slot-scope="text, record">
|
|
|
- <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
|
|
|
- </template>
|
|
|
- </s-table>
|
|
|
+ v-model="record.returnQty"
|
|
|
+ :precision="0"
|
|
|
+ :min="1"
|
|
|
+ :max="99999999"
|
|
|
+ @blur="e => qtyBlur(e.target.value, record)"
|
|
|
+ placeholder="请输入"
|
|
|
+ style="width: 100%;" />
|
|
|
+ </template>
|
|
|
+ <!-- 操作 -->
|
|
|
+ <template slot="action" slot-scope="text, record">
|
|
|
+ <a-button size="small" type="link" class="button-error" @click="handleDel(record)" id="allocateBillEdit-del-btn">删除</a-button>
|
|
|
+ </template>
|
|
|
+ </s-table>
|
|
|
</a-card>
|
|
|
<!-- </a-spin> -->
|
|
|
</div>
|
|
@@ -251,7 +251,6 @@ import { STable, VSelect } from '@/components'
|
|
|
// import ImportGuideModal from './importGuideModal.vue'
|
|
|
import print from './print.vue'
|
|
|
import warehouse from '@/views/common/chooseWarehouse.js'
|
|
|
-import { queryStockProductPage } from '@/api/stock'
|
|
|
import AllocateType from '@/views/common/allocateType.js'
|
|
|
import {
|
|
|
allocateReturnSave,
|
|
@@ -260,8 +259,8 @@ import {
|
|
|
allocReturnDetailInsert,
|
|
|
allocReturnDetailUpdate,
|
|
|
allocateReturnSubmit,
|
|
|
- allocReturnDetailDelete
|
|
|
- // allocateBillBatchInsert
|
|
|
+ allocReturnDetailDelete,
|
|
|
+ queryStockProductPage
|
|
|
} from '@/api/allocateReturn'
|
|
|
|
|
|
export default {
|
|
@@ -291,7 +290,8 @@ export default {
|
|
|
this.disabled = true
|
|
|
const dealerLevel = this.dealerLevel == 'OTHER' ? undefined : this.dealerLevel
|
|
|
const warehouseSn = this.basicInfoData.warehouseSn
|
|
|
- return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn })).then(res => {
|
|
|
+ const dealerSnInfo = this.dealerLevel != 'OTHER' ? this.basicInfoData.dealerEntity.dealerSn : undefined
|
|
|
+ return queryStockProductPage(Object.assign(parameter, this.queryParam, { dealerLevel: dealerLevel == 0 ? '' : dealerLevel, warehouseSn: warehouseSn, dealerSn: dealerSnInfo })).then(res => {
|
|
|
const data = res.data
|
|
|
const no = (data.pageNo - 1) * data.pageSize
|
|
|
for (var i = 0; i < data.list.length; i++) {
|