zhangdan преди 4 години
родител
ревизия
6b38a5edb5
променени са 1 файла, в които са добавени 10 реда и са изтрити 12 реда
  1. 10 12
      src/views/shopSetting/supplier.vue

+ 10 - 12
src/views/shopSetting/supplier.vue

@@ -64,7 +64,7 @@ export default {
       searchData: { name: '' },
 	  openSupplierModal: false, // 默认关闭弹窗
 	  itemId: null, // 编辑行id
-	  itemData:{},  // 编辑行数据
+	  itemData: {}, // 编辑行数据
       // 表头
       columns: [
         {
@@ -85,12 +85,12 @@ export default {
           dataIndex: 'simpleName',
           align: 'center'
         },
-		{
+        {
 		  title: '联系人',
 		  width: 100,
 		  dataIndex: 'contactName',
 		  align: 'center'
-		},
+        },
         {
 		  title: '手机号码',
 		  width: 100,
@@ -109,7 +109,7 @@ export default {
             customRender: 'state'
           }
         },
-		{
+        {
 		  title: '备注',
 		  width: 200,
 		  dataIndex: 'remarks',
@@ -117,7 +117,7 @@ export default {
 		  customRender: (text) => {
 		    return text || '--'
 		  }
-		},
+        },
         {
           title: '操作',
           align: 'center',
@@ -158,20 +158,20 @@ export default {
   methods: {
     showModal () {
       this.itemId = null
-	  this.itemData={}
+	  this.itemData = {}
       this.openSupplierModal = true
     },
     // 编辑
     handleEdit (record) {
 	  this.itemId = record.id
-	  this.itemData=record
+	  this.itemData = record
 	  console.log(this.itemId, '-------编辑')
 	  this.openSupplierModal = true
     },
-	cancel () {
+    cancel () {
 	  this.itemId = null
 	  this.openSupplierModal = false
-	},
+    },
     // 重置
     resetForm () {
       this.searchData.name = ''
@@ -194,11 +194,9 @@ export default {
     		  cancelText: '取消',
     		  onOk () {
     	      changeSupplierStatus(_data).then(res => {
-    			  if (res.status == 200) {
+    			 if (res.status == 200) {
                 _this.$message.success(res.message)
                 _this.$refs.table.refresh()
-    			  } else {
-                record.state = !record.state
     			  }
     	      })
     	     }