|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
|
|
<template-page ref="pageRef" :get-list="getList" :exportList="exportList" :table-attributes="tableAttributes"
|
|
:table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
|
|
:table-events="tableEvents" :options-evens-group="optionsEvensGroup" :moreParameters="moreParameters"
|
|
- :column-parsing="columnParsing" :operation="operation" :replaceOrNotMap="false">
|
|
|
|
|
|
+ :column-parsing="columnParsing" :operation="operation()" :replaceOrNotMap="false">
|
|
<div class="cartographer">
|
|
<div class="cartographer">
|
|
<el-dialog :title="({ M: '辅材退货单', P: '配件退货单' })[storageType]" width="100%" :modal="false" :visible.sync="formDialog"
|
|
<el-dialog :title="({ M: '辅材退货单', P: '配件退货单' })[storageType]" width="100%" :modal="false" :visible.sync="formDialog"
|
|
:before-close="formCancel">
|
|
:before-close="formCancel">
|
|
@@ -29,6 +29,7 @@
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import TemplatePage from '@/components/template/template-page-1.vue'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import import_mixin from '@/components/template/import_mixin.js'
|
|
import form_tpl from "../mixins/form_tpl.js"
|
|
import form_tpl from "../mixins/form_tpl.js"
|
|
|
|
+import operation_mixin from '@/components/template/operation_mixin.js'
|
|
import { websitPurchaseRetList, websitPurchaseRetListExport, websitPurchaseRetAdd, websitPurchaseRetEdit, websitPurchaseRetConfirm, websitPurchaseRetDetail } from "@/api/purchasingManagement.js"
|
|
import { websitPurchaseRetList, websitPurchaseRetListExport, websitPurchaseRetAdd, websitPurchaseRetEdit, websitPurchaseRetConfirm, websitPurchaseRetDetail } from "@/api/purchasingManagement.js"
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
@@ -38,7 +39,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
components: { TemplatePage },
|
|
components: { TemplatePage },
|
|
- mixins: [import_mixin, form_tpl],
|
|
|
|
|
|
+ mixins: [import_mixin, form_tpl, operation_mixin],
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
formData: {
|
|
formData: {
|
|
@@ -80,22 +81,33 @@ export default {
|
|
},
|
|
},
|
|
// 列表导出函数
|
|
// 列表导出函数
|
|
exportList: websitPurchaseRetListExport,
|
|
exportList: websitPurchaseRetListExport,
|
|
- // 操作按钮
|
|
|
|
- operation(h, { row, index, column }) {
|
|
|
|
- return (
|
|
|
|
- <div class='operation-btns'>
|
|
|
|
- {row.flag == "SAVE" ? <el-button type="text" onClick={() => {
|
|
|
|
|
|
+
|
|
|
|
+ operation() {
|
|
|
|
+ return this.operationBtn({
|
|
|
|
+ edit: {
|
|
|
|
+ conditions: ({ row, index, column }) => {
|
|
|
|
+ return row.flag == "SAVE"
|
|
|
|
+ },
|
|
|
|
+ click: ({ row, index, column }) => {
|
|
this.getDetail(row.purchaseRetId, 1)
|
|
this.getDetail(row.purchaseRetId, 1)
|
|
- }}>编辑</el-button> : null}
|
|
|
|
- {row.flag == "SAVE" ? <el-button type="text" onClick={() => {
|
|
|
|
- this.getDetail(row.purchaseRetId, 3)
|
|
|
|
- }}>审核</el-button> : null}
|
|
|
|
- <el-button type="text" onClick={() => {
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ detail: {
|
|
|
|
+ click: ({ row, index, column }) => {
|
|
this.getDetail(row.purchaseRetId, 2)
|
|
this.getDetail(row.purchaseRetId, 2)
|
|
- }}>详情</el-button>
|
|
|
|
- </div>
|
|
|
|
- )
|
|
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ examine: {
|
|
|
|
+ conditions: ({ row, index, column }) => {
|
|
|
|
+ return row.flag == "SAVE"
|
|
|
|
+ },
|
|
|
|
+ click: ({ row, index, column }) => {
|
|
|
|
+ this.getDetail(row.purchaseRetId, 3)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ })
|
|
},
|
|
},
|
|
|
|
+
|
|
getDetail(purchaseRetId, type) {
|
|
getDetail(purchaseRetId, type) {
|
|
websitPurchaseRetDetail({ purchaseRetId }).then(res => {
|
|
websitPurchaseRetDetail({ purchaseRetId }).then(res => {
|
|
Object.assign(this.formData, res.data, {
|
|
Object.assign(this.formData, res.data, {
|