更新订单处理页面
This commit is contained in:
parent
13ff42ea68
commit
69035b3ff7
|
@ -1,7 +1,7 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card title="订单处理" :bordered="false">
|
<a-card title="订单处理" :bordered="false">
|
||||||
<template #extra>
|
<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>
|
</template>
|
||||||
<a-collapse v-model:activeKey="activeKey" accordion v-if="dataShow">
|
<a-collapse v-model:activeKey="activeKey" accordion v-if="dataShow">
|
||||||
<a-collapse-panel v-for="(item, index) in tableData" :key="index.toString()">
|
<a-collapse-panel v-for="(item, index) in tableData" :key="index.toString()">
|
||||||
|
@ -30,14 +30,17 @@
|
||||||
</a-button>
|
</a-button>
|
||||||
</template>
|
</template>
|
||||||
</a-descriptions-item>
|
</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()">
|
<div v-for="(item2, index2) in item.procurementContent" :key="index2.toString()">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="2">{{ item2.name }}</a-col>
|
<a-col :span="2">{{ item2.name }}</a-col>
|
||||||
<a-col :span="2">{{ item2.number }}{{ item2.unit }}</a-col>
|
<a-col :span="2">{{ item2.number }}{{ item2.unit }}</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</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-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
@ -50,6 +53,29 @@
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</a-empty>
|
</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>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -64,7 +90,7 @@ export default {
|
||||||
return {
|
return {
|
||||||
url: {
|
url: {
|
||||||
getPurchaseSupplier: "Try/purchaseSupplier/list",
|
getPurchaseSupplier: "Try/purchaseSupplier/list",
|
||||||
getdata: "/Try/purchaseRequest/receivedList",
|
getdata: "/Try/purchaseOrderConfirmation/joinList",
|
||||||
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
|
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
|
||||||
},
|
},
|
||||||
activeKey: [],
|
activeKey: [],
|
||||||
|
@ -73,6 +99,9 @@ export default {
|
||||||
supplierList: [],
|
supplierList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
dataShow: false,
|
dataShow: false,
|
||||||
|
arrange: false,
|
||||||
|
arrangeData: [],
|
||||||
|
classifyData: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -103,10 +132,10 @@ export default {
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
this.dataShow = false;
|
this.dataShow = false;
|
||||||
getAction(this.getdata,).then(res => {
|
getAction(this.getdata).then(res => {
|
||||||
//如果为200,则获取数据
|
//如果为200,则获取数据
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.tableData = res.result.records;
|
this.tableData = res.result;
|
||||||
//判断数据是否为空
|
//判断数据是否为空
|
||||||
if (this.tableData.length == 0) {
|
if (this.tableData.length == 0) {
|
||||||
this.dataShow = false;
|
this.dataShow = false;
|
||||||
|
@ -135,7 +164,12 @@ export default {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, downloadFile(text) {
|
},
|
||||||
|
Refresh() {
|
||||||
|
this.getSupplierData();
|
||||||
|
this.getTableData();
|
||||||
|
},
|
||||||
|
downloadFile(text) {
|
||||||
if (!text) {
|
if (!text) {
|
||||||
this.$message.warning("未知的文件")
|
this.$message.warning("未知的文件")
|
||||||
return;
|
return;
|
||||||
|
@ -159,14 +193,51 @@ export default {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}, generateOrder(item) {
|
},
|
||||||
console.log(item);
|
generateOrder(item) {
|
||||||
this.$message.success('生成订单中');
|
this.$message.success('生成订单成功');
|
||||||
}, arrange(item) {
|
},
|
||||||
console.log(item);
|
arrangeOpen(item) {
|
||||||
this.$message.success('正在整理');
|
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>
|
</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);
|
item.procurementContent = JSON.parse(item.procurementContent);
|
||||||
});
|
});
|
||||||
this.dataShow = true;
|
this.dataShow = true;
|
||||||
|
console.log(this.dataList);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
|
|
Loading…
Reference in New Issue