luobang 2 years ago
parent
commit
e319a63024

+ 4 - 6
src/views/ADMINISTRATORS/components/ADMINISTRATORS1.vue

@@ -694,12 +694,10 @@ export default {
       this.axios
         .post('/api/v1/tms/updateLoadingIdRemark', this.loadDetail)
         .then(res => {
-          if (res.data.status == 'succeed') {
-            if (res.data.data == 0) {
-              this.$message.success('修改成功!')
-            } else if (res.data.data == 11) {
-              this.$message.error('内转订单无需求计划,请先做需求或计划')
-            }
+          if (res.data.data == 0) {
+            this.$message.success('修改成功!')
+          } else if (res.data.data == 11) {
+            this.$message.error('内转订单无需求计划,请先做需求或计划')
           } else {
             this.$message.error(res.data.data)
           }

+ 90 - 11
src/views/statisticalReport/components/salesLogisticsStatistics/saleSteelReports.vue

@@ -170,6 +170,10 @@
                 <i class="el-icon-pie-chart"></i>
                 操作日志
               </el-button>
+              <el-button type="primary" @click="ctrlColumnShow">
+                <i class="el-icon-pie-chart"></i>
+                控制列显隐
+              </el-button>
             </el-dropdown-menu>
           </el-dropdown>
         </el-form-item>
@@ -1201,7 +1205,8 @@
             v-model="arrivalTime"
             type="datetime"
             :disabled="orgCode != 'wuliuyunshubu'"
-            placeholder="选择日期时间">
+            placeholder="选择日期时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="签收时间">
@@ -1209,7 +1214,8 @@
             v-model="receiptTime"
             type="datetime"
             :disabled="orgCode != 'wuliuyunshubu'"
-            placeholder="选择日期时间">
+            placeholder="选择日期时间"
+          >
           </el-date-picker>
         </el-form-item>
         <el-form-item label="抵达图片(车头、满货箱)" style="">
@@ -1387,6 +1393,25 @@
         </el-form>
       </div>
     </el-dialog>
+    <el-dialog
+      title="切换列的显示与隐藏"
+      :visible.sync="columnShowDialog"
+      width="30%"
+      center
+      class="columnShowDialogClass"
+    >
+      <el-transfer
+        style="text-align: left; display: inline-block"
+        v-model="columnHiddenData"
+        :data="columnAllData"
+        :titles="['显示的列', '隐藏的列']"
+        :button-texts="['至显示列', '至隐藏列']"
+      ></el-transfer>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="columnShowDialog = false">取 消</el-button>
+        <el-button type="primary" @click="columnShowOperation">确 定</el-button>
+      </span>
+    </el-dialog>
     <div class="dialog">
       <el-dialog
         :visible.sync="exceptionHandleVisible"
@@ -1646,6 +1671,7 @@ export default {
   },
   data() {
     return {
+      columnShowDialog: false,
       toggleRowIds: [],
       capacityNo: null,
       capacityId: null,
@@ -1938,8 +1964,8 @@ export default {
       dialogImageUrl: '',
       dialogVisible: false,
       isLoading: false,
-      arrivalTime:null,
-      receiptTime:null,
+      arrivalTime: null,
+      receiptTime: null,
       dialogFormVisible: false,
       addresText: null,
       originalPriceValue: null,
@@ -1998,7 +2024,9 @@ export default {
       scrollLeft: 0,
       scrollLeftFlag: 0,
       isShowOperateYeWuYuan: false,
-      headColumnList: []
+      headColumnList: [],
+      columnAllData: [],
+      columnHiddenData: []
     }
   },
   created() {
@@ -2038,12 +2066,23 @@ export default {
       this.axios
         .post('/api/v1/uc/getColumnNoRoutList', {
           orgCode: getCookie('orgCode'),
+          userName: getCookie('loginName'),
           tableName: '销售钢材报表'
         })
         .then(res => {
           this.columnNoRoutList = res.data
         })
       this.notRoutList = ['select']
+    } else {
+      this.axios
+        .post('/api/v1/uc/getColumnShowHidden', {
+          userName: getCookie('loginName'),
+          orgCode: getCookie('orgCode'),
+          tableName: '销售钢材报表'
+        })
+        .then(res => {
+          this.columnNoRoutList = res.data.columnHiddenData
+        })
     }
     if (getCookie('orgCode') == 'xiaoshouyewuyuan') {
       this.isShowOperateYeWuYuan = true
@@ -2170,6 +2209,41 @@ export default {
   },
   computed: {},
   methods: {
+    ctrlColumnShow() {
+      this.axios
+        .post('/api/v1/uc/getColumnShowHidden', {
+          userName: getCookie('loginName'),
+          orgCode: getCookie('orgCode'),
+          tableName: '销售钢材报表'
+        })
+        .then(res => {
+          console.log(res.data.columnShowData)
+          console.log(res.data.columnHiddenData, 'columnHiddenData')
+          this.columnAllData = res.data.columnAllData
+          this.columnHiddenData = res.data.columnHiddenData
+        })
+      this.columnShowDialog = true
+    },
+    columnShowOperation() {
+      this.axios
+        .post('/api/v1/uc/updateColumnShowHidden', {
+          userName: getCookie('loginName'),
+          orgCode: getCookie('orgCode'),
+          tableName: '销售钢材报表',
+          columnHiddenData: this.columnHiddenData
+        })
+        .then(res => {
+          this.$message({
+            type: 'success',
+            message: '切换成功',
+            offset: '250'
+          })
+          this.columnNoRoutList = this.columnHiddenData
+          this.reset()
+          this.getSteelReport()
+        })
+      this.columnShowDialog = false
+    },
     headCellStyle({ row, column, rowIndex, columnIndex }) {
       // console.log(row, 'row')
       // console.log('headCellStyle column.property: ', column.property)
@@ -2904,8 +2978,8 @@ export default {
       })
       formData.append('orderNumber', this.orderNumber)
       formData.append('resultArrivalAddress', this.location)
-      if(this.arrivalTime){
-        formData.append('arrivalTime',sjTime(this.arrivalTime));
+      if (this.arrivalTime) {
+        formData.append('arrivalTime', sjTime(this.arrivalTime))
       }
       let options = {
         // 设置axios的参数
@@ -2926,8 +3000,8 @@ export default {
         })
         formData.append('orderNumber', this.orderNumber)
         formData.append('resultArrivalAddress', this.location)
-        if(this.receiptTime){
-          formData.append('receiptTime',sjTime(this.receiptTime));
+        if (this.receiptTime) {
+          formData.append('receiptTime', sjTime(this.receiptTime))
         }
         formData.append('num', request.length)
         let options = {
@@ -2944,7 +3018,7 @@ export default {
           this.steelMap.arrivalAddress = this.location
           this.closeUpload()
           this.refresh()
-          this.tableRowIndex=''
+          this.tableRowIndex = ''
         })
       })
     },
@@ -2964,7 +3038,7 @@ export default {
     closeUpload() {
       this.location = null
       this.arrivalTime = null
-      this.receiptTime= null
+      this.receiptTime = null
       this.arrivalReceiving = false
       this.isLoading = false
       this.$refs.arrival.clearFiles()
@@ -4826,6 +4900,11 @@ export default {
         width: auto !important;
       }
     }
+    .columnShowDialogClass {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+    }
   }
 }
 </style>