Procházet zdrojové kódy

猫眼推送,城市不能修改,上线提示修复

shipeng před 1 měsícem
rodič
revize
cc91c7aeed

+ 7 - 1
src/views/otaMr/maoyan/dialog/dataEdit.vue

@@ -39,6 +39,7 @@
             v-model="form.cityId"
             :options="cityList"
             style="width: 400px;"
+            :disabled="isFlag"
             :props="{
                 children: 'child',
                 label: 'name',
@@ -221,7 +222,8 @@ export default {
       seatTypeId: null,
       calendarId: null,
 
-      cityList: []
+      cityList: [],
+      isFlag: false,
     };
   },
   created() {
@@ -243,6 +245,9 @@ export default {
         ...obj,
         category: obj.category?obj.category.toString():obj.category
       }))
+      if(this.form.cityId) {
+        this.isFlag = true
+      }
       
       await this.getPushListFun(obj,type)
 
@@ -403,6 +408,7 @@ export default {
     cancel() {
       this.reset();
       this.open = false;
+      this.isFlag = false;
     },
     isCheck(row){
       let flog = false

+ 3 - 3
src/views/otaMr/maoyan/index.vue

@@ -170,13 +170,13 @@ export default {
     },
     /** 推送 */
     handlePush(row) {
-      this.$modal.confirm(`是否确认${ row.status == -1 ? '上线': row.status == 1 ?'下线':''}此商品吗?`).then(function() {
+      this.$modal.confirm(`是否确认${ (row.status == -1 || !row.status) ? '上线': row.status == 1 ?'下线':''}此商品吗?`).then(function() {
         return updateById({
           id: row.id,
-          status: row.status == -1 ? 1 : -1
+          status: row.status == -1 ? 1 : 0
         });
       }).then(() => {
-        this.$modal.msgSuccess(`${ row.status == -1 ? '上线': row.status == 1 ?'下线':''}成功`);
+        this.$modal.msgSuccess(`${ (row.status == -1 || !row.status) ? '上线': row.status == 1 ?'下线':''}成功`);
         this.getList();
       }).catch(() => {