更新订单处理页面
This commit is contained in:
parent
7e562bfc15
commit
08410361e2
|
@ -0,0 +1,114 @@
|
||||||
|
<template>
|
||||||
|
<a-card title="订单处理" :bordered="false">
|
||||||
|
<a-collapse v-model:activeKey="activeKey" accordion>
|
||||||
|
<a-collapse-panel v-for="(item, index) in tableData" :key="index.toString()">
|
||||||
|
<template slot="header">
|
||||||
|
<div style="font-size: 18px; font-weight: bold;">
|
||||||
|
采购订单号:HL-{{ item.requirementNumber }} 部门:{{ item.sysOrgCode }}
|
||||||
|
采购方向:{{ item.procurementDirection }}
|
||||||
|
<a-button style="float: right;" @click="receiveNO(item)">取消接单</a-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<div>
|
||||||
|
<a-descriptions title="订单详情" bordered>
|
||||||
|
<a-descriptions-item label="申请人">{{ item.createBy_dictText }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="申请时间">{{ item.createTime }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="申请部门">{{ item.sysOrgCode }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="采购类型">{{ item.procurementCategory_dictText }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="采购预算" :span="3">{{ item.procurementBudget }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="审批人" :span="3">{{ item.approvedBy_dictText }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="采购详情">
|
||||||
|
<div v-for="(item2, index2) in item.procurementContent" :key="index2.toString()">
|
||||||
|
<a-row>
|
||||||
|
<a-col :span="2">{{ item2.name }}</a-col>
|
||||||
|
<a-col :span="2">{{ item2.number }}{{ item2.unit }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
</a-descriptions-item>
|
||||||
|
</a-descriptions>
|
||||||
|
</div>
|
||||||
|
</a-collapse-panel>
|
||||||
|
</a-collapse>
|
||||||
|
|
||||||
|
</a-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { getAction, postAction } from '@/api/manage'
|
||||||
|
import { USER_INFO } from "@/store/mutation-types"
|
||||||
|
import Vue from 'vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'PurchaseOrderConfirmationList',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
url: {
|
||||||
|
getPurchaseSupplier: "Try/purchaseSupplier/list",
|
||||||
|
getdata: "/Try/purchaseRequest/receivedList",
|
||||||
|
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
|
||||||
|
},
|
||||||
|
activeKey: [],
|
||||||
|
username: Vue.ls.get(USER_INFO).username,
|
||||||
|
sysOrgCode: Vue.ls.get(USER_INFO).orgCode,
|
||||||
|
supplierList: [],
|
||||||
|
tableData: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
getPurchaseSupplier: function () {
|
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.getPurchaseSupplier}`;
|
||||||
|
},
|
||||||
|
getdata: function () {
|
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.getdata}`;
|
||||||
|
},
|
||||||
|
receiveNOurl: function () {
|
||||||
|
return `${window._CONFIG['domianURL']}/${this.url.receiveNOurl}`;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getSupplierData();
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getSupplierData() {
|
||||||
|
getAction(this.getPurchaseSupplier).then(res => {
|
||||||
|
//如果为200,则获取数据
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.supplierList = res.result.records;
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getTableData() {
|
||||||
|
getAction(this.getdata,).then(res => {
|
||||||
|
//如果为200,则获取数据
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.tableData = res.result.records;
|
||||||
|
this.activeKey = [0];
|
||||||
|
this.tableData.forEach(item => {
|
||||||
|
item.procurementContent = JSON.parse(item.procurementContent);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
receiveNO(item) {
|
||||||
|
//深拷贝一份item
|
||||||
|
let newItem = Object.assign({}, item);
|
||||||
|
newItem.procurementContent = String(newItem.procurementContent);
|
||||||
|
postAction(this.receiveNOurl, newItem).then(res => {
|
||||||
|
//如果为200,则获取数据
|
||||||
|
if (res.code == 200) {
|
||||||
|
this.$message.success('取消成功');
|
||||||
|
this.getTableData();
|
||||||
|
} else {
|
||||||
|
this.$message.error(res.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
Loading…
Reference in New Issue