|
@@ -49,9 +49,9 @@
|
49
|
49
|
<el-select v-model="form.project_detail" filterable placeholder="请选择" @change="changeProject">
|
50
|
50
|
<el-option
|
51
|
51
|
v-for="item in projectList"
|
52
|
|
- :key="item.id"
|
|
52
|
+ :key="item.new_id"
|
53
|
53
|
:label="item.project_name"
|
54
|
|
- :value="item.id">
|
|
54
|
+ :value="item.new_id">
|
55
|
55
|
</el-option>
|
56
|
56
|
</el-select>
|
57
|
57
|
</el-form-item>
|
|
@@ -257,7 +257,8 @@
|
257
|
257
|
project_name: projectList[i].project_name,
|
258
|
258
|
unit: projectList[i].unit,
|
259
|
259
|
price: projectList[i].price,
|
260
|
|
- type: 2
|
|
260
|
+ type: 2,
|
|
261
|
+ new_id: Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1))
|
261
|
262
|
}
|
262
|
263
|
this.projectList.push(obj)
|
263
|
264
|
|
|
@@ -271,7 +272,9 @@
|
271
|
272
|
project_name: goodInfos[i].good_name,
|
272
|
273
|
unit: goodInfos[i].good_unit,
|
273
|
274
|
price: goodInfos[i].retail_price,
|
274
|
|
- type: 3
|
|
275
|
+ type: 3,
|
|
276
|
+ new_id: Math.floor((Math.random() + Math.floor(Math.random() * 9 + 1)) * Math.pow(10, 10 - 1))
|
|
277
|
+
|
275
|
278
|
}
|
276
|
279
|
this.projectList.push(obj)
|
277
|
280
|
}
|
|
@@ -309,7 +312,7 @@
|
309
|
312
|
addProjectList() {
|
310
|
313
|
console.log(this.projectList)
|
311
|
314
|
for (let i = 0; i < this.projectList.length; i++) {
|
312
|
|
- if (this.form.project_detail == this.projectList[i].id) {
|
|
315
|
+ if (this.form.project_detail == this.projectList[i].new_id) {
|
313
|
316
|
this.projectList[i].number = this.form.number
|
314
|
317
|
this.projectList[i].number = this.projectList[i].number.toString()
|
315
|
318
|
this.tableData.push(this.projectList[i])
|