|
@@ -1,27 +1,27 @@
|
|
|
<template>
|
|
|
- <div class="productInfoList-wrap">
|
|
|
+ <div class="salesReturnList-wrap">
|
|
|
<!-- 搜索条件 -->
|
|
|
<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" v-if="grabFlag == 1">
|
|
|
<a-form-item label="销售单号">
|
|
|
- <a-input id="productInfoList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
+ <a-input id="salesReturnList-salesBillNo" v-model.trim="queryParam.salesBillNo" allowClear placeholder="请输入销售单号"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品编码">
|
|
|
- <a-input id="productInfoList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
+ <a-input id="salesReturnList-productCode" v-model.trim="queryParam.productCode" allowClear placeholder="请输入产品编码"/>
|
|
|
</a-form-item>
|
|
|
</a-col>
|
|
|
<a-col :md="6" :sm="24">
|
|
|
<a-form-item label="产品名称">
|
|
|
- <a-input id="productInfoList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
+ <a-input id="salesReturnList-productName" v-model.trim="queryParam.productName" allowClear placeholder="请输入产品名称"/>
|
|
|
</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="productInfoList-refresh">查询</a-button>
|
|
|
- <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="productInfoList-reset">重置</a-button>
|
|
|
+ <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="salesReturnList-refresh">查询</a-button>
|
|
|
+ <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="salesReturnList-reset">重置</a-button>
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
</a-form>
|
|
@@ -35,8 +35,9 @@
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
:customRow="handleClickRow"
|
|
|
+ :rowClassName="(record, index) => (grabFlag == '1'&&record.refundableQty==0) ? 'redBg-row':''"
|
|
|
:defaultLoadData="false"
|
|
|
- :scroll="{ x: grabFlag == '1' ? 1700 : 860, y: 300 }"
|
|
|
+ :scroll="{ x: grabFlag == '1' ? 1380 : 1020, y: 300 }"
|
|
|
bordered>
|
|
|
<!-- 本次退货数量 -->
|
|
|
<template slot="qty" slot-scope="text, record">
|
|
@@ -66,6 +67,7 @@
|
|
|
type="primary"
|
|
|
class="button-info"
|
|
|
:loading="newLoading"
|
|
|
+ :disabled="grabFlag == '1'&&record.refundableQty==0"
|
|
|
@click="handleAdd(record)"
|
|
|
>添加</a-button>
|
|
|
</template>
|
|
@@ -126,110 +128,28 @@ export default {
|
|
|
mounted () {
|
|
|
// 抓单
|
|
|
if (this.grabFlag == 1) {
|
|
|
- this.columns = [{
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'no',
|
|
|
- align: 'center',
|
|
|
- width: 80
|
|
|
- },
|
|
|
- {
|
|
|
- title: '销售单号',
|
|
|
- dataIndex: 'salesBillNo',
|
|
|
- align: 'center',
|
|
|
- width: 220
|
|
|
- },
|
|
|
- {
|
|
|
- title: '产品编码',
|
|
|
- dataIndex: 'productEntity.code',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '产品名称',
|
|
|
- dataIndex: 'productEntity.name',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '售价',
|
|
|
- dataIndex: 'price',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return '¥' + (text || 0) },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: '剩余可退数量',
|
|
|
- dataIndex: 'refundableQty',
|
|
|
- align: 'center',
|
|
|
- width: 110
|
|
|
- },
|
|
|
- {
|
|
|
- title: '本次退货数量',
|
|
|
- dataIndex: 'qty',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'qty' },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: '采购价',
|
|
|
- dataIndex: 'showCost',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return '¥' + (text || 0) },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: '单位',
|
|
|
- dataIndex: 'productEntity.unit',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return text || '--' },
|
|
|
- width: 100
|
|
|
- },
|
|
|
- { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
|
|
|
+ this.columns = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
+ { title: '销售单号', dataIndex: 'salesBillNo', width: 220, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品编码', dataIndex: 'productEntity.code', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productEntity.name', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '剩余可退数量', dataIndex: 'refundableQty', width: 120, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
|
|
|
+ { title: '本次退货数量', dataIndex: 'qty', width: 120, align: 'center', scopedSlots: { customRender: 'qty' } },
|
|
|
+ { title: '采购价', dataIndex: 'showCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productEntity.unit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }]
|
|
|
} else {
|
|
|
- this.columns = [{
|
|
|
- title: '序号',
|
|
|
- dataIndex: 'no',
|
|
|
- align: 'center',
|
|
|
- width: 80
|
|
|
- },
|
|
|
- {
|
|
|
- title: '产品编码',
|
|
|
- dataIndex: 'productCode',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return text || '--' }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '产品名称',
|
|
|
- dataIndex: 'productName',
|
|
|
- align: 'center'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '当前售价',
|
|
|
- dataIndex: 'productPrice',
|
|
|
- align: 'center',
|
|
|
- width: 120,
|
|
|
- customRender: function (text) { return '¥' + (text || 0) }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '退货数量',
|
|
|
- dataIndex: 'qty',
|
|
|
- align: 'center',
|
|
|
- scopedSlots: { customRender: 'qty' },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: '采购价',
|
|
|
- dataIndex: 'lastStockCost',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return '¥' + (text || 0) },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- {
|
|
|
- title: '单位',
|
|
|
- dataIndex: 'productUnit',
|
|
|
- align: 'center',
|
|
|
- customRender: function (text) { return text || '--' },
|
|
|
- width: 120
|
|
|
- },
|
|
|
- { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }]
|
|
|
+ this.columns = [
|
|
|
+ { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
|
|
|
+ { title: '产品编码', dataIndex: 'productCode', align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
|
|
|
+ { title: '当前售价', dataIndex: 'productPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '退货数量', dataIndex: 'qty', width: 100, align: 'center', scopedSlots: { customRender: 'qty' } },
|
|
|
+ { title: '采购价', dataIndex: 'lastStockCost', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? ('¥' + text) : '--') } },
|
|
|
+ { title: '单位', dataIndex: 'productUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
+ { slots: { title: 'customTitle' }, scopedSlots: { customRender: 'action' }, width: 100, align: 'center' }
|
|
|
+ ]
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
@@ -262,3 +182,10 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+<style lang="less">
|
|
|
+ .salesReturnList-wrap{
|
|
|
+ .redBg-row{
|
|
|
+ background-color: #f5cdc8;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|