diff --git a/src/api/WorkshopProcurement/CreatingProcurementContracts.js b/src/api/WorkshopProcurement/CreatingProcurementContracts.js
index f4f82b9d..1b2e261b 100644
--- a/src/api/WorkshopProcurement/CreatingProcurementContracts.js
+++ b/src/api/WorkshopProcurement/CreatingProcurementContracts.js
@@ -108,7 +108,7 @@ export function searchSupplier(check1, value1, check2, value2, check3, value3, c
})
}
// 生成采购合同
-export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2, text, type, freight, num3, partsNum, priceGroup, taxGroup, currency, num4, id, singleQuota, readyQuota, AdvanceCharge) {
+export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2, text, type, freight, num3, partsNum, priceGroup, taxGroup, currency, num4, id, singleQuota, readyQuota, AdvanceCharge, group) {
return request({
url: '',
method: 'post',
@@ -117,7 +117,7 @@ export function doneContract(num1, RequisitionNumber, name1, time1, time2, num2,
ModularID: router.currentRoute.path,
type: '2',
name: '车间管理_基本件采购_请购单和请购单明细_增加数据',
- param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&模板类型=${type}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&税率组=${taxGroup}&币种流水号组=${currency}&单件定额工时组=${singleQuota}&准结定额工时组=${readyQuota}&预付款=${AdvanceCharge}`
+ param: `请购单流水号=${num1}&请购单编号=${RequisitionNumber}&采购合同名称=${name1}&预到货时间=${time1}&规定到货时间=${time2}&采购员=${id}&供应商流水号=${num2}&合同文本=${text}&模板类型=${type}&运费=${freight}&物料流水号组=${num3}&请购单明细流水号组=${num4}&数量组=${partsNum}&单价组=${priceGroup}&税率组=${taxGroup}&币种流水号组=${currency}&单件定额工时组=${singleQuota}&准结定额工时组=${readyQuota}&预付款=${AdvanceCharge}&未选请购单明细流水号组=${group}`
}
})
}
diff --git a/src/utils/request.js b/src/utils/request.js
index 0a04c177..211dc14c 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -1,6 +1,6 @@
import axios from 'axios'
-export const wsuri = `ws://123.56.95.229:61101//WebMoudule//websocket`
+export const wsuri = `ws://123.56.95.229:8010//WebMoudule//websocket`
export const name = `OP8888`
export const name1 = `OP1000`
export const name3 = `OP2000`
diff --git a/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue b/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue
index 6bd354dd..c37c583c 100644
--- a/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue
+++ b/src/views/WorkshopProcurement/CreatingProcurementContracts/index.vue
@@ -44,6 +44,7 @@
+
{{ scope.row.组件名称 }}
@@ -90,7 +91,8 @@
-
+
+
{{ scope.row.物料名称 }}
@@ -433,14 +435,16 @@ export default {
tableData5: [],
groupNum2: [],
groupNum5: [],
+ multipleSelection: [],
+ Selection: [],
group1: '',
group2: '',
group3: '',
- group5: '',
+ group5: [],
group6: '',
group7: '',
group8: '',
- group9: '',
+ group9: [],
group10: '',
group11: '',
group12: ''
@@ -495,6 +499,12 @@ export default {
this.tableData5[index][date] = value
this.update1(row)
},
+ handleSelectionChange(val) {
+ this.multipleSelection = val
+ for (let i = 0; i < this.multipleSelection.length; i++) {
+ this.Selection.push(Number(this.multipleSelection[i].请购单明细流水号))
+ }
+ },
submitGroup() {
submitGroup(this.contractNumValue, this.form3.groupNumValue).then(response => {
if (response.data[0].result === '1') {
@@ -759,21 +769,31 @@ export default {
this.group1 = ''
this.group2 = ''
this.group3 = ''
+ this.group5 = []
this.group7 = ''
this.group8 = ''
- this.group9 = ''
+ this.group9 = []
this.group10 = ''
this.group11 = ''
this.group12 = ''
for (let i = 0; i < this.tableData4.length; i++) {
- this.group1 += this.tableData4[i].物料流水号 + ','
- this.group2 += this.tableData4[i].零件数量 + ','
- this.group3 += this.tableData4[i].单价 + ','
- this.group7 += this.taxRate + ','
- this.group8 += this.currencyValue + ','
- this.group9 += this.tableData4[i].请购单明细流水号 + ','
- this.group11 += this.tableData4[i].单件定额工时 + ','
- this.group12 += this.tableData4[i].准结定额工时 + ','
+ for (let j = 0; j < this.multipleSelection.length; j++) {
+ if (this.tableData4[i].请购单明细流水号 === this.multipleSelection[j].请购单明细流水号) {
+ console.log(333333)
+ this.group1 += this.tableData4[i].物料流水号 + ','
+ this.group2 += this.tableData4[i].零件数量 + ','
+ this.group3 += this.tableData4[i].单价 + ','
+ this.group7 += this.taxRate + ','
+ this.group8 += this.currencyValue + ','
+ this.group9.push(Number(this.tableData4[i].请购单明细流水号))
+ this.group11 += this.tableData4[i].单件定额工时 + ','
+ this.group12 += this.tableData4[i].准结定额工时 + ','
+ } else {
+ if (this.group5.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1 && this.Selection.indexOf(Number(this.tableData4[i].请购单明细流水号)) === -1) {
+ this.group5.push(Number(this.tableData4[i].请购单明细流水号))
+ }
+ }
+ }
}
for (let i = 0; i < this.contractNum.length; i++) {
if (this.contractNum[i].value === this.contractNumValue) {
@@ -783,7 +803,7 @@ export default {
this.group1 = this.group1.substr(0, this.group1.length - 1)
this.group2 = this.group2.substr(0, this.group2.length - 1)
this.group3 = this.group3.substr(0, this.group3.length - 1)
- doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.contractValue, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge).then(response => {
+ doneContract(this.contractNumValue, this.RequisitionNumber, this.contractName, this.planArrivalTime, this.stipulateArrivalTime, this.supplierValue, this.textArea, this.contractValue, this.freight, this.group1, this.group2, this.group3, this.group7, this.group8, this.group9, this.id, this.group11, this.group12, this.AdvanceCharge, this.group5).then(response => {
if (response.data[0].result === '1') {
this.$message.success('生成合同成功')
this.reload()