第二模块
This commit is contained in:
parent
a13dbfbaa9
commit
13ff42ea68
|
@ -1,11 +1,15 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card title="订单处理" :bordered="false">
|
<a-card title="订单处理" :bordered="false">
|
||||||
<a-collapse v-model:activeKey="activeKey" accordion>
|
<template #extra>
|
||||||
|
<a-button style="margin-left: 10px;" type="primary" @click="getTableData()">刷新</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()">
|
<a-collapse-panel v-for="(item, index) in tableData" :key="index.toString()">
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<div style="font-size: 18px; font-weight: bold;">
|
<div style="font-size: 18px; font-weight: bold;">
|
||||||
采购订单号:HL-{{ item.requirementNumber }} 部门:{{ item.sysOrgCode }}
|
采购订单号:HL-{{ item.requirementNumber }} 部门:{{ item.sysOrgCode }}
|
||||||
采购方向:{{ item.procurementDirection }}
|
采购方向:{{ item.procurementDirection }}
|
||||||
|
<a-button style="float: right;margin-left: 10px;" @click="generateOrder(item)">生成订单</a-button>
|
||||||
<a-button style="float: right;" @click="receiveNO(item)">取消接单</a-button>
|
<a-button style="float: right;" @click="receiveNO(item)">取消接单</a-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -16,7 +20,16 @@
|
||||||
<a-descriptions-item label="申请部门">{{ item.sysOrgCode }}</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="采购类型">{{ item.procurementCategory_dictText }}</a-descriptions-item>
|
||||||
<a-descriptions-item label="采购预算" :span="3">{{ item.procurementBudget }}</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="审批人">{{ item.approvedBy_dictText }}</a-descriptions-item>
|
||||||
|
<a-descriptions-item label="附件" :span="3">
|
||||||
|
<template>
|
||||||
|
<span v-if="!item.annex" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||||
|
<a-button v-else :ghost="true" type="primary" icon="download" size="small"
|
||||||
|
@click="downloadFile(item.annex)">
|
||||||
|
下载
|
||||||
|
</a-button>
|
||||||
|
</template>
|
||||||
|
</a-descriptions-item>
|
||||||
<a-descriptions-item label="采购详情">
|
<a-descriptions-item label="采购详情">
|
||||||
<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>
|
||||||
|
@ -24,12 +37,19 @@
|
||||||
<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-descriptions-item>
|
</a-descriptions-item>
|
||||||
</a-descriptions>
|
</a-descriptions>
|
||||||
</div>
|
</div>
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
|
<a-empty v-else>
|
||||||
|
<template #description>
|
||||||
|
<span>
|
||||||
|
订单为空
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</a-empty>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -52,6 +72,7 @@ export default {
|
||||||
sysOrgCode: Vue.ls.get(USER_INFO).orgCode,
|
sysOrgCode: Vue.ls.get(USER_INFO).orgCode,
|
||||||
supplierList: [],
|
supplierList: [],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
dataShow: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -81,14 +102,21 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getTableData() {
|
getTableData() {
|
||||||
|
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.records;
|
||||||
|
//判断数据是否为空
|
||||||
|
if (this.tableData.length == 0) {
|
||||||
|
this.dataShow = false;
|
||||||
|
} else {
|
||||||
this.activeKey = [0];
|
this.activeKey = [0];
|
||||||
this.tableData.forEach(item => {
|
this.tableData.forEach(item => {
|
||||||
item.procurementContent = JSON.parse(item.procurementContent);
|
item.procurementContent = JSON.parse(item.procurementContent);
|
||||||
});
|
});
|
||||||
|
this.dataShow = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
|
@ -97,7 +125,7 @@ export default {
|
||||||
receiveNO(item) {
|
receiveNO(item) {
|
||||||
//深拷贝一份item
|
//深拷贝一份item
|
||||||
let newItem = Object.assign({}, item);
|
let newItem = Object.assign({}, item);
|
||||||
newItem.procurementContent = String(newItem.procurementContent);
|
newItem.procurementContent = JSON.stringify(newItem.procurementContent);
|
||||||
postAction(this.receiveNOurl, newItem).then(res => {
|
postAction(this.receiveNOurl, newItem).then(res => {
|
||||||
//如果为200,则获取数据
|
//如果为200,则获取数据
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
|
@ -107,7 +135,37 @@ export default {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
}, downloadFile(text) {
|
||||||
|
if (!text) {
|
||||||
|
this.$message.warning("未知的文件")
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (text.indexOf(",") > 0) {
|
||||||
|
text = text.substring(0, text.indexOf(","))
|
||||||
|
}
|
||||||
|
let url = this.getFileAccessHttpUrl(text)
|
||||||
|
window.open(url);
|
||||||
},
|
},
|
||||||
|
getFileAccessHttpUrl(avatar, subStr) {
|
||||||
|
if (!subStr) subStr = 'http'
|
||||||
|
try {
|
||||||
|
if (avatar && avatar.startsWith(subStr)) {
|
||||||
|
return avatar;
|
||||||
|
} else {
|
||||||
|
if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
|
||||||
|
return window._CONFIG['staticDomainURL'] + "/" + avatar;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}, generateOrder(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.$message.success('生成订单中');
|
||||||
|
}, arrange(item) {
|
||||||
|
console.log(item);
|
||||||
|
this.$message.success('正在整理');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
<template>
|
<template>
|
||||||
<a-card title="订单接收" :bordered="false">
|
<a-card title="订单接收" :bordered="false">
|
||||||
<a-collapse v-model:activeKey="activeKey" accordion>
|
<template #extra>
|
||||||
|
<a-button type="primary" @click="getdata()">刷新</a-button>
|
||||||
|
</template>
|
||||||
|
<a-collapse v-model:activeKey="activeKey" accordion v-if="dataShow">
|
||||||
<a-collapse-panel v-for="(item, index) in dataList" :key="index.toString()">
|
<a-collapse-panel v-for="(item, index) in dataList" :key="index.toString()">
|
||||||
<template slot="header">
|
<template slot="header">
|
||||||
<div style="font-size: 18px; font-weight: bold;">
|
<div style="font-size: 18px; font-weight: bold;">
|
||||||
|
@ -30,6 +33,14 @@
|
||||||
</a-collapse-panel>
|
</a-collapse-panel>
|
||||||
</a-collapse>
|
</a-collapse>
|
||||||
|
|
||||||
|
<a-empty v-else>
|
||||||
|
<template #description>
|
||||||
|
<span>
|
||||||
|
订单为空
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</a-empty>
|
||||||
|
|
||||||
<a-modal title="填写接收备注" :visible="receive" @ok="receiveOk" @cancel="receiveCancel">
|
<a-modal title="填写接收备注" :visible="receive" @ok="receiveOk" @cancel="receiveCancel">
|
||||||
<a-textarea v-model="auditResults" placeholder="请输入接收备注" />
|
<a-textarea v-model="auditResults" placeholder="请输入接收备注" />
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
@ -58,6 +69,7 @@ export default {
|
||||||
auditResults: '',
|
auditResults: '',
|
||||||
username: Vue.ls.get(USER_INFO).username,
|
username: Vue.ls.get(USER_INFO).username,
|
||||||
sysOrgCode: Vue.ls.get(USER_INFO).orgCode,
|
sysOrgCode: Vue.ls.get(USER_INFO).orgCode,
|
||||||
|
dataShow: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -98,15 +110,21 @@ export default {
|
||||||
this.receive = false;
|
this.receive = false;
|
||||||
},
|
},
|
||||||
getdata() {
|
getdata() {
|
||||||
|
this.dataShow = false;
|
||||||
getAction(this.list, {}).then(res => {
|
getAction(this.list, {}).then(res => {
|
||||||
//如果为200,则获取数据
|
//如果为200,则获取数据
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
this.dataList = res.result.records;
|
this.dataList = res.result.records;
|
||||||
|
if (this.dataList.length == 0) {
|
||||||
|
this.dataShow = false;
|
||||||
|
} else {
|
||||||
this.activeKey = [0];
|
this.activeKey = [0];
|
||||||
//将其procurementContent转为json
|
//将其procurementContent转为json
|
||||||
this.dataList.forEach(item => {
|
this.dataList.forEach(item => {
|
||||||
item.procurementContent = JSON.parse(item.procurementContent);
|
item.procurementContent = JSON.parse(item.procurementContent);
|
||||||
});
|
});
|
||||||
|
this.dataShow = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(res.message);
|
this.$message.error(res.message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue