|
@@ -74,8 +74,9 @@
|
|
bordered>
|
|
bordered>
|
|
<!-- 采退单号 -->
|
|
<!-- 采退单号 -->
|
|
<template slot="purchaseReturnApplyNo" slot-scope="text, record">
|
|
<template slot="purchaseReturnApplyNo" slot-scope="text, record">
|
|
- <span class="table-td-link" @click="handleDetail(record)">{{ record.purchaseReturnApplyNo }}</span>
|
|
|
|
- <!-- <span v-else>{{ record.purchaseReturnApplyNo }}</span> -->
|
|
|
|
|
|
+ <span class="table-td-link" v-if="$hasPermissions('B_purchaseReturnDetail')" @click="handleDetail(record)">{{ record.purchaseReturnNo }}</span>
|
|
|
|
+ <span v-else>{{ record.purchaseReturnNo }}</span>
|
|
|
|
+ <a-badge count="改" :offset="[10,0]" v-if="record.state=='HQ_CHANGE'"></a-badge>
|
|
</template>
|
|
</template>
|
|
<!-- 审核 -->
|
|
<!-- 审核 -->
|
|
<template slot="audit" slot-scope="text, record">
|
|
<template slot="audit" slot-scope="text, record">
|
|
@@ -105,14 +106,14 @@
|
|
v-else-if="(record.hasStockBill == '0' && (record.billStatus == 'CHECKED'||record.billStatus == 'FINISH'))"
|
|
v-else-if="(record.hasStockBill == '0' && (record.billStatus == 'CHECKED'||record.billStatus == 'FINISH'))"
|
|
@click="handleWarehouse(record)"
|
|
@click="handleWarehouse(record)"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
|
|
|
|
|
|
+ id="bulkReturnGoodsList-warehouse-btn">生成采购退货单</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
v-else-if="record.billStatus == 'CHECKED'"
|
|
v-else-if="record.billStatus == 'CHECKED'"
|
|
@click="handleFinishBill(record)"
|
|
@click="handleFinishBill(record)"
|
|
class="button-primary"
|
|
class="button-primary"
|
|
- id="bulkReturnGoodsList-warehouse-btn">完结单据</a-button>
|
|
|
|
|
|
+ id="bulkReturnGoodsList-warehouse-btn">再次编辑</a-button>
|
|
<a-button
|
|
<a-button
|
|
size="small"
|
|
size="small"
|
|
type="link"
|
|
type="link"
|
|
@@ -133,7 +134,7 @@ import { STable, VSelect } from '@/components'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
import getDate from '@/libs/getDate.js'
|
|
import getDate from '@/libs/getDate.js'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
import stateIcon from '@/views/common/stateIcon'
|
|
-import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill, purchaseReturnFinishBill } from '@/api/purchaseReturnApply'
|
|
|
|
|
|
+import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnAgainCreate } from '@/api/purchaseReturnApply'
|
|
export default {
|
|
export default {
|
|
name: 'PurchaseReturnList',
|
|
name: 'PurchaseReturnList',
|
|
components: { STable, VSelect, rangeDate, stateIcon },
|
|
components: { STable, VSelect, rangeDate, stateIcon },
|
|
@@ -238,7 +239,7 @@ export default {
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- purchaseReturnDel({ id: row.id }).then(res => {
|
|
|
|
|
|
+ purchaseReturnDel({ purchaseReturnApplySn: row.purchaseReturnApplySn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
@@ -281,37 +282,16 @@ export default {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 生成出库单
|
|
|
|
- handleWarehouse (row) {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确定要生成出库单吗?',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- _this.spinning = true
|
|
|
|
- purchaseReturnOutStockBill({ sn: row.purchaseReturnApplySn }).then(res => {
|
|
|
|
- if (res.status == 200) {
|
|
|
|
- _this.$message.success(res.message)
|
|
|
|
- _this.$refs.table.refresh()
|
|
|
|
- _this.spinning = false
|
|
|
|
- } else {
|
|
|
|
- _this.spinning = false
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
- // 完结单据
|
|
|
|
|
|
+ // 再次编辑
|
|
handleFinishBill (row) {
|
|
handleFinishBill (row) {
|
|
const _this = this
|
|
const _this = this
|
|
this.$confirm({
|
|
this.$confirm({
|
|
title: '提示',
|
|
title: '提示',
|
|
- content: '确定要完结该单据吗?',
|
|
|
|
|
|
+ content: '系统将自动生成一个新的采购退货申请单,与原单据内容相同。确认再次编辑吗?',
|
|
centered: true,
|
|
centered: true,
|
|
onOk () {
|
|
onOk () {
|
|
_this.spinning = true
|
|
_this.spinning = true
|
|
- purchaseReturnFinishBill({ sn: row.purchaseReturnApplySn }).then(res => {
|
|
|
|
|
|
+ purchaseReturnAgainCreate({ sn: row.purchaseReturnApplySn }).then(res => {
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
_this.$message.success(res.message)
|
|
_this.$message.success(res.message)
|
|
_this.$refs.table.refresh()
|
|
_this.$refs.table.refresh()
|
|
@@ -323,7 +303,10 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 生成采购单
|
|
|
|
+ handleWarehouse (row) {
|
|
|
|
|
|
|
|
+ },
|
|
pageInit () {
|
|
pageInit () {
|
|
const _this = this
|
|
const _this = this
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|
|
this.$nextTick(() => { // 页面渲染完成后的回调
|