|
|
|
@ -1,6 +1,6 @@ |
|
|
|
<script> |
|
|
|
import {getAllBuList} from "../../../api/factory/site"; |
|
|
|
import {cancelPurchaseOrder, queryPurchaseOrder} from "../../../api/partspare/purchaseOrder"; |
|
|
|
import {cancelPurchaseOrder, closePurchaseOrder, queryPurchaseOrder} from "../../../api/partspare/purchaseOrder"; |
|
|
|
|
|
|
|
export default { |
|
|
|
name: "purchaseOrder", |
|
|
|
@ -112,6 +112,24 @@ export default { |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101107, |
|
|
|
serialNumber: '200101107Table1QuantityOfArrival', |
|
|
|
tableId: '200101107Table1', |
|
|
|
tableName: '备品备件采购表', |
|
|
|
columnProp: 'quantityOfArrival', |
|
|
|
headerAlign: 'center', |
|
|
|
align: 'right', |
|
|
|
columnLabel: '到货数量', |
|
|
|
columnHidden: false, |
|
|
|
columnImage: false, |
|
|
|
columnSortable: false, |
|
|
|
sortLv: 0, |
|
|
|
status: true, |
|
|
|
fixed: '', |
|
|
|
columnWidth: 80 |
|
|
|
}, |
|
|
|
{ |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: 200101107, |
|
|
|
@ -240,7 +258,22 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleClose(row){ |
|
|
|
|
|
|
|
this.$confirm('确定关闭该采购订单吗?',{ |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(()=>{ |
|
|
|
closePurchaseOrder(row).then(({data})=>{ |
|
|
|
if (data && data.code === 0) { |
|
|
|
this.$message.success(data.msg) |
|
|
|
this.handleQuery() |
|
|
|
}else { |
|
|
|
this.$message.warning(data.msg) |
|
|
|
} |
|
|
|
}).catch((error)=>{ |
|
|
|
this.$message.error(error) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
watch:{ |
|
|
|
@ -346,8 +379,8 @@ export default { |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<a v-if="scope.row.status === '进行中'" @click="handleCancel(scope.row)">取消</a> |
|
|
|
<!-- <a @click="handleClose(scope.row)">关闭</a>--> |
|
|
|
<a v-if="scope.row.status === '进行中' && scope.row.quantityOfArrival === 0" @click="handleCancel(scope.row)">取消</a> |
|
|
|
<a v-if="scope.row.status === '进行中'" @click="handleClose(scope.row)">关闭</a> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
|