Parcourir la source

Merge remote-tracking branch 'origin/mergeBranch' into mergeBranch

qymljy il y a 2 ans
Parent
commit
cdb2a65390

+ 26 - 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,26 @@ 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.push(...res.data)
+        const res2 = new Map();
+        this.tableData = this.tableData.filter((item) => !res2.has(item['itemno']) && res2.set(item['itemno'], 1));
+        this.$refs.logislist.tableData = []
+      } 
+    },
     showSelect () {
       this.$refs['logislist'].listData()
     },

+ 23 - 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,26 @@ 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)
+        const res2 = new Map();
+        this.tableData = this.tableData.filter((item) => !res2.has(item['itemno']) && res2.set(item['itemno'], 1));
+        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>

+ 4 - 3
src/components/normal-basic-layout/details/modules/group/group.vue

@@ -42,8 +42,8 @@
       </el-popover>
     </div>
     <div style="padding:10px">
-      <div class="flex-align-center" style="margin-bottom:16px" v-show="men.isdefault === 0" v-for="men in item.team" :key="men.index">
-        <div class="avatar inline-16"  :class="men.isdefault === 1?'leader':''" >
+      <div class="flex-align-center" style="margin-bottom:16px" v-for="men in item.team" :key="men.index">
+        <div class="avatar inline-16"  :class="men.isdefault === 0?'leader':''" >
           <img class="avatar__image" v-if="men.headpic" :src="men.headpic" alt="">
           <p v-else>{{men.name.substr(0, 1)}}</p>
         </div>
@@ -56,7 +56,7 @@
         </div>
       </div>
 
-      <div v-if="showEmpty(item.team)">
+      <div v-if="!item.team.length">
         <el-empty description="暂无成员" :image-size="40"></el-empty>
       </div>
       <el-dialog title="设置" :visible.sync="dialogTableVisible" append-to-body width="400px">
@@ -130,6 +130,7 @@ export default {
           teamname:''
         }
       ]
+      console.log(res.data)
       
     },
     async setLeader (item) {

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

@@ -86,7 +86,13 @@
           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:'取消',
+              type:'warning'
+            }).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)
     },
   }

+ 2 - 2
vue.config.js

@@ -15,8 +15,8 @@ module.exports = {
       proxy: {
         '/apis': {
           // target: 'http://61.164.207.46:8000',  // target host*/
-          target: 'http://192.168.3.9:8090',  // target host*!
-          // target: 'https://oms.idcgroup.com.cn:8079/',  // target host
+          // target: 'http://192.168.3.9:8090',  // target host*!
+          target: 'https://oms.idcgroup.com.cn:8079/',  // target host
           // target: 'localhost:8080',  // target host
           ws: true,  // proxy websockets 
           changeOrigin: true,  // needed for virtual hosted sites