|
@@ -1273,7 +1273,7 @@
|
|
|
// v.isDeleted = 0
|
|
|
v.ismakeup = this.ismakeup
|
|
|
};
|
|
|
- data = { maindataMaterialReceiveParam: query, maindataMaterialSkus: this.tableList }
|
|
|
+ data = { maindataMaterialReceiveParam: query, maindataMaterialSkus: (this.$refs.table as any).getValue() }
|
|
|
let newArray : any = []
|
|
|
let materialSpecData : any = []
|
|
|
let attributeLength = this.attributeList.length
|
|
@@ -1766,33 +1766,68 @@
|
|
|
val2.name = this.tableRadio.fname;
|
|
|
val2.shortName = this.tableRadio.fname;
|
|
|
// 物料属性赋值
|
|
|
- var val = (this as any).$refs.singeTable.getValue();
|
|
|
- if(JSON.stringify(val[0]) === "{}" || val[0] === null){
|
|
|
- val = [{
|
|
|
- skuTitle: this.tableRadio.fname,
|
|
|
- skuSubtitle: this.tableRadio.fname,
|
|
|
- // skuCode: '',
|
|
|
- financialCode: this.tableRadio.fnumber,
|
|
|
- // price: '0',
|
|
|
- unit: this.tableRadio.fbaseUnitName,
|
|
|
- unitCode: this.tableRadio.fbaseUnitCode,
|
|
|
- // shelfLife: '0',
|
|
|
- // weight: '0',
|
|
|
- // length: '0',
|
|
|
- // width: '0',
|
|
|
- // height: '0',
|
|
|
- // volume: '0',
|
|
|
- }];
|
|
|
- this.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
- }else{
|
|
|
- this.$message.success('物料 '+val[0].skuTitle+' 信息变更为 '+this.tableRadio.fname);
|
|
|
- val[0].skuTitle = this.tableRadio.fname;
|
|
|
- val[0].skuSubtitle = this.tableRadio.fname;
|
|
|
- val[0].financialCode = this.tableRadio.fnumber;
|
|
|
- val[0].unit = this.tableRadio.fbaseUnitName;
|
|
|
- val[0].unitCode = this.tableRadio.fbaseUnitCode;
|
|
|
+ console.log(this.materialSpec)
|
|
|
+ if(this.materialSpec==0){
|
|
|
+ var val = (this.$refs.singeTable as any).getValue();
|
|
|
+ if(JSON.stringify(val[0]) === "{}" || val[0] === null){
|
|
|
+ val = [{
|
|
|
+ skuTitle: this.tableRadio.fname,
|
|
|
+ skuSubtitle: this.tableRadio.fname,
|
|
|
+ // skuCode: '',
|
|
|
+ financialCode: this.tableRadio.fnumber,
|
|
|
+ // price: '0',
|
|
|
+ unit: this.tableRadio.fbaseUnitName,
|
|
|
+ unitCode: this.tableRadio.fbaseUnitCode,
|
|
|
+ // shelfLife: '0',
|
|
|
+ // weight: '0',
|
|
|
+ // length: '0',
|
|
|
+ // width: '0',
|
|
|
+ // height: '0',
|
|
|
+ // volume: '0',
|
|
|
+ }];
|
|
|
+ this.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
+ }else{
|
|
|
+ this.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
+ val[0].skuTitle = this.tableRadio.fname;
|
|
|
+ val[0].skuSubtitle = this.tableRadio.fname;
|
|
|
+ val[0].financialCode = this.tableRadio.fnumber;
|
|
|
+ val[0].unit = this.tableRadio.fbaseUnitName;
|
|
|
+ val[0].unitCode = this.tableRadio.fbaseUnitCode;
|
|
|
+ }
|
|
|
+ (this as any).$refs.singeTable.setValue(val);
|
|
|
+ }
|
|
|
+ if(this.materialSpec==1){
|
|
|
+ var val = (this.$refs.table as any).getValue();
|
|
|
+ console.log(val)
|
|
|
+ if(!val || JSON.stringify(val[0]) === "{}" || val[0] === null || val.length==0){
|
|
|
+ val = [{
|
|
|
+ skuTitle: this.tableRadio.fname,
|
|
|
+ skuSubtitle: this.tableRadio.fname,
|
|
|
+ // skuCode: '',
|
|
|
+ financialCode: this.tableRadio.fnumber,
|
|
|
+ // price: '0',
|
|
|
+ unit: this.tableRadio.fbaseUnitName,
|
|
|
+ unitCode: this.tableRadio.fbaseUnitCode,
|
|
|
+ // shelfLife: '0',
|
|
|
+ // weight: '0',
|
|
|
+ // length: '0',
|
|
|
+ // width: '0',
|
|
|
+ // height: '0',
|
|
|
+ // volume: '0',
|
|
|
+ }];
|
|
|
+ this.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
+ }else{
|
|
|
+ for (var i = 0; i < val.length; i++) {
|
|
|
+ val[i].skuTitle = this.tableRadio.fname;
|
|
|
+ val[i].skuSubtitle = this.tableRadio.fname;
|
|
|
+ val[i].financialCode = this.tableRadio.fnumber;
|
|
|
+ val[i].unit = this.tableRadio.fbaseUnitName;
|
|
|
+ val[i].unitCode = this.tableRadio.fbaseUnitCode;
|
|
|
+ }
|
|
|
+ this.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
+ }
|
|
|
+ (this as any).$refs.table.setValue(val);
|
|
|
}
|
|
|
- (this as any).$refs.singeTable.setValue(val);
|
|
|
(this as any).$refs.form.setValue(val2);
|
|
|
this.vxeValue = false;
|
|
|
}
|