第三模块开发
This commit is contained in:
parent
bce709dd64
commit
8d93800f57
|
@ -9,6 +9,9 @@
|
|||
<div style="font-size: 18px; font-weight: bold;">
|
||||
采购订单号:HL-{{ item.requirementNumber }} 部门:{{ item.sysOrgCode }}
|
||||
采购方向:{{ 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;" @click="receiveNO(item)">取消接单</a-button>
|
||||
</div>
|
||||
|
@ -152,7 +155,8 @@ export default {
|
|||
getPurchaseSupplier: "Try/purchaseSupplier/list",
|
||||
getdata: "/Try/purchaseOrderConfirmation/joinList",
|
||||
receiveNOurl: "/Try/purchaseOrderConfirmation/cancelReceiving",
|
||||
editUrl: '/Try/purchaseOrderConfirmation/edit'
|
||||
editUrl: '/Try/purchaseOrderConfirmation/edit',
|
||||
finshUrl: '/Try/purchaseOrderConfirmation/finish'
|
||||
},
|
||||
activeKey: [],
|
||||
username: Vue.ls.get(USER_INFO).username,
|
||||
|
@ -183,12 +187,40 @@ export default {
|
|||
editUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.editUrl}`;
|
||||
},
|
||||
finshUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.finshUrl}`;
|
||||
},
|
||||
},
|
||||
created() {
|
||||
this.getSupplierData();
|
||||
this.getTableData();
|
||||
},
|
||||
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);
|
||||
//将newItem将requirementNumber修改associationNumber
|
||||
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() {
|
||||
getAction(this.getPurchaseSupplier).then(res => {
|
||||
//如果为200,则获取数据
|
||||
|
|
|
@ -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>
|
Loading…
Reference in New Issue