zhouhao 2 anni fa
parent
commit
5dbe04ca86

+ 7 - 6
src/views/sales_control/components/WarehouseForm.vue

@@ -150,21 +150,22 @@ export default {
     },
     delChange() {
       if (this.dataList.length) {
-        this.dataList = this.resArr(this.dataList, this.selection)
         for (let i = 0; i < this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.length; i++) {
-          for (let j = 0; j < this.selected.length; j++) {
-            if (this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.selected[j].id|| this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===true) {
+          for (let j = 0; j < this.selection.length; j++) {
+            if (this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.selection[j].id|| this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===true) {
               // k.disabled = true
+              console.log(111);
               this.$set(this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i], 'disabled', true)
             }
 
           }
         }
-
-        if (!this.dataList.length) {
+    
+          this.dataList = this.resArr(this.dataList, this.selection)
+      }
+      if (!this.dataList.length) {
           this.customerNumber = ''
         }
-      }
     },
     handleSelection(data) {
       this.selection = data

+ 1 - 1
src/views/sales_control/preposition_stock_list.vue

@@ -30,7 +30,7 @@ export default {
           {
               name: "下载模板",
               click: () => {
-                workerTemplateExcel({}, `${this.$route.meta.title}_template`)
+                workerTemplateExcel({}, `${this.$route.meta.title}`)
                   .then(res => {
                     this.$message({
                       message: "下载成功",

+ 4 - 3
src/views/sales_control/sales_management/components/customer_sales_form.vue

@@ -225,16 +225,17 @@ export default {
     },
     delChange() {
       if (this.dataList.length) {
-        this.dataList = this.resArr(this.dataList, this.selection)
         for (let i = 0; i <this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.length ; i++) {
-          for (let j = 0; j < this.selected.length; j++) {
-            if ( this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.selected[j].id|| this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===true){
+          for (let j = 0; j < this.selection.length; j++) {
+            if ( this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.selection[j].id|| this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===true){
               // k.disabled = true
               this.$set(this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i],'disabled',true)
             }
 
           }
         }
+        this.dataList = this.resArr(this.dataList, this.selection)
+
         if (!this.dataList.length) {
           this.customerNumber = ''
         }

+ 5 - 4
src/views/sales_control/sales_management/components/return_sales_form.vue

@@ -235,11 +235,10 @@ export default {
     },
     delChange() {
       if (this.dataList.length) {
-        this.dataList = this.resArr(this.dataList, this.selection)
         for (let i = 0; i <this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData.length ; i++) {
-          for (let j = 0; j < this.dataList.length; j++) {
-            if ( this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.dataList[j].id || this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===false){
-              if (this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].itemId == this.dataList[j].itemId  || this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===false){
+          for (let j = 0; j < this.selection.length; j++) {
+            if ( this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].id == this.selection[j].id || this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===false){
+              if (this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].itemId == this.selection[j].itemId  || this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i].disabled ===false){
                 this.$set(this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i],'disabled',false)
               }else {
                 this.$set(this.$refs.dia.$refs.pageRef.$refs.zjpage.$refs.tableEl.tableData[i],'disabled',true)
@@ -249,6 +248,8 @@ export default {
             }
           }
         }
+        this.dataList = this.resArr(this.dataList, this.selection)
+
         if (!this.dataList.length) {
           this.returnId = ''
         }

+ 13 - 12
src/views/supply/apply/engin_list.vue

@@ -467,8 +467,8 @@
                 </el-popconfirm>
                 <el-button
                   v-if="
-                     !scope.row.automaticStatus &&
                     $checkBtnRole('edit', $route.meta.roles) &&
+                    !scope.row.automaticStatus &&
                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
                     scope.row.type === 1
                   "
@@ -479,14 +479,15 @@
                 </el-button>
                 <el-button
                   v-if="
-                  $checkBtnRole('edit', $route.meta.roles) &&
-                    (( !isCustomer &&!scope.row.automaticStatus &&
+                   $checkBtnRole('edit', $route.meta.roles) &&
+                      ((!isCustomer && !scope.row.automaticStatus &&
                       (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                      scope.row.type === 2 )||(isCustomer && !scope.row.automaticStatus &&
-                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.type!==1) ||
-                       (!isCustomer  &&scope.row.automaticStatus &&
-                      (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
-                     scope.row.type===2))
+                      scope.row.type === 2)||(isCustomer && !scope.row.automaticStatus &&
+                    (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') && scope.row.type!=2 && scope.row.type !==1)  ||
+                      ( !isCustomer && scope.row.automaticStatus &&
+                     (scope.row.examineStatus === 'SAVE' || scope.row.examineStatus === 'FAIL') &&
+                     scope.row.type===2)
+                      )
                   "
                   type="text"
                   @click="toReturnForm(scope.row)"
@@ -509,10 +510,10 @@
                 <el-button type="text" @click="toDetail(scope.row)"> 详情</el-button>
                 <!--             !scope.row.automaticStatus &&  -->
                 <el-popconfirm
-                  v-if="  $checkBtnRole('del', $route.meta.roles) &&
-                    ((!isCustomer &&!scope.row.automaticStatus &&
-                    scope.row.examineStatus !== 'OK')||(isCustomer && !scope.row.automaticStatus &&
-                    scope.row.examineStatus === 'OK' && scope.row.type!=2) || ( !isCustomer  && scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )"
+                  v-if="$checkBtnRole('del', $route.meta.roles) &&
+                    ((!isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK' ) ||(isCustomer && !scope.row.automaticStatus &&
+                    scope.row.examineStatus !== 'OK' && scope.row.type!=2)   || ( !isCustomer &&scope.row.automaticStatus && scope.row.examineStatus !== 'OK' && scope.row.type==2 ) )"
                   style="margin-left: 10px"
                   title="确定删除吗?"
                   @onConfirm="handleDelete(scope.row.id)"