Просмотр исходного кода

Merge branch 'xiaoqin' into mergeBranch

codeMan 3 лет назад
Родитель
Сommit
5ea6324ac0

+ 24 - 2
src/HDrpManagement/logistics/details/tabs/logisticsBox/add.vue

@@ -76,7 +76,9 @@
             </el-table>
           </el-col>
           <el-col :span="24 - setcol">
-            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="0" @onConfirm="onConfirm"></logisticsCanUseProduct>
+            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="0" @onConfirm="onConfirm">
+              <el-button class="inline-16" slot="allBtn" type="primary" size="small" @click="handlePullData">一键全选</el-button>
+            </logisticsCanUseProduct>
           </el-col>
         </el-row>
       </div>
@@ -90,6 +92,7 @@
 
 <script>
 import logisticsCanUseProduct from '@/template/logisticsCanUseProduct/index.vue'
+import uploadAllData from '@/components/uploadAllData/index'
 export default {
   data () {
     return {
@@ -100,7 +103,8 @@ export default {
     }
   },
   components:{
-    logisticsCanUseProduct
+    logisticsCanUseProduct,
+    uploadAllData
   },
   methods:{
     async onSubmit (){
@@ -129,6 +133,24 @@ export default {
         this.drawer = false
       })
     },
+    async handlePullData () {
+      let res = await this.$api.requested({
+        id:20230110112204,
+        content: {
+          "pageNumber": 1,
+          "pageSize": 9999999999,
+          "sa_logisticsid":this.$route.query.id,
+          "sa_logistics_boxid":1,
+          "where": {
+            "condition": ""
+          }
+        }
+      })
+      if(res.data.length) {
+        this.tableData = res.data
+        this.$refs.logislist.tableData = []
+      } 
+    },
     showSelect () {
       this.$refs['logislist'].listData()
     },

+ 21 - 1
src/HDrpManagement/logistics/details/tabs/logisticsBox/edit.vue

@@ -76,7 +76,9 @@
             </el-table>
           </el-col>
           <el-col :span="24 - setcol">
-            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="0" @onConfirm="onConfirm"></logisticsCanUseProduct>
+            <logisticsCanUseProduct ref="logislist" :sa_logistics_boxid="0" @onConfirm="onConfirm">
+              <el-button class="inline-16" slot="allBtn" type="primary" size="small" @click="handlePullData">一键全选</el-button>
+            </logisticsCanUseProduct>
           </el-col>
         </el-row>
       </div>
@@ -152,6 +154,24 @@ export default {
         this.listData()
       })
     },
+    async handlePullData () {
+      let res = await this.$api.requested({
+        id:20230110112204,
+        content: {
+          "pageNumber": 1,
+          "pageSize": 9999999999,
+          "sa_logisticsid":this.$route.query.id,
+          "sa_logistics_boxid":1,
+          "where": {
+            "condition": ""
+          }
+        }
+      })
+      if(res.data.length) {
+        this.tableData.push(...res.data)
+        this.$refs.logislist.tableData = []
+      } 
+    },
     async listData (id) {
       const res = await this.$api.requested({
         "id": 20230109155304,

+ 1 - 1
src/SDrpManagement/agentOrder/details/index.vue

@@ -36,7 +36,7 @@
             :id="[$route.query.id]"
             @onSuccess="$router.back()"
             class="inline-16"
-            v-if="mainData.status == '新建' && mainData.type != '特殊订单' && tool.checkAuth($route.name,'delete')"
+            v-if="mainData.status == '新建' && tool.checkAuth($route.name,'delete')"
           />
         </div>
         <template #headerBottom>

+ 1 - 1
src/SDrpManagement/salerOrder/details/index.vue

@@ -36,7 +36,7 @@
             :id="[$route.query.id]"
             @onSuccess="$router.back()"
             class="inline-16"
-            v-if="mainData.status == '新建' && mainData.type != '特殊订单' && tool.checkAuth($route.name,'delete')"
+            v-if="mainData.status == '新建' && tool.checkAuth($route.name,'delete')"
           />
         </div>
         <template #headerBottom>

+ 6 - 1
src/components/socketMessage/index.vue

@@ -86,7 +86,12 @@
           this.getMessageList()
           console.log(JSON.parse(msg.data),JSON.parse(msg.data).title,JSON.parse(msg.data).title == 'refresh')
           if (JSON.parse(msg.data).message.title == 'refresh') {
-            this.$router.go(0)
+            this.$confirm('系统已上传新版本,是否立即刷新','提示',{
+              confirmButtonText:'确定',
+              cancelButtonText:'取消'
+            }).then(() =>{
+              this.$router.go(0)
+            })
           }
         }
       },

+ 13 - 1
src/template/logisticsCanUseProduct/index.vue

@@ -2,7 +2,12 @@
   <div>
     <div class="flex-align-center flex-between mt-10">
       <el-input style="width:200px" size="small"  suffix-icon="el-icon-search" v-model="params.content.where.condition" placeholder="产品名称,编号" @keyup.enter.native="listData(params.content.pageNumber = 1)" @clear="listData(params.content.pageNumber = 1)" clearable></el-input>
-      <el-button type="primary" size="small" :disabled="tableSelectData.length === 0" @click="onConfirm">添加选中商品</el-button>
+      <div style="display:flex">
+        <slot name="allBtn" :data="total"></slot>
+        <div>
+          <el-button type="primary" size="small" :disabled="tableSelectData.length === 0" @click="onConfirm">添加选中商品</el-button>
+        </div>
+      </div>
     </div>
     <el-table
       :data="tableData"
@@ -103,6 +108,13 @@ export default {
       this.tableSelectData = val
     },
     onConfirm () {
+      this.tableData.forEach((item,index) => {
+        this.tableSelectData.forEach(item2 => {
+          if (item.itemid == item2.itemid) {
+            this.tableData.splice(index,1)
+          }
+        })
+      })
       this.$emit('onConfirm',this.tableSelectData)
     },
   }