diff --git a/jnpf-java-boot/jnpf-web/src/views/yys/yysmaterialprocurementplan/form.vue b/jnpf-java-boot/jnpf-web/src/views/yys/yysmaterialprocurementplan/form.vue index 7e5af1e..5c852b5 100644 --- a/jnpf-java-boot/jnpf-web/src/views/yys/yysmaterialprocurementplan/form.vue +++ b/jnpf-java-boot/jnpf-web/src/views/yys/yysmaterialprocurementplan/form.vue @@ -2,7 +2,10 @@
- +
- - 保 存 - - 提交 + + 保 存 + + 提交 取 消
- - + + @@ -124,12 +221,18 @@ *物料类型 @@ -138,12 +241,18 @@ *规格型号 @@ -152,26 +261,43 @@ *欠缺量 - + @@ -180,12 +306,18 @@ *计量单位 @@ -196,49 +328,91 @@ - -
+
添加
- + - + - + - + @@ -246,36 +420,68 @@ - +
- 生成采购单: + 生成采购单: - 物料编码:{{ procurementOrderItem.materialCode }} - 物料名称:{{ procurementOrderItem.materialName }} - 物料类型:{{ procurementOrderItem.materialType }} - 欠缺量:{{ procurementOrderItem.lackNumber }} - 计量单位:{{ procurementOrderItem.unit }} + 物料编码:{{ procurementOrderItem.materialCode }} + 物料名称:{{ procurementOrderItem.materialName }} + 物料类型:{{ procurementOrderItem.materialType }} + 欠缺量:{{ procurementOrderItem.lackNumber }} + 计量单位:{{ procurementOrderItem.unit }} - + @@ -284,41 +490,80 @@ * 下单数量 - + -
+
添加
- - 取消 - 提交 + + 取消 + 提交 - +
@@ -493,7 +738,7 @@ export default { this.initDefaultData(); this.dataValueAll = JSON.parse(JSON.stringify(this.dataForm)); }, - mounted() { }, + mounted() {}, methods: { fnProcurementOrderCreate(row) { this.procurementOrderItem = { ...this.procurementOrderItemO }; @@ -518,14 +763,25 @@ export default { .then(() => { this.procurementOrderList.splice(index, 1); }) - .catch(() => { }); + .catch(() => {}); }, fnProcurementOrderCancel() { this.procurementOrderList = []; this.isOrdering = false; }, fnProcurementOrderSub() { - console.log(this.procurementOrderList); + let _data = { + orderData: this.procurementOrderList + }; + request({ + url: "/api/example/YysMaterialProcurementOrder/initOrder", + method: "post", + data: _data + }) + .then(res => { + console.log(res); + }) + .catch(err => {}); ///api/example/YysMaterialProcurementOrder/initOrder }, prev() { @@ -604,7 +860,7 @@ export default { } } }, - dataAll() { }, + dataAll() {}, yysmaterialprocurementitemExist() { let isOk = true; for ( @@ -658,7 +914,7 @@ export default { this.$store.commit("generator/UPDATE_RELATION_DATA", {}); }, //初始化默认数据 - initDefaultData() { }, + initDefaultData() {}, // 表单提交 dataFormSubmit(type) { this.dataFormSubmitType = type ? type : 0; @@ -676,7 +932,9 @@ export default { if (!this.yysmaterialprocurementitemExist()) return; let _data = this.dataList(); request({ - url: "/api/example/YysMaterialProcurementPlan/commit/" + this.dataForm.id, + url: + "/api/example/YysMaterialProcurementPlan/commit/" + + this.dataForm.id, method: "PUT", data: _data }) @@ -783,7 +1041,7 @@ export default { .then(() => { this.dataForm.yysMaterialProcurementItemList.splice(index, 1); }) - .catch(() => { }); + .catch(() => {}); }, getyysMaterialProcurementItemList(value) { let item = { ...this.tableRows.yysMaterialProcurementItemList, ...value };