|
@@ -64,7 +64,7 @@
|
|
|
:rowKey="(record) => record.id"
|
|
|
:columns="columns"
|
|
|
:data="loadData"
|
|
|
- :scroll="{ x: 950, y: tableHeight }"
|
|
|
+ :scroll="{ x: 1030, y: tableHeight }"
|
|
|
bordered>
|
|
|
<!-- 采退单号 -->
|
|
|
<template slot="purchaseReturnNo" slot-scope="text, record">
|
|
@@ -80,6 +80,13 @@
|
|
|
v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnEdit')"
|
|
|
@click="handleEdit(record)"
|
|
|
id="purchaseReturnList-edit-btn">编辑</a-button>
|
|
|
+ <a-button
|
|
|
+ size="small"
|
|
|
+ type="link"
|
|
|
+ v-if="record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnOutStock')"
|
|
|
+ @click="handleWarehouse(record)"
|
|
|
+ class="button-primary"
|
|
|
+ id="bulkReturnGoodsList-warehouse-btn">生成出库单</a-button>
|
|
|
<a-button
|
|
|
size="small"
|
|
|
type="link"
|
|
@@ -87,7 +94,7 @@
|
|
|
v-if="(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && $hasPermissions('B_purchaseReturnDel')"
|
|
|
@click="handleDel(record)"
|
|
|
id="purchaseReturnList-del-btn">删除</a-button>
|
|
|
- <span v-if="!(record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT')">--</span>
|
|
|
+ <span v-if="!((record.state == 'WAIT_SUBMIT' || record.state == 'AUDIT_REJECT') && ($hasPermissions('B_purchaseReturnEdit') || $hasPermissions('B_purchaseReturnDel'))) && !(record.state == 'CHECKED' && $hasPermissions('B_purchaseReturnOutStock'))">--</span>
|
|
|
</template>
|
|
|
</s-table>
|
|
|
</a-spin>
|
|
@@ -98,7 +105,7 @@
|
|
|
import { STable, VSelect } from '@/components'
|
|
|
import rangeDate from '@/views/common/rangeDate.vue'
|
|
|
import { purchaseTargetList } from '@/api/purchase'
|
|
|
-import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel } from '@/api/purchaseReturn'
|
|
|
+import { purchaseReturnList, purchaseReturnSave, purchaseReturnDel, purchaseReturnOutStockBill } from '@/api/purchaseReturn'
|
|
|
export default {
|
|
|
components: { STable, VSelect, rangeDate },
|
|
|
data () {
|
|
@@ -123,7 +130,7 @@ export default {
|
|
|
{ title: '审核时间', dataIndex: 'auditTime', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '业务状态', dataIndex: 'stateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
{ title: '财务状态', dataIndex: 'settleStateDictValue', width: 80, align: 'center', customRender: function (text) { return text || '--' } },
|
|
|
- { title: '操作', scopedSlots: { customRender: 'action' }, width: 100, align: 'center', fixed: 'right' }
|
|
|
+ { title: '操作', scopedSlots: { customRender: 'action' }, width: 180, align: 'center', fixed: 'right' }
|
|
|
],
|
|
|
// 加载数据方法 必须为 Promise 对象
|
|
|
loadData: parameter => {
|
|
@@ -220,6 +227,27 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ // 入库
|
|
|
+ handleWarehouse (row) {
|
|
|
+ const _this = this
|
|
|
+ this.$confirm({
|
|
|
+ title: '提示',
|
|
|
+ content: '确定要生成出库单吗?',
|
|
|
+ centered: true,
|
|
|
+ onOk () {
|
|
|
+ _this.spinning = true
|
|
|
+ purchaseReturnOutStockBill({ sn: row.purchaseReturnSn }).then(res => {
|
|
|
+ if (res.status == 200) {
|
|
|
+ _this.$message.success(res.message)
|
|
|
+ _this.$refs.table.refresh()
|
|
|
+ _this.spinning = false
|
|
|
+ } else {
|
|
|
+ _this.spinning = false
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getParentDealer () {
|
|
|
purchaseTargetList({ purchaseTargetType: 'SUPPLIER_SYS' }).then(res => {
|
|
|
if (res.status == 200) {
|