|
@@ -485,9 +485,22 @@ export default {
|
|
|
this.form.subscriptionPusher = Array.isArray(this.form.subscriptionPusher)?this.form.subscriptionPusher.join(','):this.form.subscriptionPusher
|
|
|
this.form.unitNameMatch = Array.isArray(this.form.unitNameMatch)?this.form.unitNameMatch.join(','):this.form.unitNameMatch
|
|
|
this.form.zhaoBiaoUnit=this.form.zhaoBiaoUnit.toString()
|
|
|
- updateById(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.$router.go(-1)
|
|
|
+ this.zhaoBiaoUnitList.forEach(item =>{
|
|
|
+ if(this.form.zhaoBiaoUnit === item.zhaoBiaoUnitCustomer){
|
|
|
+ this.form.zhaoBiaoUnitId = item.id
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.customerList.forEach(item =>{
|
|
|
+ if(this.form.unitNameMatch === item.name){
|
|
|
+ this.form.unitNameMatchCode = item.code
|
|
|
+ }
|
|
|
+ })
|
|
|
+ updateById(this.form).then(res => {
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$modal.msgSuccess("修改成功");
|
|
|
+ this.$router.go(-1)
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
} else {
|
|
|
if (this.infoPublishTime != "" && this.infoPublishTime != null) {
|
|
@@ -500,19 +513,22 @@ export default {
|
|
|
this.form.subscriptionPusher = Array.isArray(this.form.subscriptionPusher)?this.form.subscriptionPusher.join(','):this.form.subscriptionPusher
|
|
|
this.form.unitNameMatch = Array.isArray(this.form.unitNameMatch)?this.form.unitNameMatch.join(','):this.form.unitNameMatch
|
|
|
this.form.zhaoBiaoUnit=this.form.zhaoBiaoUnit.toString()
|
|
|
+ console.log("this.form",this.form)
|
|
|
this.zhaoBiaoUnitList.forEach(item =>{
|
|
|
- if(this.form.zhaoBiaoUnit == item.zhaoBiaoUnitCustomer){
|
|
|
+ if(this.form.zhaoBiaoUnit === item.zhaoBiaoUnitCustomer){
|
|
|
this.form.zhaoBiaoUnitId = item.id
|
|
|
}
|
|
|
})
|
|
|
this.customerList.forEach(item =>{
|
|
|
- if(this.form.unitNameMatch == item.name){
|
|
|
+ if(this.form.unitNameMatch === item.name){
|
|
|
this.form.unitNameMatchCode = item.code
|
|
|
}
|
|
|
})
|
|
|
- insert(this.form).then(response => {
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
- this.$router.go(-1)
|
|
|
+ insert(this.form).then(res => {
|
|
|
+ if(res.code == 200){
|
|
|
+ this.$modal.msgSuccess("新增成功");
|
|
|
+ this.$router.go(-1)
|
|
|
+ }
|
|
|
});
|
|
|
|
|
|
}
|