更新订单处理页面
This commit is contained in:
parent
13ff42ea68
commit
69035b3ff7
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<a-card title="订单处理" :bordered="false">
|
||||
<template #extra>
|
||||
<a-button style="margin-left: 10px;" type="primary" @click="getTableData()">刷新</a-button>
|
||||
<a-button style="margin-left: 10px;" type="primary" @click="Refresh()">刷新</a-button>
|
||||
</template>
|
||||
<a-collapse v-model:activeKey="activeKey" accordion v-if="dataShow">
|
||||
<a-collapse-panel v-for="(item, index) in tableData" :key="index.toString()">
|
||||
|
@ -30,14 +30,17 @@
|
|||
</a-button>
|
||||
</template>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="采购详情">
|
||||
<a-descriptions-item label="采购详情" v-if="item.supplierSelection == null">
|
||||
<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-button style="float: right;" type="primary" @click="arrange(item)">物品和供应商整理</a-button>
|
||||
<a-button style="float: right;" type="primary" @click="arrangeOpen(item)">物品和供应商整理</a-button>
|
||||
</a-descriptions-item>
|
||||
<a-descriptions-item label="采购详情" v-else>
|
||||
123
|
||||
</a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
|
@ -50,6 +53,29 @@
|
|||
</span>
|
||||
</template>
|
||||
</a-empty>
|
||||
|
||||
<a-modal title="采购整理" :visible="arrange" @ok="arrangeOk" @cancel="arrangeCancel">
|
||||
<!-- {{ arrangeData }}
|
||||
{{ supplierList }} -->
|
||||
<div v-if="classifyData.length == 0">
|
||||
暂未数据分类
|
||||
</div>
|
||||
<div v-else>
|
||||
<div class="card-container">
|
||||
<a-card style="margin-top: 20px;margin-right: 20px;" v-for="(item, index) in classifyData" :key="index.toString()">
|
||||
<template #title>
|
||||
{{ item.supplier }}
|
||||
</template>
|
||||
<div v-for="(item2, index2) in item.goods" :key="index2.toString()">
|
||||
{{ item2.name }}
|
||||
</div>
|
||||
</a-card>
|
||||
</div>
|
||||
</div>
|
||||
<a-button type="primary" style="margin-top: 20px;" @click="addSupplier">添加供应商</a-button>
|
||||
</a-modal>
|
||||
|
||||
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
|
@ -64,7 +90,7 @@ export default {
|
|||
return {
|
||||
url: {
|
||||
getPurchaseSupplier: "Try/purchaseSupplier/list",
|
||||
getdata: "/Try/purchaseRequest/receivedList",
|
||||
getdata: "/Try/purchaseOrderConfirmation/joinList",
|
||||
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
|
||||
},
|
||||
activeKey: [],
|
||||
|
@ -73,6 +99,9 @@ export default {
|
|||
supplierList: [],
|
||||
tableData: [],
|
||||
dataShow: false,
|
||||
arrange: false,
|
||||
arrangeData: [],
|
||||
classifyData: [],
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -103,10 +132,10 @@ export default {
|
|||
},
|
||||
getTableData() {
|
||||
this.dataShow = false;
|
||||
getAction(this.getdata,).then(res => {
|
||||
getAction(this.getdata).then(res => {
|
||||
//如果为200,则获取数据
|
||||
if (res.code == 200) {
|
||||
this.tableData = res.result.records;
|
||||
this.tableData = res.result;
|
||||
//判断数据是否为空
|
||||
if (this.tableData.length == 0) {
|
||||
this.dataShow = false;
|
||||
|
@ -135,7 +164,12 @@ export default {
|
|||
this.$message.error(res.message);
|
||||
}
|
||||
})
|
||||
}, downloadFile(text) {
|
||||
},
|
||||
Refresh() {
|
||||
this.getSupplierData();
|
||||
this.getTableData();
|
||||
},
|
||||
downloadFile(text) {
|
||||
if (!text) {
|
||||
this.$message.warning("未知的文件")
|
||||
return;
|
||||
|
@ -159,14 +193,51 @@ export default {
|
|||
} catch (err) {
|
||||
return;
|
||||
}
|
||||
}, generateOrder(item) {
|
||||
console.log(item);
|
||||
this.$message.success('生成订单中');
|
||||
}, arrange(item) {
|
||||
console.log(item);
|
||||
this.$message.success('正在整理');
|
||||
},
|
||||
generateOrder(item) {
|
||||
this.$message.success('生成订单成功');
|
||||
},
|
||||
arrangeOpen(item) {
|
||||
this.classifyData = [];
|
||||
this.arrangeData = Object.assign({}, item);
|
||||
this.arrange = true;
|
||||
},
|
||||
arrangeOk() {
|
||||
this.$message.success('整理成功');
|
||||
this.arrange = false;
|
||||
},
|
||||
arrangeCancel() {
|
||||
this.$message.success('整理取消');
|
||||
this.arrange = false;
|
||||
},
|
||||
addSupplier() {
|
||||
//在classifyData添加一个空对象公司
|
||||
this.classifyData.push({
|
||||
supplier: "哈哈公司",
|
||||
goods: [{
|
||||
name: "哈哈",
|
||||
number: "1",
|
||||
unit: "个",
|
||||
}, {
|
||||
name: "哈哈",
|
||||
number: "1",
|
||||
unit: "个",
|
||||
}
|
||||
],
|
||||
});
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
/* 其他样式 */
|
||||
</style>
|
||||
|
||||
|
||||
|
|
|
@ -124,6 +124,7 @@ export default {
|
|||
item.procurementContent = JSON.parse(item.procurementContent);
|
||||
});
|
||||
this.dataShow = true;
|
||||
console.log(this.dataList);
|
||||
}
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
|
|
Loading…
Reference in New Issue