|
@@ -79,11 +79,6 @@
|
|
|
:type="2"
|
|
|
title="是否要删除该条数据?"
|
|
|
@confirm="batchDelete(record.id)">删除</operation-button>
|
|
|
- <operation-button
|
|
|
- v-if=" record.status==1||record.status==2"
|
|
|
- :type="2"
|
|
|
- title="是否要废弃该条数据?"
|
|
|
- @confirm="batchWaste(record)">废弃</operation-button>
|
|
|
</span>
|
|
|
<template #status="text">
|
|
|
<badge :text="BaseTool.Object.getField(statusMap,text)" :status="DictCache.COLOR.LONG_YAN_PURCHASE_ORDER_STATUS[text]"/>
|
|
@@ -96,8 +91,8 @@
|
|
|
|
|
|
<script>
|
|
|
import { STable, Ellipsis } from '@/components'
|
|
|
-import { getPurchaseOrderPage2 } from '@/api/purchase/purchase-order'
|
|
|
-import MargeModal from './modules/MargeModal.vue'
|
|
|
+import { getMergePage, syncMerge, pushPurchaseOrder, getMergeInfo, deleteMerge } from '@/api/purchase/purchase-order'
|
|
|
+import MargeModal from '@/views/purchase/purchase-order-page/modules/MargeModal.vue'
|
|
|
|
|
|
export default {
|
|
|
name: 'PurchaseOrderPage',
|
|
@@ -128,46 +123,13 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
{
|
|
|
- title: '计划类型',
|
|
|
- dataIndex: 'type',
|
|
|
- checked: true,
|
|
|
- width: 100,
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return this.BaseTool.Table.getMapText(this.typeMap, text)
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '采购类型',
|
|
|
- dataIndex: 'cptcode',
|
|
|
- checked: true,
|
|
|
- width: 130,
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return this.BaseTool.Table.getMapText(this.cptcodeMap, text)
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '业务类型',
|
|
|
- dataIndex: 'cbustype',
|
|
|
- checked: true,
|
|
|
- width: 150,
|
|
|
- customRender: (text, record, index) => {
|
|
|
- return this.BaseTool.Table.getMapText(this.cbustypeMap, text)
|
|
|
- }
|
|
|
- },
|
|
|
- {
|
|
|
- title: '关联设备',
|
|
|
- dataIndex: 'positionNo',
|
|
|
- checked: true,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- title: '采购数量',
|
|
|
- dataIndex: 'totalNum',
|
|
|
+ title: '合并采购单名称',
|
|
|
+ dataIndex: 'title',
|
|
|
checked: true,
|
|
|
- width: 150
|
|
|
+ width: 100
|
|
|
},
|
|
|
{
|
|
|
- title: '请购人员',
|
|
|
+ title: '合并人员',
|
|
|
dataIndex: 'createdUserName',
|
|
|
checked: true,
|
|
|
width: 150
|
|
@@ -178,37 +140,13 @@ export default {
|
|
|
width: 100,
|
|
|
dataIndex: 'yongYouId'
|
|
|
},
|
|
|
+
|
|
|
{
|
|
|
- title: '需求日期',
|
|
|
- dataIndex: 'needDate',
|
|
|
- checked: true,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- title: '计划到货日期',
|
|
|
- dataIndex: 'planGetDate',
|
|
|
- checked: true,
|
|
|
- width: 150
|
|
|
- },
|
|
|
- {
|
|
|
- title: '申请时间',
|
|
|
- dataIndex: 'updateTime',
|
|
|
+ title: '合并时间',
|
|
|
+ dataIndex: 'createdTime',
|
|
|
checked: true,
|
|
|
width: 150
|
|
|
},
|
|
|
- {
|
|
|
- title: '请购原因',
|
|
|
- checked: true,
|
|
|
- width: 100,
|
|
|
- dataIndex: 'cmemo'
|
|
|
- },
|
|
|
- {
|
|
|
- title: '错误消息',
|
|
|
- checked: true,
|
|
|
- width: 100,
|
|
|
- dataIndex: 'errorMessage'
|
|
|
- },
|
|
|
-
|
|
|
{
|
|
|
title: '状态',
|
|
|
dataIndex: 'status',
|
|
@@ -240,7 +178,7 @@ export default {
|
|
|
sortName: 'update_time'
|
|
|
}
|
|
|
}
|
|
|
- return getPurchaseOrderPage2(Object.assign(parameter, this.queryParam))
|
|
|
+ return getMergePage(Object.assign(parameter, this.queryParam))
|
|
|
.then(res => {
|
|
|
return res.data
|
|
|
})
|
|
@@ -310,27 +248,21 @@ export default {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
batchDelete (id) {
|
|
|
- deletePurchaseOrder2({ id }).then(res => {
|
|
|
+ deleteMerge({ id }).then(res => {
|
|
|
this.$message.info(res.data)
|
|
|
this.handleOk()
|
|
|
})
|
|
|
},
|
|
|
- batchWaste (record) {
|
|
|
- wastePurchaseOrder(record).then(res => {
|
|
|
- this.$message.info('废弃成功')
|
|
|
- this.handleOk()
|
|
|
- })
|
|
|
- },
|
|
|
handleEnter () {
|
|
|
this.$refs.table.refresh(true)
|
|
|
},
|
|
|
handleEdit (record) {
|
|
|
- getPurchaseOrderInfo(record).then(res => {
|
|
|
+ getMergeInfo(record).then(res => {
|
|
|
this.$refs.baseForm.base(res.data)
|
|
|
})
|
|
|
},
|
|
|
handleView (record) {
|
|
|
- getPurchaseOrderInfo(record).then(res => {
|
|
|
+ getMergeInfo(record).then(res => {
|
|
|
this.$refs.detail.base(res.data)
|
|
|
})
|
|
|
},
|
|
@@ -342,7 +274,7 @@ export default {
|
|
|
})
|
|
|
},
|
|
|
handleViewPurchase (record) {
|
|
|
- getPurchaseOrderList({ yongYouId: record.yongYouId, oldOrNew: record.oldOrNew })
|
|
|
+ syncMerge({ yongYouId: record.yongYouId, oldOrNew: record.oldOrNew })
|
|
|
.then(res => {
|
|
|
this.$message.info('同步成功')
|
|
|
this.handleOk()
|