|
@@ -1767,75 +1767,81 @@
|
|
|
// 确定关联金蝶财务系统物料
|
|
|
doConfirm() {
|
|
|
if(JSON.stringify(this.tableRadio) === "{}" || this.tableRadio === null || this.tableRadio === {}) { return this.$message.warning('请选择物料'); }
|
|
|
- // 表单赋值赋值
|
|
|
- var val2 = (this as any).$refs.form.getValue();
|
|
|
- val2.name = this.tableRadio.fname;
|
|
|
- val2.shortName = this.tableRadio.fname;
|
|
|
- // 物料属性赋值
|
|
|
- // 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.$confirm('原商品名称会被覆盖,是否继续', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ // 表单赋值赋值
|
|
|
+ var val2 = (this as any).$refs.form.getValue();
|
|
|
+ val2.name = this.tableRadio.fname;
|
|
|
+ val2.shortName = this.tableRadio.fname;
|
|
|
+ // 物料属性赋值
|
|
|
+ // 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);
|
|
|
}
|
|
|
- (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;
|
|
|
+ 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.$message.success('关联物料 '+this.tableRadio.fname+' 成功');
|
|
|
+ (this as any).$refs.table.setValue(val);
|
|
|
}
|
|
|
- (this as any).$refs.table.setValue(val);
|
|
|
- }
|
|
|
- (this as any).$refs.form.setValue(val2);
|
|
|
- this.vxeValue = false;
|
|
|
+ (this as any).$refs.form.setValue(val2);
|
|
|
+ this.vxeValue = false;
|
|
|
+ }).catch(() => {});
|
|
|
}
|
|
|
// 切换组合商品
|
|
|
openMakeup() {
|