|
@@ -2038,7 +2038,7 @@ export default {
|
|
|
this.upload.open = false;
|
|
this.upload.open = false;
|
|
|
this.upload.isUploading = false;
|
|
this.upload.isUploading = false;
|
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
|
- this.$alert(response.msg, "导入结果", {dangerouslyUseHTMLString: true});
|
|
|
|
|
|
|
+ this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
|
|
|
this.getList();
|
|
this.getList();
|
|
|
},
|
|
},
|
|
|
handleImport() {
|
|
handleImport() {
|
|
@@ -2061,7 +2061,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
//生成SKU
|
|
//生成SKU
|
|
|
generate() {
|
|
generate() {
|
|
|
- genFormatAttr(this.form.productId, {attrs: this.attrs}).then(res => {
|
|
|
|
|
|
|
+ genFormatAttr(this.form.productId, { attrs: this.attrs }).then(res => {
|
|
|
if (this.form.specType === 0) {
|
|
if (this.form.specType === 0) {
|
|
|
this.oneFormValidate = res.value;
|
|
this.oneFormValidate = res.value;
|
|
|
this.form.header = res.header;
|
|
this.form.header = res.header;
|
|
@@ -2123,7 +2123,7 @@ export default {
|
|
|
};
|
|
};
|
|
|
this.attrs.push(data);
|
|
this.attrs.push(data);
|
|
|
var hash = {};
|
|
var hash = {};
|
|
|
- this.attrs = this.attrs.reduce(function (item, next) {
|
|
|
|
|
|
|
+ this.attrs = this.attrs.reduce(function(item, next) {
|
|
|
hash[next.value] ? '' : hash[next.value] = true && item.push(next);
|
|
hash[next.value] ? '' : hash[next.value] = true && item.push(next);
|
|
|
return item
|
|
return item
|
|
|
}, [])
|
|
}, [])
|
|
@@ -2139,7 +2139,7 @@ export default {
|
|
|
if (num) {
|
|
if (num) {
|
|
|
this.attrs[idx].detail.push(num);
|
|
this.attrs[idx].detail.push(num);
|
|
|
var hash = {};
|
|
var hash = {};
|
|
|
- this.attrs[idx].detail = this.attrs[idx].detail.reduce(function (item, next) {
|
|
|
|
|
|
|
+ this.attrs[idx].detail = this.attrs[idx].detail.reduce(function(item, next) {
|
|
|
hash[next] ? '' : hash[next] = true && item.push(next);
|
|
hash[next] ? '' : hash[next] = true && item.push(next);
|
|
|
return item
|
|
return item
|
|
|
}, [])
|
|
}, [])
|
|
@@ -2156,7 +2156,7 @@ export default {
|
|
|
type: 'error'
|
|
type: 'error'
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- that.ruleList.forEach(function (item, index) {
|
|
|
|
|
|
|
+ that.ruleList.forEach(function(item, index) {
|
|
|
if (item.ruleName === that.form.selectRule) {
|
|
if (item.ruleName === that.form.selectRule) {
|
|
|
that.attrs = JSON.parse(item.ruleValue);
|
|
that.attrs = JSON.parse(item.ruleValue);
|
|
|
|
|
|
|
@@ -2426,21 +2426,21 @@ export default {
|
|
|
this.qualificationArr = this.form.qualificationCertificate.split(",");
|
|
this.qualificationArr = this.form.qualificationCertificate.split(",");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(this.form.isBusinessPermanent == 1){
|
|
|
|
|
|
|
+ if (this.form.isBusinessPermanent == 1) {
|
|
|
this.businessValue = true
|
|
this.businessValue = true
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.businessValue = false
|
|
this.businessValue = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(this.form.isLicensePermanent == 1){
|
|
|
|
|
|
|
+ if (this.form.isLicensePermanent == 1) {
|
|
|
this.licenseValue = true
|
|
this.licenseValue = true
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.licenseValue = false
|
|
this.licenseValue = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(this.form.isCertificatePermanent == 1){
|
|
|
|
|
|
|
+ if (this.form.isCertificatePermanent == 1) {
|
|
|
this.certificateValue = true
|
|
this.certificateValue = true
|
|
|
- }else {
|
|
|
|
|
|
|
+ } else {
|
|
|
this.certificateValue = false
|
|
this.certificateValue = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -2449,7 +2449,11 @@ export default {
|
|
|
{ expireKey: 'licenseExpire', startKey: 'licenseStart', endKey: 'licenseEnd' },
|
|
{ expireKey: 'licenseExpire', startKey: 'licenseStart', endKey: 'licenseEnd' },
|
|
|
{ expireKey: 'certificateExpire', startKey: 'certificateStart', endKey: 'certificateEnd' },
|
|
{ expireKey: 'certificateExpire', startKey: 'certificateStart', endKey: 'certificateEnd' },
|
|
|
{ expireKey: 'voucherExpire', startKey: 'voucherStart', endKey: 'voucherEnd' },
|
|
{ expireKey: 'voucherExpire', startKey: 'voucherStart', endKey: 'voucherEnd' },
|
|
|
- { expireKey: 'qualificationExpire', startKey: 'qualificationCertificateStart', endKey: 'qualificationCertificateEnd' }
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ expireKey: 'qualificationExpire',
|
|
|
|
|
+ startKey: 'qualificationCertificateStart',
|
|
|
|
|
+ endKey: 'qualificationCertificateEnd'
|
|
|
|
|
+ }
|
|
|
];
|
|
];
|
|
|
|
|
|
|
|
expireFieldMap.forEach(item => {
|
|
expireFieldMap.forEach(item => {
|
|
@@ -2463,8 +2467,8 @@ export default {
|
|
|
//组装attrs数据
|
|
//组装attrs数据
|
|
|
if (response.attrs != null) {
|
|
if (response.attrs != null) {
|
|
|
this.attrs = [];
|
|
this.attrs = [];
|
|
|
- response.attrs.forEach(function (item, index) {
|
|
|
|
|
- var data = {value: item.attrName, detail: item.attrValues.split(',')}
|
|
|
|
|
|
|
+ response.attrs.forEach(function(item, index) {
|
|
|
|
|
+ var data = { value: item.attrName, detail: item.attrValues.split(',') }
|
|
|
that.attrs.push(data);
|
|
that.attrs.push(data);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -2581,22 +2585,22 @@ export default {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//无语,有的时候要删除,删除了又要加回来。
|
|
//无语,有的时候要删除,删除了又要加回来。
|
|
|
- if(!!this.businessValue){
|
|
|
|
|
- this.form.isBusinessPermanent=1;
|
|
|
|
|
- }else {
|
|
|
|
|
- this.form.isBusinessPermanent=0;
|
|
|
|
|
|
|
+ if (!!this.businessValue) {
|
|
|
|
|
+ this.form.isBusinessPermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isBusinessPermanent = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!!this.licenseValue){
|
|
|
|
|
- this.form.isLicensePermanent=1;
|
|
|
|
|
- }else {
|
|
|
|
|
- this.form.isLicensePermanent=0;
|
|
|
|
|
|
|
+ if (!!this.licenseValue) {
|
|
|
|
|
+ this.form.isLicensePermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isLicensePermanent = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if(!!this.certificateValue){
|
|
|
|
|
- this.form.isCertificatePermanent=1;
|
|
|
|
|
- }else {
|
|
|
|
|
- this.form.isCertificatePermanent=0;
|
|
|
|
|
|
|
+ if (!!this.certificateValue) {
|
|
|
|
|
+ this.form.isCertificatePermanent = 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.form.isCertificatePermanent = 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// // 组装companyIds
|
|
// // 组装companyIds
|
|
@@ -2620,12 +2624,12 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return delStoreProduct(productIds);
|
|
return delStoreProduct(productIds);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("删除成功");
|
|
this.msgSuccess("删除成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
/** 导出按钮操作 */
|
|
@@ -2635,14 +2639,14 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return exportStoreProduct(queryParams);
|
|
return exportStoreProduct(queryParams);
|
|
|
}).then(response => {
|
|
}).then(response => {
|
|
|
this.download(response.msg);
|
|
this.download(response.msg);
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleDrugExport(row){
|
|
|
|
|
|
|
+ handleDrugExport(row) {
|
|
|
const productId = row.productId
|
|
const productId = row.productId
|
|
|
this.exportLoading = true;
|
|
this.exportLoading = true;
|
|
|
exportDrugProduct({ productId: productId }).then(response => {
|
|
exportDrugProduct({ productId: productId }).then(response => {
|
|
@@ -2659,12 +2663,12 @@ export default {
|
|
|
confirmButtonText: "确定",
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
type: "warning"
|
|
|
- }).then(function () {
|
|
|
|
|
|
|
+ }).then(function() {
|
|
|
return sync580(productIds);
|
|
return sync580(productIds);
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("同步成功");
|
|
this.msgSuccess("同步成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
/** 批量下架按钮操作 */
|
|
/** 批量下架按钮操作 */
|
|
@@ -2679,19 +2683,19 @@ export default {
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.msgSuccess("下架成功");
|
|
this.msgSuccess("下架成功");
|
|
|
- }).catch(function () {
|
|
|
|
|
|
|
+ }).catch(function() {
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleReviewAudit(){
|
|
|
|
|
- console.log("aaaaaaaaaaaaaaa->",this.form.reviewAudit);
|
|
|
|
|
|
|
+ handleReviewAudit() {
|
|
|
|
|
+ console.log("aaaaaaaaaaaaaaa->", this.form.reviewAudit);
|
|
|
},
|
|
},
|
|
|
- switchChange(){
|
|
|
|
|
|
|
+ switchChange() {
|
|
|
console.log(this.form.isBusinessLicensePermanent);
|
|
console.log(this.form.isBusinessLicensePermanent);
|
|
|
},
|
|
},
|
|
|
- showOperLog(row){
|
|
|
|
|
|
|
+ showOperLog(row) {
|
|
|
getAuthInfo(row.productId).then(response => {
|
|
getAuthInfo(row.productId).then(response => {
|
|
|
this.auditLogs = response.auditLog;
|
|
this.auditLogs = response.auditLog;
|
|
|
- this.titleValue ="商品:" +"《" +row.productName+"》"+ "审核记录";
|
|
|
|
|
|
|
+ this.titleValue = "商品:" + "《" + row.productName + "》" + "审核记录";
|
|
|
this.authVisible = true;
|
|
this.authVisible = true;
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
@@ -2700,19 +2704,20 @@ export default {
|
|
|
.then(_ => {
|
|
.then(_ => {
|
|
|
done();
|
|
done();
|
|
|
})
|
|
})
|
|
|
- .catch(_ => {});
|
|
|
|
|
|
|
+ .catch(_ => {
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
|
* 复制商品
|
|
* 复制商品
|
|
|
* **/
|
|
* **/
|
|
|
- productCopy(row){
|
|
|
|
|
- this.$confirm('确认是否复制当前《'+row.productName+'》商品!', '复制商品', {
|
|
|
|
|
|
|
+ productCopy(row) {
|
|
|
|
|
+ this.$confirm('确认是否复制当前《' + row.productName + '》商品!', '复制商品', {
|
|
|
confirmButtonText: '确 认',
|
|
confirmButtonText: '确 认',
|
|
|
cancelButtonText: '取 消',
|
|
cancelButtonText: '取 消',
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
}).then(() => {
|
|
|
copyProduct(row).then(response => {
|
|
copyProduct(row).then(response => {
|
|
|
- if(response.code === 200){
|
|
|
|
|
|
|
+ if (response.code === 200) {
|
|
|
this.$message.success("操作成功!")
|
|
this.$message.success("操作成功!")
|
|
|
this.getList();
|
|
this.getList();
|
|
|
}
|
|
}
|
|
@@ -2825,10 +2830,9 @@ export default {
|
|
|
if (this.categoryOrStoreChangeTimer) {
|
|
if (this.categoryOrStoreChangeTimer) {
|
|
|
clearTimeout(this.categoryOrStoreChangeTimer);
|
|
clearTimeout(this.categoryOrStoreChangeTimer);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
},
|
|
},
|
|
|
//打开溯源码页面
|
|
//打开溯源码页面
|
|
|
- openVerify(row){
|
|
|
|
|
|
|
+ openVerify(row) {
|
|
|
if (row) {
|
|
if (row) {
|
|
|
this.currentProductId = row.productId;
|
|
this.currentProductId = row.productId;
|
|
|
} else if (this.ids.length > 0) {
|
|
} else if (this.ids.length > 0) {
|
|
@@ -2840,7 +2844,7 @@ export default {
|
|
|
this.$message.error('请先选择需要管理溯源码的商品');
|
|
this.$message.error('请先选择需要管理溯源码的商品');
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- this.titleVisible = this.titleVisible+'《'+row.productName+'》';
|
|
|
|
|
|
|
+ this.titleVisible = this.titleVisible + '《' + row.productName + '》';
|
|
|
this.verifyDialogVisible = true;
|
|
this.verifyDialogVisible = true;
|
|
|
},
|
|
},
|
|
|
/**
|
|
/**
|
|
@@ -2855,8 +2859,9 @@ export default {
|
|
|
}, 100);
|
|
}, 100);
|
|
|
this.getList();
|
|
this.getList();
|
|
|
this.verifyDialogVisible = false;
|
|
this.verifyDialogVisible = false;
|
|
|
- this.titleVisible="溯源管理";
|
|
|
|
|
|
|
+ this.titleVisible = "溯源管理";
|
|
|
},
|
|
},
|
|
|
|
|
+ }
|
|
|
};
|
|
};
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|