|
@@ -45,7 +45,9 @@
|
|
|
inputForm: {
|
|
|
tradeName: ''
|
|
|
},
|
|
|
- oldTradeName: ''
|
|
|
+ oldTradeName: '',
|
|
|
+ type: '',
|
|
|
+ typeName: ''
|
|
|
}
|
|
|
},
|
|
|
wareHouseService: null,
|
|
@@ -55,22 +57,24 @@
|
|
|
components: {
|
|
|
},
|
|
|
methods: {
|
|
|
- init (tradeName) {
|
|
|
+ init (tradeName, type, typeName) {
|
|
|
this.visible = true
|
|
|
this.inputForm.tradeName = tradeName
|
|
|
+ this.type = type
|
|
|
+ this.typeName = typeName
|
|
|
this.oldTradeName = tradeName
|
|
|
},
|
|
|
// 表单提交
|
|
|
submit () {
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
- this.$confirm('确定将商品名称为 ”' + this.oldTradeName + '“ 的入库商品全部改为 ”' + this.inputForm.tradeName + '“ 吗?', '提示', {
|
|
|
+ this.$confirm('确定将 [' + this.typeName + '] 商品 ”' + this.oldTradeName + '“ 全部改为 ”' + this.inputForm.tradeName + '“ 吗?', '提示', {
|
|
|
confirmButtonText: '确定',
|
|
|
cancelButtonText: '取消',
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
this.loading = true
|
|
|
- this.wareHouseService.saveTradeName(this.oldTradeName, this.inputForm.tradeName).then(({data}) => {
|
|
|
+ this.wareHouseService.saveTradeName(this.oldTradeName, this.inputForm.tradeName, this.type).then(({data}) => {
|
|
|
this.$message.success(data)
|
|
|
this.close()
|
|
|
this.$emit('refreshList')
|