第三模块开发

This commit is contained in:
hh 2023-08-17 00:56:17 +08:00
parent bce709dd64
commit 8d93800f57
2 changed files with 84 additions and 1 deletions

View File

@ -9,6 +9,9 @@
<div style="font-size: 18px; font-weight: bold;"> <div style="font-size: 18px; font-weight: bold;">
采购订单号:HL-{{ item.requirementNumber }} &nbsp;&nbsp;部门:{{ item.sysOrgCode }} 采购订单号:HL-{{ item.requirementNumber }} &nbsp;&nbsp;部门:{{ item.sysOrgCode }}
&nbsp;&nbsp;采购方向:{{ item.procurementDirection }} &nbsp;&nbsp;采购方向:{{ item.procurementDirection }}
<a-button type="primary" style="float: right;margin-left: 10px;"
@click="finish(item)">开始采购</a-button>
<a-button style="float: right;margin-left: 10px;" @click="generateOrder(item)">生成订单</a-button> <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>
@ -152,7 +155,8 @@ export default {
getPurchaseSupplier: "Try/purchaseSupplier/list", getPurchaseSupplier: "Try/purchaseSupplier/list",
getdata: "/Try/purchaseOrderConfirmation/joinList", getdata: "/Try/purchaseOrderConfirmation/joinList",
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving", receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
editUrl: '/Try/purchaseOrderConfirmation/edit' editUrl: '/Try/purchaseOrderConfirmation/edit',
finshUrl: '/Try/purchaseOrderConfirmation/finish'
}, },
activeKey: [], activeKey: [],
username: Vue.ls.get(USER_INFO).username, username: Vue.ls.get(USER_INFO).username,
@ -183,12 +187,40 @@ export default {
editUrl: function () { editUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.editUrl}`; return `${window._CONFIG['domianURL']}/${this.url.editUrl}`;
}, },
finshUrl: function () {
return `${window._CONFIG['domianURL']}/${this.url.finshUrl}`;
},
}, },
created() { created() {
this.getSupplierData(); this.getSupplierData();
this.getTableData(); this.getTableData();
}, },
methods: { methods: {
finish(item) {
let newItem = Object.assign({}, item);
newItem.procurementContent = JSON.stringify(newItem.procurementContent);
if (newItem.supplierSelection != null && newItem.supplierSelection != '') {
newItem.supplierSelection = JSON.stringify(newItem.supplierSelection);
} else {
newItem.supplierSelection = '';
}
// procurementLog
newItem.procurementLog = {
'0': newItem.supplierSelection
}
newItem.procurementLog = JSON.stringify(newItem.procurementLog);
//newItemrequirementNumberassociationNumber
newItem.associationNumber = newItem.requirementNumber;
postAction(this.finshUrl, newItem).then(res => {
//200
if (res.code == 200) {
this.$message.success('完成订单成功');
this.getTableData();
} else {
this.$message.error(res.message);
}
})
},
getSupplierData() { getSupplierData() {
getAction(this.getPurchaseSupplier).then(res => { getAction(this.getPurchaseSupplier).then(res => {
//200 //200

View File

@ -0,0 +1,51 @@
<template>
<div>
<P>
{{ this.dataList[0].reqirementNumber }}
</P>
{{ this.dataList[0].procurementLog }}
</div>
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
data() {
return {
dataList: [],
url: {
list: "/Try/procurementProgress/list",
edit: "/Try/procurementProgress/edit",
},
}
},
created() {
this.getData()
},
computed: {
list: function () {
return `${window._CONFIG['domianURL']}/${this.url.list}`;
},
edit: function () {
return `${window._CONFIG['domianURL']}/${this.url.edit}`;
},
},
methods: {
getData() {
getAction(this.list, {}).then(res => {
let dataList = res.result.records
dataList.forEach(element => {
let Log = JSON.parse(element.procurementLog)
for (const key in Log) {
if (Log.hasOwnProperty(key)) {
Log[key] = JSON.parse(Log[key]);
}
}
element.procurementLog = Log
})
this.dataList = Object.assign({}, dataList)
})
},
}
}
</script>