|
@@ -7,7 +7,7 @@
|
|
<a-row :gutter="15">
|
|
<a-row :gutter="15">
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
<a-form-item label="创建时间">
|
|
<a-form-item label="创建时间">
|
|
- <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
|
|
+ <rangeDate id="purchaseReturnList-time" ref="rangeDate" :value="time" @change="dateChange" />
|
|
</a-form-item>
|
|
</a-form-item>
|
|
</a-col>
|
|
</a-col>
|
|
<a-col :md="6" :sm="24">
|
|
<a-col :md="6" :sm="24">
|
|
@@ -44,7 +44,7 @@
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-col :md="6" :sm="24" style="margin-bottom: 10px;">
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
|
|
<a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseReturnList-refresh">查询</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
|
|
<a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="purchaseReturnList-reset">重置</a-button>
|
|
- <a @click="advanced=!advanced" style="margin-left: 8px">
|
|
+ <a @click="advanced=!advanced" style="margin-left: 8px" id="purchaseReturnList-advanced">
|
|
{{ advanced ? '收起' : '展开' }}
|
|
{{ advanced ? '收起' : '展开' }}
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
<a-icon :type="advanced ? 'up' : 'down'"/>
|
|
</a>
|
|
</a>
|
|
@@ -70,20 +70,20 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 采退单号 -->
|
|
<!-- 采退单号 -->
|
|
<template slot="purchaseReturnNo" slot-scope="text, record">
|
|
<template slot="purchaseReturnNo" slot-scope="text, record">
|
|
- <span class="table-td-link" v-if="$hasPermissions('B_purchaseReturnDetail')" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</span>
|
|
+ <span class="table-td-link" :id="'purchaseReturnList-detail-'+record.id" v-if="$hasPermissions('B_purchaseReturnDetail')" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</span>
|
|
<span v-else>{{ record.purchaseReturnNo }}</span>
|
|
<span v-else>{{ record.purchaseReturnNo }}</span>
|
|
<a-badge count="改" :number-style="{ zoom:'80%',marginLeft:'5px' }" v-if="record.state=='HQ_CHANGE'"></a-badge>
|
|
<a-badge count="改" :number-style="{ zoom:'80%',marginLeft:'5px' }" v-if="record.state=='HQ_CHANGE'"></a-badge>
|
|
</template>
|
|
</template>
|
|
- <!-- 审核 -->
|
|
+ <!-- 审核icon -->
|
|
<template slot="audit" slot-scope="text, record">
|
|
<template slot="audit" slot-scope="text, record">
|
|
<stateIcon :title="record.stateDictValue" v-if="record.state!='AUDIT_REJECT'" :state="record.state == 'WAIT_BACK'||record.state=='CHECKED'||record.state == 'FINISH'?'1':'2'"></stateIcon>
|
|
<stateIcon :title="record.stateDictValue" v-if="record.state!='AUDIT_REJECT'" :state="record.state == 'WAIT_BACK'||record.state=='CHECKED'||record.state == 'FINISH'?'1':'2'"></stateIcon>
|
|
<stateIcon :title="record.stateDictValue" v-else :state="0"></stateIcon>
|
|
<stateIcon :title="record.stateDictValue" v-else :state="0"></stateIcon>
|
|
</template>
|
|
</template>
|
|
- <!-- 出库 -->
|
|
+ <!-- 出库icon -->
|
|
<template slot="waitOut" slot-scope="text, record">
|
|
<template slot="waitOut" slot-scope="text, record">
|
|
<stateIcon :state="record.hasStockBill == '1'?'1':'2'"></stateIcon>
|
|
<stateIcon :state="record.hasStockBill == '1'?'1':'2'"></stateIcon>
|
|
</template>
|
|
</template>
|
|
- <!-- 收款 -->
|
|
+ <!-- 收款icon -->
|
|
<template slot="financial" slot-scope="text, record">
|
|
<template slot="financial" slot-scope="text, record">
|
|
<stateIcon :title="record.settleStateDictValue" :state="record.settleState == 'FINISH'&&record.state!='CANCEL'?'1':'2'"></stateIcon>
|
|
<stateIcon :title="record.settleStateDictValue" :state="record.settleState == 'FINISH'&&record.state!='CANCEL'?'1':'2'"></stateIcon>
|
|
</template>
|
|
</template>
|
|
@@ -95,28 +95,28 @@
|
|
class="button-primary"
|
|
class="button-primary"
|
|
v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnEdit')"
|
|
v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnEdit')"
|
|
@click="handleEdit(record)"
|
|
@click="handleEdit(record)"
|
|
- id="purchaseReturnList-edit-btn">编辑</a-button>
|
|
+ :id="'purchaseReturnList-edit-'+record.id">编辑</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
v-else-if="(record.hasStockBill == '0' && (record.state == 'CHECKED'||record.state == 'FINISH')) && $hasPermissions('B_purchaseReturnOutStock')"
|
|
v-else-if="(record.hasStockBill == '0' && (record.state == 'CHECKED'||record.state == 'FINISH')) && $hasPermissions('B_purchaseReturnOutStock')"
|
|
@click="handleWarehouse(record)"
|
|
@click="handleWarehouse(record)"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
|
|
+ :id="'purchaseReturnList-out-'+record.id">生成出库单</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
v-else-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
|
|
v-else-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnFinishBill')"
|
|
@click="handleFinishBill(record)"
|
|
@click="handleFinishBill(record)"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
|
|
+ :id="'purchaseReturnList-finish-'+record.id">完结单据</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
class="button-error"
|
|
class="button-error"
|
|
v-else-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
|
|
v-else-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
|
|
@click="handleDel(record)"
|
|
@click="handleDel(record)"
|
|
- id="purchaseReturnList-del-btn">删除</a-button>
|
|
+ :id="'purchaseReturnList-del-'+record.id">删除</a-button>
|
|
<span v-else>--</span>
|
|
<span v-else>--</span>
|
|
</template>
|
|
</template>
|
|
</s-table>
|
|
</s-table>
|
|
@@ -126,11 +126,11 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import { commonMixin } from '@/utils/mixin'
|
|
import { commonMixin } from '@/utils/mixin'
|
|
|
|
+import getDate from '@/libs/getDate.js'
|
|
import { STable, VSelect } from '@/components'
|
|
import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
-import { purchaseTargetList } from '@/api/purchase'
|
|
|
|
-import getDate from '@/libs/getDate.js'
|
|
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
|
|
+import { purchaseTargetList } from '@/api/purchase'
|
|
import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturn'
|
|
import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturn'
|
|
export default {
|
|
export default {
|
|
name: 'PurchaseReturnList',
|
|
name: 'PurchaseReturnList',
|
|
@@ -140,19 +140,19 @@ export default {
|
|
return {
|
|
return {
|
|
spinning: false,
|
|
spinning: false,
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
advanced: true, // 高级搜索 展开/关闭
|
|
- time: [
|
|
+ time: [ // 时间默认值
|
|
getDate.getCurrMonthDays().starttime,
|
|
getDate.getCurrMonthDays().starttime,
|
|
getDate.getCurrMonthDays().endtime
|
|
getDate.getCurrMonthDays().endtime
|
|
],
|
|
],
|
|
queryParam: { // 查询条件
|
|
queryParam: { // 查询条件
|
|
- beginDate: getDate.getCurrMonthDays().starttime,
|
|
+ beginDate: getDate.getCurrMonthDays().starttime, // 开始时间
|
|
- endDate: getDate.getCurrMonthDays().endtime,
|
|
+ endDate: getDate.getCurrMonthDays().endtime, // 结束时间
|
|
purchaseReturnNo: '', // 退货单号
|
|
purchaseReturnNo: '', // 退货单号
|
|
state: undefined, // 业务状态
|
|
state: undefined, // 业务状态
|
|
- settleState: undefined
|
|
+ settleState: undefined // 结算状态
|
|
},
|
|
},
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
disabled: false, // 查询、重置按钮是否可操作
|
|
- tableHeight: 0,
|
|
+ tableHeight: 0, // 表格高度
|
|
// 加载数据方法 必须为 Promise 对象
|
|
// 加载数据方法 必须为 Promise 对象
|
|
loadData: parameter => {
|
|
loadData: parameter => {
|
|
this.disabled = true
|
|
this.disabled = true
|
|
@@ -171,7 +171,7 @@ export default {
|
|
return data
|
|
return data
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- purchaseTragetType: []
|
|
+ purchaseTragetType: [] // 供应商
|
|
}
|
|
}
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -192,6 +192,7 @@ export default {
|
|
// { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
// { title: '财务状态', dataIndex: 'settleStateDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
|
|
{ title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' }
|
|
]
|
|
]
|
|
|
|
+ // 成本价权限
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
if (this.$hasPermissions('M_ShowAllCost')) {
|
|
arr.splice(4, 0, { title: '退款金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
arr.splice(4, 0, { title: '退款金额', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
|
|
}
|
|
}
|
|
@@ -326,6 +327,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 获取上级供应商列表
|
|
getParentDealer () {
|
|
getParentDealer () {
|
|
purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
@@ -335,6 +337,7 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 页面初始化
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
@@ -348,7 +351,6 @@ export default {
|
|
const b = this.$store.state.app.updateList
|
|
const b = this.$store.state.app.updateList
|
|
// 是否从首页点击进入
|
|
// 是否从首页点击进入
|
|
const isHomeNav = this.getIsHomeNav()[this.$route.name]
|
|
const isHomeNav = this.getIsHomeNav()[this.$route.name]
|
|
- console.log(a, b, this.getIsHomeNav(), isHomeNav, this.$route.name)
|
|
|
|
|
|
|
|
// 从首页进入,判断式新建还式待办查询
|
|
// 从首页进入,判断式新建还式待办查询
|
|
if (isHomeNav) {
|
|
if (isHomeNav) {
|
|
@@ -375,6 +377,7 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 表格高度计算
|
|
setTableH () {
|
|
setTableH () {
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
const tableSearchH = this.$refs.tableSearch.offsetHeight
|
|
this.tableHeight = window.innerHeight - tableSearchH - 235
|
|
this.tableHeight = window.innerHeight - tableSearchH - 235
|