|
@@ -170,7 +170,6 @@ export default {
|
|
|
this.fetchBrandList()
|
|
|
this.fetchDeviceList()
|
|
|
this.initFormList()
|
|
|
- this.init()
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
@@ -182,14 +181,18 @@ export default {
|
|
|
async init(formData) {
|
|
|
console.log('formData',formData)
|
|
|
const obj = {}
|
|
|
- const productImageList = {
|
|
|
- name:'',
|
|
|
- url:formData.productImage
|
|
|
- }
|
|
|
- const invoiceImageList = {
|
|
|
- name:'',
|
|
|
- url:formData.invoiceImage
|
|
|
- }
|
|
|
+ const productImageList = [
|
|
|
+ {
|
|
|
+ name:'',
|
|
|
+ url:formData?.productImage
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ const invoiceImageList = [
|
|
|
+ {
|
|
|
+ name:'',
|
|
|
+ url:formData.invoiceImage
|
|
|
+ }
|
|
|
+ ]
|
|
|
obj.uuid = ++this.uuid
|
|
|
obj.productImageList = productImageList
|
|
|
obj.invoiceImageList = invoiceImageList
|
|
@@ -197,11 +200,12 @@ export default {
|
|
|
obj.productName = formData.productName
|
|
|
obj.snCode = formData.snCode
|
|
|
obj.brandId = formData.brandId
|
|
|
+ obj.productId = formData.productId
|
|
|
obj.productTypeId = formData.productTypeId
|
|
|
obj.purchaseWay = formData.purchaseWay
|
|
|
obj.invoiceImage = formData.invoiceImage
|
|
|
obj.paramList = formData.paramList
|
|
|
- this.formList.push(obj)
|
|
|
+ this.formList.splice(0,1,obj)
|
|
|
console.log('formList',this.formList)
|
|
|
},
|
|
|
formatFormList() {
|
|
@@ -212,6 +216,8 @@ export default {
|
|
|
obj.productName = formItem.productName
|
|
|
obj.snCode = formItem.snCode
|
|
|
obj.brandId = formItem.brandId
|
|
|
+ obj.productId = formItem.productId
|
|
|
+ obj.source = 2
|
|
|
obj.productTypeId = formItem.productTypeId
|
|
|
obj.purchaseWay = formItem.purchaseWay
|
|
|
obj.invoiceImage = formItem.invoiceImage
|