Pārlūkot izejas kodu

修改状态限制

wengyuwen 4 gadi atpakaļ
vecāks
revīzija
7069a691c6

+ 1 - 1
src/api/warehouseBusiness/goodsTransfer.js

@@ -100,7 +100,7 @@ export function RevocationApproval(data){
 // 撤销请核
 export function backFee(fId) {
   return request({
-    url: '/warehouseBusiness/inStock/withdrawById/' + fId,
+    url: '/warehouseBusiness/goodsTransfer/withdrawById/' + fId,
     method: 'get',
   })
 }

+ 188 - 189
src/utils/dialog.js

@@ -1,202 +1,32 @@
 
 import Vue from 'vue'
-Vue.directive('dialogDrag', {
-  bind(el, binding, vnode, oldVnode) {
-    // 弹框可拉伸最小宽高
-    const minWidth = 400
-    const minHeight = 300
-    // 初始非全屏
-    let isFullScreen = false
-    // 当前顶部高度
-    let nowMarginTop = 0
-    // 获取弹框头部(这部分可双击全屏)
-    const dialogHeaderEl = el.querySelector('.el-dialog__header')
-    // 弹窗
-    const dragDom = el.querySelector('.el-dialog')
-    // 给弹窗加上overflow auto;不然缩小时框内的标签可能超出dialog;
-    dragDom.style.overflow = 'auto'
-    // 清除选择头部文字效果
-    // dialogHeaderEl.onselectstart = new Function("return false");
-    // 头部加上可拖动cursor
-    dialogHeaderEl.style.cursor = 'move'
-    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
-    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
-    const moveDown = e => {
-      // 鼠标按下,计算当前元素距离可视区的距离
-      const disX = e.clientX - dialogHeaderEl.offsetLeft
-      const disY = e.clientY - dialogHeaderEl.offsetTop
-      // 获取到的值带px 正则匹配替换
-      let styL, styT
-      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
-      if (sty.left.includes('%')) {
-        styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
-        styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
-      } else {
-        styL = +sty.left.replace(/\px/g, '')
-        styT = +sty.top.replace(/\px/g, '')
-      }
-      document.onmousemove = function(e) {
-        // 通过事件委托,计算移动的距离
-        const l = e.clientX - disX
-        const t = e.clientY - disY
-        // 移动当前元素
-        dragDom.style.left = `${l + styL}px`
-        dragDom.style.top = `${t + styT}px`
-        // 将此时的位置传出去
-        // binding.value({x:e.pageX,y:e.pageY})
-      }
-      document.onmouseup = function(e) {
-        document.onmousemove = null
-        document.onmouseup = null
-      }
-    }
-    dialogHeaderEl.onmousedown = moveDown
-    // 当前宽高
-    let nowWidth = 0
-    // let nowHight = 0
-    // 双击头部全屏效果
-    dialogHeaderEl.ondblclick = e => {
-      if (isFullScreen === false) {
-        // nowHight = dragDom.clientHeight
-        nowWidth = dragDom.clientWidth
-        nowMarginTop = dragDom.style.marginTop
-        dragDom.style.left = 0
-        dragDom.style.top = 0
-        dragDom.style.height = '100VH'
-        dragDom.style.width = '100VW'
-        dragDom.style.marginTop = 0
-        isFullScreen = true
-        dialogHeaderEl.style.cursor = 'initial'
-        dialogHeaderEl.onmousedown = null
-      } else {
-        dragDom.style.height = 'auto'
-        dragDom.style.width = nowWidth + 'px'
-        dragDom.style.marginTop = nowMarginTop
-        isFullScreen = false
-        dialogHeaderEl.style.cursor = 'move'
-        dialogHeaderEl.onmousedown = moveDown
-      }
-    }
-    dragDom.onmousemove = function(e) {
-      // let moveE = e
-      if (
-        e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10 ||
-        dragDom.offsetLeft + 10 > e.clientX
-      ) {
-        dragDom.style.cursor = 'w-resize'
-      } else if (
-        el.scrollTop + e.clientY >
-        dragDom.offsetTop + dragDom.clientHeight - 10
-      ) {
-        dragDom.style.cursor = 's-resize'
-      } else {
-        dragDom.style.cursor = 'default'
-
-        dragDom.onmousedown = null
-      }
-      dragDom.onmousedown = e => {
-        const clientX = e.clientX
-        const clientY = e.clientY
-        const elW = dragDom.clientWidth
-        const elH = dragDom.clientHeight
-        const EloffsetLeft = dragDom.offsetLeft
-        const EloffsetTop = dragDom.offsetTop
-        dragDom.style.userSelect = 'none'
-        const ELscrollTop = el.scrollTop
-        // 判断点击的位置是不是为头部
-        if (
-          clientX > EloffsetLeft &&
-          clientX < EloffsetLeft + elW &&
-          clientY > EloffsetTop &&
-          clientY < EloffsetTop + 100
-        ) {
-          // 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
-        } else {
-          document.onmousemove = function(e) {
-            // 移动时禁用默认事件
-            e.preventDefault()
-            // 左侧鼠标拖拽位置
-            if (clientX > EloffsetLeft && clientX < EloffsetLeft + 10) {
-              // 往左拖拽
-              if (clientX > e.clientX) {
-                dragDom.style.width = elW + (clientX - e.clientX) * 2 + 'px'
-              }
-              // 往右拖拽
-              if (clientX < e.clientX) {
-                if (dragDom.clientWidth < minWidth) {
-                  console.log()
-                } else {
-                  dragDom.style.width = elW - (e.clientX - clientX) * 2 + 'px'
-                }
-              }
-            }
-            // 右侧鼠标拖拽位置
-            if (
-              clientX > EloffsetLeft + elW - 10 &&
-              clientX < EloffsetLeft + elW
-            ) {
-              // 往左拖拽
-              if (clientX > e.clientX) {
-                if (dragDom.clientWidth < minWidth) {
-                  console.log()
-                } else {
-                  dragDom.style.width = elW - (clientX - e.clientX) * 2 + 'px'
-                }
-              }
-              // 往右拖拽
-              if (clientX < e.clientX) {
-                dragDom.style.width = elW + (e.clientX - clientX) * 2 + 'px'
-              }
-            }
-            // 底部鼠标拖拽位置
-            if (
-              ELscrollTop + clientY > EloffsetTop + elH - 20 &&
-              ELscrollTop + clientY < EloffsetTop + elH
-            ) {
-              // 往上拖拽
-              if (clientY > e.clientY) {
-                if (dragDom.clientHeight < minHeight) {
-                  console.log()
-                } else {
-                  dragDom.style.height = elH - (clientY - e.clientY) * 2 + 'px'
-                }
-              }
-              // 往下拖拽
-              if (clientY < e.clientY) {
-                dragDom.style.height = elH + (e.clientY - clientY) * 2 + 'px'
-              }
-            }
-          }
-          // 拉伸结束
-          document.onmouseup = function(e) {
-            document.onmousemove = null
-
-            document.onmouseup = null
-          }
-        }
-      }
-    }
-  }
-})
-
-// v-dialogDrag: 弹窗拖拽
 // Vue.directive('dialogDrag', {
 //   bind(el, binding, vnode, oldVnode) {
+//     // 弹框可拉伸最小宽高
+//     const minWidth = 400
+//     const minHeight = 300
+//     // 初始非全屏
+//     let isFullScreen = false
+//     // 当前顶部高度
+//     let nowMarginTop = 0
+//     // 获取弹框头部(这部分可双击全屏)
 //     const dialogHeaderEl = el.querySelector('.el-dialog__header')
+//     // 弹窗
 //     const dragDom = el.querySelector('.el-dialog')
+//     // 给弹窗加上overflow auto;不然缩小时框内的标签可能超出dialog;
+//     dragDom.style.overflow = 'auto'
+//     // 清除选择头部文字效果
+//     // dialogHeaderEl.onselectstart = new Function("return false");
+//     // 头部加上可拖动cursor
 //     dialogHeaderEl.style.cursor = 'move'
-//
 //     // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
 //     const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
-//
-//     dialogHeaderEl.onmousedown = (e) => {
+//     const moveDown = e => {
 //       // 鼠标按下,计算当前元素距离可视区的距离
 //       const disX = e.clientX - dialogHeaderEl.offsetLeft
 //       const disY = e.clientY - dialogHeaderEl.offsetTop
-//
 //       // 获取到的值带px 正则匹配替换
 //       let styL, styT
-//
 //       // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
 //       if (sty.left.includes('%')) {
 //         styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
@@ -205,24 +35,193 @@ Vue.directive('dialogDrag', {
 //         styL = +sty.left.replace(/\px/g, '')
 //         styT = +sty.top.replace(/\px/g, '')
 //       }
-//
 //       document.onmousemove = function(e) {
 //         // 通过事件委托,计算移动的距离
 //         const l = e.clientX - disX
 //         const t = e.clientY - disY
-//
 //         // 移动当前元素
 //         dragDom.style.left = `${l + styL}px`
 //         dragDom.style.top = `${t + styT}px`
-//
 //         // 将此时的位置传出去
 //         // binding.value({x:e.pageX,y:e.pageY})
 //       }
-//
 //       document.onmouseup = function(e) {
 //         document.onmousemove = null
 //         document.onmouseup = null
 //       }
 //     }
+//     dialogHeaderEl.onmousedown = moveDown
+//     // 当前宽高
+//     let nowWidth = 0
+//     // let nowHight = 0
+//     // 双击头部全屏效果
+//     dialogHeaderEl.ondblclick = e => {
+//       if (isFullScreen === false) {
+//         // nowHight = dragDom.clientHeight
+//         nowWidth = dragDom.clientWidth
+//         nowMarginTop = dragDom.style.marginTop
+//         dragDom.style.left = 0
+//         dragDom.style.top = 0
+//         dragDom.style.height = '100VH'
+//         dragDom.style.width = '100VW'
+//         dragDom.style.marginTop = 0
+//         isFullScreen = true
+//         dialogHeaderEl.style.cursor = 'initial'
+//         dialogHeaderEl.onmousedown = null
+//       } else {
+//         dragDom.style.height = 'auto'
+//         dragDom.style.width = nowWidth + 'px'
+//         dragDom.style.marginTop = nowMarginTop
+//         isFullScreen = false
+//         dialogHeaderEl.style.cursor = 'move'
+//         dialogHeaderEl.onmousedown = moveDown
+//       }
+//     }
+//     dragDom.onmousemove = function(e) {
+//       // let moveE = e
+//       if (
+//         e.clientX > dragDom.offsetLeft + dragDom.clientWidth - 10 ||
+//         dragDom.offsetLeft + 10 > e.clientX
+//       ) {
+//         dragDom.style.cursor = 'w-resize'
+//       } else if (
+//         el.scrollTop + e.clientY >
+//         dragDom.offsetTop + dragDom.clientHeight - 10
+//       ) {
+//         dragDom.style.cursor = 's-resize'
+//       } else {
+//         dragDom.style.cursor = 'default'
+//
+//         dragDom.onmousedown = null
+//       }
+//       dragDom.onmousedown = e => {
+//         const clientX = e.clientX
+//         const clientY = e.clientY
+//         const elW = dragDom.clientWidth
+//         const elH = dragDom.clientHeight
+//         const EloffsetLeft = dragDom.offsetLeft
+//         const EloffsetTop = dragDom.offsetTop
+//         dragDom.style.userSelect = 'none'
+//         const ELscrollTop = el.scrollTop
+//         // 判断点击的位置是不是为头部
+//         if (
+//           clientX > EloffsetLeft &&
+//           clientX < EloffsetLeft + elW &&
+//           clientY > EloffsetTop &&
+//           clientY < EloffsetTop + 100
+//         ) {
+//           // 如果是头部在此就不做任何动作,以上有绑定dialogHeaderEl.onmousedown = moveDown;
+//         } else {
+//           document.onmousemove = function(e) {
+//             // 移动时禁用默认事件
+//             e.preventDefault()
+//             // 左侧鼠标拖拽位置
+//             if (clientX > EloffsetLeft && clientX < EloffsetLeft + 10) {
+//               // 往左拖拽
+//               if (clientX > e.clientX) {
+//                 dragDom.style.width = elW + (clientX - e.clientX) * 2 + 'px'
+//               }
+//               // 往右拖拽
+//               if (clientX < e.clientX) {
+//                 if (dragDom.clientWidth < minWidth) {
+//                   console.log()
+//                 } else {
+//                   dragDom.style.width = elW - (e.clientX - clientX) * 2 + 'px'
+//                 }
+//               }
+//             }
+//             // 右侧鼠标拖拽位置
+//             if (
+//               clientX > EloffsetLeft + elW - 10 &&
+//               clientX < EloffsetLeft + elW
+//             ) {
+//               // 往左拖拽
+//               if (clientX > e.clientX) {
+//                 if (dragDom.clientWidth < minWidth) {
+//                   console.log()
+//                 } else {
+//                   dragDom.style.width = elW - (clientX - e.clientX) * 2 + 'px'
+//                 }
+//               }
+//               // 往右拖拽
+//               if (clientX < e.clientX) {
+//                 dragDom.style.width = elW + (e.clientX - clientX) * 2 + 'px'
+//               }
+//             }
+//             // 底部鼠标拖拽位置
+//             if (
+//               ELscrollTop + clientY > EloffsetTop + elH - 20 &&
+//               ELscrollTop + clientY < EloffsetTop + elH
+//             ) {
+//               // 往上拖拽
+//               if (clientY > e.clientY) {
+//                 if (dragDom.clientHeight < minHeight) {
+//                   console.log()
+//                 } else {
+//                   dragDom.style.height = elH - (clientY - e.clientY) * 2 + 'px'
+//                 }
+//               }
+//               // 往下拖拽
+//               if (clientY < e.clientY) {
+//                 dragDom.style.height = elH + (e.clientY - clientY) * 2 + 'px'
+//               }
+//             }
+//           }
+//           // 拉伸结束
+//           document.onmouseup = function(e) {
+//             document.onmousemove = null
+//
+//             document.onmouseup = null
+//           }
+//         }
+//       }
+//     }
 //   }
 // })
+
+Vue.directive('dialogDrag', {
+  bind(el, binding, vnode, oldVnode) {
+    const dialogHeaderEl = el.querySelector('.el-dialog__header')
+    const dragDom = el.querySelector('.el-dialog')
+    dialogHeaderEl.style.cursor = 'move'
+
+    // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
+    const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
+
+    dialogHeaderEl.onmousedown = (e) => {
+      // 鼠标按下,计算当前元素距离可视区的距离
+      const disX = e.clientX - dialogHeaderEl.offsetLeft
+      const disY = e.clientY - dialogHeaderEl.offsetTop
+
+      // 获取到的值带px 正则匹配替换
+      let styL, styT
+
+      // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
+      if (sty.left.includes('%')) {
+        styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
+        styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
+      } else {
+        styL = +sty.left.replace(/\px/g, '')
+        styT = +sty.top.replace(/\px/g, '')
+      }
+
+      document.onmousemove = function(e) {
+        // 通过事件委托,计算移动的距离
+        const l = e.clientX - disX
+        const t = e.clientY - disY
+
+        // 移动当前元素
+        dragDom.style.left = `${l + styL}px`
+        dragDom.style.top = `${t + styT}px`
+
+        // 将此时的位置传出去
+        // binding.value({x:e.pageX,y:e.pageY})
+      }
+
+      document.onmouseup = function(e) {
+        document.onmousemove = null
+        document.onmouseup = null
+      }
+    }
+  }
+})

+ 1 - 1
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -2585,7 +2585,7 @@
       // 多选框选中数据
       handleSelectionChange(selection) {
         this.ids = selection.map((item) => item.fId)
-        this.single = selection.length !== 1
+        this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6
         this.multiple = !selection.length
       },
       /** 新增按钮操作 */

+ 583 - 73
src/views/warehouseBusiness/inStock/index.vue

@@ -257,11 +257,72 @@
         >导入
         </el-button>
       </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
+      <div class="tabSetting">
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
     </el-row>
+    <el-dialog title="提示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
 
     <el-table
       v-loading="loading"
@@ -271,7 +332,19 @@
     >
       <el-table-column type="selection" width="60" fixed align="center" />
       <el-table-column type="index" label="行号" align="center" fixed/>
-      <el-table-column  label="制单人" align="center" prop="createBy" fixed/>
+<!--      <el-table-column-->
+<!--        v-for="(item, index) in getRowList"-->
+<!--        :key="index"-->
+<!--        :label="item.name"-->
+<!--        :width="item.width"-->
+<!--        :fixed="item.fixed"-->
+<!--        :prop="item.label"-->
+<!--        sortable-->
+<!--        align="center"-->
+<!--        :show-overflow-tooltip="true"-->
+<!--      />-->
+
+            <el-table-column  label="制单人" align="center" prop="createBy" fixed/>
       <el-table-column width="100" label="入库状态" fixed sortable align="center" prop="fItemsStatus">
         <template slot-scope="scope">
           <span v-if="scope.row.fItemsStatus === 1">计划</span>
@@ -370,8 +443,20 @@
       :show-close="closeButton"
       :before-close="handleClose"
       width="80%"
+      :fullscreen="dialogFull"
       append-to-body
     >
+      <template slot="title">
+        <div class="avue-crud__dialog__header">
+            <span class="el-dialog__title">
+            <span style="display:inline-block;background-color: #3478f5;width:3px;height:20px;margin-right:5px; float: left;margin-top:2px"></span>
+            </span>
+          <div class="avue-crud__dialog__menu" @click="dialogFull?dialogFull=false:dialogFull=true">
+            <i class="el-icon-full-screen"></i>
+          </div>
+        </div>
+      </template>
+
       <el-form ref="form" :model="form" :rules="rules" label-width="120px">
         <el-row>
           <el-col :span="8">
@@ -626,7 +711,7 @@
                 v-model="form.fBusinessType"
                 filterable
                 @change="educationChange"
-                :disabled="contrOl"
+                :disabled="contrOl || browseStatus"
               >
                 <el-option
                   v-for="(dict) in businessTypeOption"
@@ -645,7 +730,7 @@
                 :remote-method="flabourRemoteMethod"
                 filterable
                 remote
-                :disabled="contrOl"
+                :disabled="contrOl || browseStatus"
                 placeholder="请输入劳务公司">
                 <el-option
                   v-for="(dict, index) in fCompanyOptIons"
@@ -670,7 +755,7 @@
                 filterable
                 remote
                 :remote-method="fleetRemoteMethod"
-                :disabled="contrOl"
+                :disabled="contrOl || browseStatus"
                 placeholder="请输入车队">
                 <el-option
                   v-for="(dict, index) in fleetOptions"
@@ -2546,7 +2631,7 @@
           <tr>
             <td width="100">{{ form.fMblno }}</td>
             <td width="100">{{ form.fProductName }}</td>
-            <td width="100">{{ dataList.fCntrtype }}</td>
+            <td width="100">{{ fCntrtype }}</td>
             <td width="100">{{ form.fMarks }}</td>
             <td width="100">包</td>
             <td width="100">吨</td>
@@ -2870,80 +2955,360 @@ import {
   delWarehousebills,
   addWarehousebills,
   addWarehouse,
-  updateWarehousebills,
   exportWarehousebills,
   revoke,
   revokeTwo,
   serialNumber
 } from "@/api/warehouseBusiness/warehouseInStock";
-import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
+import { operationAgreement } from "@/api/agreement/agreement";
 import { listCorps } from "@/api/basicdata/corps";
-
 import { listFees, getFees } from "@/api/basicdata/fees";
-
 import {listWarehouse, treeselect , listWarehousesss } from "@/api/basicdata/warehouse";
 import { listGoods } from "@/api/basicdata/goods";
-
-
 import { listUser, queryUserVal } from "@/api/system/user";
-import UploadFile from "@/components/Uploadfile";
-import AddOrUpdate from "@/views/viewApproval";
 import ApprovalComments from "@/views/startApproval";
-import { getCharge } from '@/api/finance/charge'
 import Global from '@/layout/components/global';
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getToken } from '@/utils/auth'
+import Cookies from 'js-cookie'
+import { addSet, select } from '@/api/system/set'
+import draggable from "vuedraggable";
+import Vue from 'vue'
 export default {
   name: "Warehousebills",
   components: {
-    UploadFile,
-    AddOrUpdate,
+    draggable,
     ApprovalComments,
     Treeselect
   },
   data() {
     return {
+      //全屏放大
+      dialogFull:false,
+      //自定义列宽属性
+      drag: false,
+      setRowList: [
+        {
+          surface: "1",
+          label: "createBy",
+          name: "制单人",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "fItemsStatus",
+          name: "入库状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "fBsdate",
+          name: "入库日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "入库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "入库毛重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight",
+          name: "入库净重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "13",
+          label: "fTruckno",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "14",
+          label: "fDriverName",
+          name: "司机名称",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "15",
+          label: "fDriverTel",
+          name: "司机电话",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "16",
+          label: "fDriverIdCar",
+          name: "司机身份证",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "17",
+          label: "fBusinessType",
+          name: "业务类别",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "18",
+          label: "fBillstatus",
+          name: "费用状态",
+          checked: 0,
+          width: null,
+        },
+      ],
+      getRowList: [
+        {
+          surface: "1",
+          label: "createBy",
+          name: "制单人",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "fItemsStatus",
+          name: "入库状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "fBsdate",
+          name: "入库日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "入库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "入库毛重(KG)",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight",
+          name: "入库净重(KG)",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "13",
+          label: "fTruckno",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "14",
+          label: "fDriverName",
+          name: "司机名称",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "15",
+          label: "fDriverTel",
+          name: "司机电话",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "16",
+          label: "fDriverIdCar",
+          name: "司机身份证",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "17",
+          label: "fBusinessType",
+          name: "业务类别",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "18",
+          label: "fBillstatus",
+          name: "费用状态",
+          checked: 0,
+          width: null,
+        },
+      ],
+      allCheck: false,
+      showSetting:false,
+      //附件明细上传属性
       headers: {
         Authorization: 'Bearer ' + getToken()
       },
       uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
+      //打印更改公司名称
       company:'',
+      //打印单流水号
       fSerialNumber:'',
+      //收付款费用名称字典表
       fDNameOptions:[],
       fCNameOptions:[],
+      //打印单业务类型
       businessType:'',
+      //打印单地址
       dataListFaddr:'',
+      //树状图下拉仓库
       information:'',
+      //树状图下拉仓库id
       informationId:'',
+      //树状图下拉仓库下标
       inDex:'',
+      //从表弹窗插值
       Warehouse:'',
+      //仓库弹窗名字
       treeselectList:{
         fWarehouselocid:null
       },
-      // 部门树选项
+      // 仓库树选项
       fWarehouseidOptions:[],
-      fWarehouseIdOptions:[],
-      fWarehouseidOption:[],
+      //从表折点默认展开第一项
       activeNames:['1'],
+      //车队劳务公司正则
       isrequired:2,
       isrequired_s:2,
+      //首页跳转审批取消按钮属性
       approval:[],
+      //作业费页签显示隐藏属性
       Navigation: false,
+      //撤销审批禁止操作属性
       doNot:false,
       // 修改查看状态
       browseStatus: false,
+      //作业费查询的id
       key_id:'',
+      //作业类型、劳务公司、车队禁止操作属性
       contrOl:false,
       // 审批状态控制
       approvalStatus: false,
+      //主表展开隐藏属性
       detailsHidden: false,
-      warehousingagreement: false,
+      //关闭作业费导入弹窗
       warehousingagreements: false,
+      //打印作业单以后禁止操作
       formBrowseStatus: false,
+      //打印单车号
       fTruckno: "",
+      //打印单日期
       fBsdates: "",
+      //打印单提单号
       fMblno:"",
+      //打印单箱型
       fCntrtype: "",
       fGoodsids: "",
       fPlaNnumber: "",
@@ -3113,7 +3478,6 @@ export default {
         fCreateby: null,
         fCreatetime: null,
         fGoodsid: null,
-        fCntrtype: null,
         fCntqty: null,
       },
       planningList: {
@@ -3183,64 +3547,46 @@ export default {
     this.getDicts("storage_type").then((response) => {
       if (response.data){
         this.fStorageTypeOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("data_trademodes").then((response) => {
       if (response.data){
         this.fTrademodeidOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("data_stltype_type").then((response) => {
       if (response.data){
         this.fStltypeOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("tax_rate").then((response) => {
       if (response.data){
         this.fTaxrate = response.data[0].dictValue;
-      }else {
-        return
       }
     });
     this.getDicts("data_ifweigh_status").then((response) => {
       if (response.data){
         this.fIfweighOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("data_ifpledge_status").then((response) => {
       if (response.data){
         this.fIfpledgeOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("data_unitfees").then((response) => {
       if (response.data){
         this.fFeetunitOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("data_unitfees").then((response) => {
       if (response.data){
         this.jFeetunitOptions = response.data;
-      }else {
-        return
       }
     });
     this.getDicts("st_in_type").then((response) => {
       if (response.data){
         this.businessTypeOption = response.data;
-      }else {
-        return
       }
     });
     treeselect().then(response => {
@@ -3248,15 +3594,87 @@ export default {
     })
     this.warehousesssMethod()
     this.company = localStorage.getItem('companyName')
+    this.getRow();
   },
   activated() {
     this.adoPt()
   },
   methods: {
+    full(e){
+      // console.log(document.body.clientWidth)
+      // console.log(document.documentElement.clientWidth)
+      console.log(e.clientX,e.clientY)
+      console.log(this.offset.Left)
+
+
+    },
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "入库",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "入库",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    //附件删除
     deleteFile(scope){
       this.relevantAttachments[scope.$index].fName = ''
       this.relevantAttachments[scope.$index].fUrl = ''
+      if(this.relevantAttachments[scope.$index].fUrl === ''){
+        this.$message.success("删除成功")
+      }else{
+        this.$message.error("未知错误,删除失败")
+      }
     },
+    //附件查看
     checkFile(scope){
 
       if(this.relevantAttachments[scope.$index].fUrl){
@@ -3265,11 +3683,14 @@ export default {
         this.$message.error("请上传附件")
       }
     },
+    //附件上传
     handleSucces(scope,res,file){
       this.relevantAttachments[scope.$index].fName = res.fileName
       this.relevantAttachments[scope.$index].fUrl = res.url
       if(this.relevantAttachments[scope.$index].fUrl === ''){
         this.$message.error('上传失败')
+      }else{
+        this.$message.success("上传成功")
       }
     },
     //合计
@@ -3326,7 +3747,7 @@ export default {
       this.choiceWarehouse = true
       treeselect(this.form.fWarehouseid).then(response => {
         this.fWarehouseidOptions = response.data;
-        this.fWarehouseidOption = response.data;
+        // this.fWarehouseidOption = response.data;
       })
       this.Warehouse = this.dataList[this.inDex].fWarehouseInformation
     },
@@ -3363,6 +3784,7 @@ export default {
     adoPt(){
       this.approval = this.$route.query.data
       if (this.approval){
+        console.log("111")
         let queryParams = { pageNum: 1, pageSize: 10, fDc:'C'};
         listFees(queryParams).then((response) => {
           this.fCNameOptions = response.rows;
@@ -3571,26 +3993,26 @@ export default {
         createTime: Date.parse(new Date()),
       });
     },
-    // 新增作业费协议
-    addAgreement() {
-      if (!this.form.fCorpid) {
-        this.$message({
-          message: "请维护货权方",
-          type: "warning",
-        });
-      }else if(this.form.fProductName == undefined) {
-        this.$message({
-          message: "请维护入库明细品名",
-          type: "warning",
-        });
-      }else {
-        this.whgenlegList = [];
-        this.dialogWhgenlegList = [];
-        this.whgenlegTotal = 0;
-        this.warehousingagreement = true;
-        this.getWhgenlegList();
-      }
-    },
+    // // 新增收款作业费协议
+    // addAgreement() {
+    //   if (!this.form.fCorpid) {
+    //     this.$message({
+    //       message: "请维护货权方",
+    //       type: "warning",
+    //     });
+    //   }else if(this.form.fProductName == undefined) {
+    //     this.$message({
+    //       message: "请维护入库明细品名",
+    //       type: "warning",
+    //     });
+    //   }else {
+    //     this.whgenlegList = [];
+    //     this.dialogWhgenlegList = [];
+    //     this.whgenlegTotal = 0;
+    //     this.warehousingagreements = true;
+    //     this.getWhgenlegList();
+    //   }
+    // },
     // 新增付款作业费协议
     addAgreements(kye) {
       if (!this.form.fCorpid) {
@@ -3643,6 +4065,7 @@ export default {
             (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
           this.$set(this.Printinglist[aorp], "fBsdate", Y + M + D);
         }
+        this.fCntrtype = this.Printinglist[0].fCntrtype
         this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
         this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
         for (let corp in this.fMblnoOptions) {
@@ -3675,7 +4098,7 @@ export default {
         for (let li in this.Printinglist) {
           if (this.dataListSelection.length > 0) {
             this.fTruckno = this.dataListSelection[0].fTruckno;
-            this.fCntrtype = this.dataListSelection[0].fCntrtype;
+            // this.fCntrtype = this.dataListSelection[0].fCntrtype;
             this.fGoodsids = this.dataListSelection[0].fGoodsids;
             this.fPackagespecs = this.dataListSelection[0].fPackagespecs;
             var date = new Date(this.dataListSelection[0].fBsdate);
@@ -3790,7 +4213,7 @@ export default {
               }
             }
           this.fTruckno = this.dataWithdrawList[0].fTruckno
-          this.fCntrtype = this.dataWithdrawList[0].fCntrtype
+          // this.fCntrtype = this.dataWithdrawList[0].fCntrtype
           this.fGoodsids = this.dataWithdrawList[0].fGoodsids
           this.fDriverTel = this.dataWithdrawList[0].fDriverTel
           this.fPackagespecs = this.dataWithdrawList[0].fPackagespecs
@@ -3810,7 +4233,7 @@ export default {
             }
           }
           this.fTruckno = this.dataListSelection[0].fTruckno
-          this.fCntrtype = this.dataListSelection[0].fCntrtype
+          // this.fCntrtype = this.dataListSelection[0].fCntrtype
           this.fGoodsids = this.dataListSelection[0].fGoodsids
           this.fDriverTel = this.dataListSelection[0].fDriverTel
           this.fPackagespecs = this.dataListSelection[0].fPackagespecs
@@ -3827,7 +4250,6 @@ export default {
         this.fBstime = this.form.fBstime
         if(!this.dataListSelection[0].fSerialNumber){
           serialNumber().then(response =>{
-            console.log(response)
             this.fSerialNumber = response.data.fSerialNumber
           })
         }else{
@@ -3841,7 +4263,6 @@ export default {
       } else {
         this.$message.error('请选择需要打印的明细!')
       }
-      console.log(this.Printinglist)
     },
     // 收款信息新行
     addCollection() {
@@ -4151,7 +4572,6 @@ export default {
       this.browseStatus = false
       this.approvalStatus = false
       this.detailsHidden = false
-      this.warehousingagreement = false
       this.warehousingagreements = false
       this.formBrowseStatus = false
       this.editDialogVisible_s = false
@@ -4249,7 +4669,7 @@ export default {
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map((item) => item.fId);
-      this.single = selection.length !== 1;
+      this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6;
       this.multiple = !selection.length;
     },
     // 库存明细多选
@@ -4337,7 +4757,6 @@ export default {
       this.dataList = []
       this.reset()
       this.browseStatus = status;
-      this.contrOl = status;
       this.detailsHidden = false;
       this.formBrowseStatus = false;
       const fId = row.fId || this.ids;
@@ -4434,7 +4853,6 @@ export default {
       queryUserVal().then((response)=>{
         this.current = response.user.userName
       })
-
     },
     // 库存总账多选框
     whgenlegSelectionChange(selection) {
@@ -5492,6 +5910,26 @@ export default {
 };
 </script>
 <style lang="scss">
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
 .juzhong > th {
   text-align: center;
 }
@@ -5531,4 +5969,76 @@ export default {
     z-index: 2;
   }
 }
+//::-webkit-scrollbar {
+//  width: 0 !important;
+//}
+.scrollBar {
+  .abow_dialog {
+    display: flex;
+    justify-content: center;
+    align-items: Center;
+    overflow: hidden;
+
+    .el-dialog {
+      margin: 0 auto !important;
+      height: 90%;
+      overflow: hidden;
+
+      .el-dialog__body {
+        position: absolute;
+        left: 0;
+        top: 54px;
+        bottom: 0;
+        right: 0;
+        padding: 0;
+        z-index: 1;
+        overflow: hidden;
+        overflow-y: auto;
+      }
+    }
+  }
+}
+
+/*  dialog*/
+.el-dialog__header {
+  padding: 15px 20px 15px;
+}
+.el-dialog__headerbtn{
+  top: 15px;
+}
+
+/*dialog header*/
+.el-dialog__header{
+  background: #e3eaed;
+}
+.avue-crud__dialog__header {
+  display: -webkit-box;
+  display: -ms-flexbox;
+  display: flex;
+  -webkit-box-align: center;
+  -ms-flex-align: center;
+  align-items: center;
+  -webkit-box-pack: justify;
+  -ms-flex-pack: justify;
+  justify-content: space-between;
+}
+.el-dialog__title {
+  color: rgba(0,0,0,.85);
+  font-weight: 500;
+  word-wrap: break-word;
+}
+.avue-crud__dialog__menu {
+  padding-right: 20px;
+  float: left;
+}
+.avue-crud__dialog__menu i {
+  color: #909399;
+  font-size: 15px;
+}
+.el-icon-full-screen{
+  cursor: pointer;
+}
+.el-icon-full-screen:before {
+  content: "\e719";
+}
 </style>

+ 435 - 52
src/views/warehouseBusiness/outStock/index.vue

@@ -244,11 +244,73 @@
           >导入
         </el-button>
       </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
+      <div class="tabSetting">
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
     </el-row>
+    <el-dialog title="提示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+
     <el-table
       v-loading="loading"
       :data="warehousebillsList"
@@ -258,14 +320,7 @@
       <el-table-column type="selection" width="60" fixed align="center" />
       <el-table-column type="index" label="行号" fixed align="center" />
       <el-table-column  label="制单人" align="center" prop="createBy" fixed/>
-      <el-table-column
-        width="100"
-        label="出库状态"
-        fixed
-        sortable
-        align="center"
-        prop="fItemsStatus"
-      >
+      <el-table-column width="100" label="出库状态" fixed sortable align="center" prop="fItemsStatus">
         <template slot-scope="scope">
           <span v-if="scope.row.fItemsStatus === 1">计划</span>
           <span v-if="scope.row.fItemsStatus === 2">卸货中</span>
@@ -273,28 +328,22 @@
           <span v-if="scope.row.fItemsStatus === 4">已出库</span>
         </template>
       </el-table-column>
+<!--      <el-table-column-->
+<!--        v-for="(item, index) in getRowList"-->
+<!--        :key="index"-->
+<!--        :label="item.name"-->
+<!--        :width="item.width"-->
+<!--        :prop="item.label"-->
+<!--        align="center"-->
+<!--        :fixed="item.fixed"-->
+<!--      />-->
 
-      <el-table-column
-        width="220"
-        label="货权方"
-        fixed
-        sortable
-        align="center"
-        prop="fCorpid"
-      />
+      <el-table-column width="220" label="货权方" fixed sortable align="center" prop="fCorpid"/>
       <el-table-column label="提单号" sortable width="216" align="center" prop="fMblno" fixed show-overflow-tooltip/>
       <el-table-column label="品名" :show-overflow-tooltip="true" fixed align="ceter" prop="fProductName" />
       <el-table-column label="品牌" align="center" fixed prop="fMarks" />
-      <el-table-column
-        label="出库日期"
-        align="center"
-        fixed
-        sortable
-        prop="createTime"
-        style="width: 60%"
-        width="100"
-        show-overflow-tooltip
-      ><template slot-scope="scope">
+      <el-table-column label="出库日期" align="center" fixed sortable prop="createTime" style="width: 60%" width="100" show-overflow-tooltip>
+        <template slot-scope="scope">
         <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
       </template>
       </el-table-column>
@@ -308,12 +357,7 @@
       <el-table-column label="司机电话" align="center" prop="fDriverTel" width="120" show-overflow-tooltip/>
       <el-table-column label="司机身份证" align="center" prop="fDriverIdCar" width="180" show-overflow-tooltip/>
       <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
-      <el-table-column
-        width="100"
-        label="费用状态"
-        align="center"
-        prop="fBillstatus"
-      >
+      <el-table-column width="100" label="费用状态" align="center" prop="fBillstatus">
         <template slot-scope="scope">
           <span v-if="scope.row.fBillstatus === 1">录入</span>
           <span v-if="scope.row.fBillstatus === 2">录入</span>
@@ -2206,7 +2250,7 @@
         >请核</el-button
         >
         <el-button type="danger" v-if="form.fBillstatus === 6" @click="revoke">撤销请核</el-button>
-        <el-button type="danger" v-if="form.fBillstatus === 4 && current === before" :disabled="doNot" @click="revokeTwo">撤销请核</el-button>
+        <el-button type="danger" v-if="form.fBillstatus === 4 && current === before" :disabled="doNot" @click="revokeTwo">撤销审批</el-button>
         <el-button @click="cancelTwo" v-if="approVal === true">取 消</el-button>
         <el-button @click="cancel" v-else>取 消</el-button>
       </div>
@@ -2819,33 +2863,288 @@ import { listCorps } from "@/api/basicdata/corps";
 import { listFees, getFees } from "@/api/basicdata/fees";
 
 import { listWarehouse, listWarehousesss, treeselect } from '@/api/basicdata/warehouse'
-
 import { listArea } from "@/api/basicdata/area";
-
 import { listGoods } from "@/api/basicdata/goods";
-
 import { listUser, queryUserVal } from "@/api/system/user";
-
-import UploadFile from "@/components/Uploadfile";
-
 import { listWhgenleg } from "@/api/reportManagement/whgenleg";
 import Global from '@/layout/components/global'
-import AddOrUpdate from "@/views/viewApproval";
 import ApprovalComments from '@/views/startApproval'
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getToken } from '@/utils/auth'
-
+import Cookies from 'js-cookie'
+import { addSet, select } from '@/api/system/set'
+import draggable from "vuedraggable";
 export default {
   name: "Warehousebills",
   components: {
-    UploadFile,
-    AddOrUpdate,
+    draggable,
     ApprovalComments,
     Treeselect
   },
   data() {
     return {
+      drag: false,
+      setRowList: [
+        // {
+        //   surface: "1",
+        //   label: "createBy",
+        //   name: "制单人",
+        //   checked: 0,
+        //   width: null,
+        // },
+        // {
+        //   surface: "2",
+        //   label: "fItemsStatus",
+        //   name: "出库状态",
+        //   checked: 0,
+        //   width: null,
+        // },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "fBsdate",
+          name: "出库日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "出库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "出库毛重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight",
+          name: "出库净重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "13",
+          label: "fTruckno",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "14",
+          label: "fDriverName",
+          name: "司机名称",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "15",
+          label: "fDriverTel",
+          name: "司机电话",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "16",
+          label: "fDriverIdCar",
+          name: "司机身份证",
+          checked: 0,
+          width: null,
+        },
+        // {
+        //   surface: "17",
+        //   label: "fBusinessType",
+        //   name: "业务类别",
+        //   checked: 0,
+        //   width: null,
+        // },
+        // {
+        //   surface: "18",
+        //   label: "fBillstatus",
+        //   name: "费用状态",
+        //   checked: 0,
+        //   width: null,
+        // },
+      ],
+      getRowList: [
+        // {
+        //   surface: "1",
+        //   label: "createBy",
+        //   name: "制单人",
+        //   checked: 0,
+        //   fixed:'fixed',
+        //   width: null,
+        // },
+        // {
+        //   surface: "2",
+        //   label: "fItemsStatus",
+        //   name: "出库状态",
+        //   checked: 0,
+        //   width: null,
+        // },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "fBsdate",
+          name: "出库日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "出库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "出库毛重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight",
+          name: "出库净重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "13",
+          label: "fTruckno",
+          name: "车号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "14",
+          label: "fDriverName",
+          name: "司机名称",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "15",
+          label: "fDriverTel",
+          name: "司机电话",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "16",
+          label: "fDriverIdCar",
+          name: "司机身份证",
+          checked: 0,
+          width: null,
+        },
+        // {
+        //   surface: "17",
+        //   label: "fBusinessType",
+        //   name: "业务类别",
+        //   checked: 0,
+        //   width: null,
+        // },
+        // {
+        //   surface: "18",
+        //   label: "fBillstatus",
+        //   name: "费用状态",
+        //   checked: 0,
+        //   width: null,
+        // },
+      ],
+      allCheck: false,
+      showSetting:false,
       headers: {
         Authorization: 'Bearer ' + getToken()
       },
@@ -3150,7 +3449,6 @@ export default {
       this.jFeetunitOptions = response.data;
     });
     this.getDicts("st_out_type").then((response) => {
-      console.log(response)
       this.businessTypeOption = response.data;
     });
     this.getDicts("sys_car_type").then((response) => {
@@ -3167,28 +3465,95 @@ export default {
     })
     this.warehousesssMethod()
     this.company = localStorage.getItem('companyName')
+    this.getRow();
   },
   activated() {
     this.adoPt()
   },
   methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "计划下达",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "计划下达",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+
+    //附件删除
     deleteFile(scope){
       this.relevantAttachments[scope.$index].fName = ''
       this.relevantAttachments[scope.$index].fUrl = ''
+      if(this.relevantAttachments[scope.$index].fUrl === ''){
+        this.$message.success("删除成功")
+      }else{
+        this.$message.error("未知错误,删除失败")
+      }
     },
+    //附件查看
     checkFile(scope){
-
       if(this.relevantAttachments[scope.$index].fUrl){
         window.open(this.relevantAttachments[scope.$index].fUrl)
       }else{
         this.$message.error("请上传附件")
       }
     },
+    //附件上传
     handleSucces(scope,res,file){
       this.relevantAttachments[scope.$index].fName = res.fileName
       this.relevantAttachments[scope.$index].fUrl = res.url
       if(this.relevantAttachments[scope.$index].fUrl === ''){
         this.$message.error('上传失败')
+      }else{
+        this.$message.success("上传成功")
       }
     },
     //合计
@@ -3913,7 +4278,6 @@ export default {
         }, 200);
         if(!this.dataListSelection[0].fSerialNumber){
           serialNumber().then(response =>{
-            console.log(response)
             this.fSerialNumber = response.data.fSerialNumber
           })
         }else{
@@ -4079,7 +4443,6 @@ export default {
       this.whgenlegParams.fWarehouseid = this.form.fWarehouseid;
       this.whgenlegParams.fTrademodeid = this.form.fTrademodeid;
       listWhgenleg(this.whgenlegParams).then((response) => {
-        console.log(response)
         this.whgenlegList = response.rows;
         this.whgenlegTotal = response.total;
       });
@@ -4220,7 +4583,7 @@ export default {
     handleSelectionChange(selection) {
       this.ids = selection;
       // this.ids = selection.map((item) => item.fId);
-      this.single = selection.length !== 1;
+      this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6;
       this.multiple = !selection.length;
     },
     // 库存总账多选框
@@ -5358,4 +5721,24 @@ export default {
     z-index: 2;
   }
 }
+.tabSetting {
+  display: flex;
+  justify-content: flex-end;
+}
+.listStyle {
+  display: flex;
+  border-top: 1px solid #dcdfe6;
+  border-left: 1px solid #dcdfe6;
+  border-right: 1px solid #dcdfe6;
+}
+.listStyle:last-child {
+  border-bottom: 1px solid #dcdfe6;
+}
+.progress {
+  display: flex;
+  align-items: center;
+  padding: 2px;
+  background-color: rgba(0, 0, 0, 0.05);
+  height: 100%;
+}
 </style>

+ 409 - 83
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -245,11 +245,73 @@
           >导入
         </el-button>
       </el-col>
-      <right-toolbar
-        :showSearch.sync="showSearch"
-        @queryTable="getList"
-      ></right-toolbar>
+      <div class="tabSetting">
+        <right-toolbar
+          :showSearch.sync="showSearch"
+          @queryTable="getList"
+        ></right-toolbar>
+        <div style="margin: 0 12px">
+          <el-button
+            icon="el-icon-setting"
+            size="mini"
+            circle
+            @click="showSetting = !showSetting"
+          ></el-button>
+        </div>
+      </div>
     </el-row>
+    <el-dialog title="提示" :visible.sync="showSetting" width="700px">
+      <div>配置排序列数据(拖动调整顺序)</div>
+      <div style="margin-left: 17px">
+        <el-checkbox
+          v-model="allCheck"
+          label="全选"
+          @change="allChecked"
+        ></el-checkbox>
+      </div>
+      <div style="padding: 4px; display: flex; justify-content: center">
+        <draggable
+          v-model="setRowList"
+          group="site"
+          animation="300"
+          @start="onStart"
+          @end="onEnd"
+          handle=".indraggable"
+        >
+          <transition-group>
+            <div
+              v-for="item in setRowList"
+              :key="item.surface"
+              class="listStyle"
+            >
+              <div style="width: 500px" class="indraggable">
+                <div class="progress" :style="{ width: item.width + 'px' }">
+                  <el-checkbox
+                    :label="item.name"
+                    v-model="item.checked"
+                    :true-label="0"
+                    :false-label="1"
+                  >{{ item.name }}
+                  </el-checkbox>
+                </div>
+              </div>
+              <el-input-number
+                v-model.number="item.width"
+                controls-position="right"
+                :min="1"
+                :max="500"
+                size="mini"
+              ></el-input-number>
+            </div>
+          </transition-group>
+        </draggable>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="showSetting = false">取 消</el-button>
+        <el-button type="primary" @click="save()">确 定</el-button>
+      </span>
+    </el-dialog>
+
     <el-table
       v-loading="loading"
       :data="warehousebillsList"
@@ -258,74 +320,51 @@
     >
       <el-table-column type="selection" width="60" fixed align="center" />
       <el-table-column type="index" label="行号" fixed align="center" />
-      <el-table-column  label="制单人" align="center" prop="createBy" fixed/>
-      <el-table-column
-        width="100"
-        fixed
-        sortable
-        label="调拨状态"
-        align="center"
-        prop="fItemsStatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fItemsStatus === 1">计划</span>
-          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>
-          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>
-          <span v-if="scope.row.fItemsStatus === 4">已调拨</span>
-        </template>
-      </el-table-column>
-
-      <el-table-column
-        width="220"
-        label="货权方"
-        fixed
-        sortable
-        align="center"
-        prop="fCorpid"
-      />
-      <el-table-column label="提单号" sortable fixed width="216" align="center" prop="fMblno" show-overflow-tooltip/>
-      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
-      <el-table-column label="品牌" fixed align="center" prop="fMarks" />
-      <el-table-column
-        label="调拨日期"
-        align="center"
-        fixed
-        sortable
-        prop="createTime"
-        width="100"
-        ><template slot-scope="scope">
-          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="调入仓库" sortable fixed align="center" prop="fWarehouseid" width="100"/>
-      <el-table-column label="调出仓库" sortable fixed align="center" prop="fInwarehouseid" width="100"/>
-      <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>
-      <el-table-column label="调拨件数" align="center" prop="fQty" />
-      <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>
-      <el-table-column label="调拨净重(kg)" align="center" prop="fNetweight" width="100"/>
-      <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>
-
-      <el-table-column
-        width="100"
-        label="费用状态"
-        align="center"
-        prop="fBillstatus"
-      >
-        <template slot-scope="scope">
-          <span v-if="scope.row.fBillstatus === 1">录入</span>
-          <span v-if="scope.row.fBillstatus === 2">暂存</span>
-          <span v-if="scope.row.fBillstatus === 3">驳回</span>
-          <span v-if="scope.row.fBillstatus === 4">请核</span>
-          <span v-if="scope.row.fBillstatus === 5">审核中</span>
-          <span v-if="scope.row.fBillstatus === 6">全部入账</span>
-        </template>
-      </el-table-column>
-      <el-table-column
-        label="操作"
-        align="center"
-        class-name="small-padding fixed-width"
-        width="180"
-      >
+            <el-table-column
+              v-for="(item, index) in getRowList"
+              :key="index"
+              :label="item.name"
+              :width="item.width"
+              :prop="item.label"
+              align="center"
+              :fixed="item.fixed"
+            />
+<!--      <el-table-column  label="制单人" align="center" prop="createBy" fixed/>-->
+<!--      <el-table-column width="100" fixed sortable label="调拨状态" align="center" prop="fItemsStatus">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span v-if="scope.row.fItemsStatus === 1">计划</span>-->
+<!--          <span v-if="scope.row.fItemsStatus === 2">待调拨</span>-->
+<!--          <span v-if="scope.row.fItemsStatus === 3">调拨中</span>-->
+<!--          <span v-if="scope.row.fItemsStatus === 4">已调拨</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column width="220" label="货权方" fixed sortable align="center" prop="fCorpid"/>-->
+<!--      <el-table-column label="提单号" sortable fixed width="216" align="center" prop="fMblno" show-overflow-tooltip/>-->
+<!--      <el-table-column label="品名" fixed :show-overflow-tooltip="true" align="ceter" prop="fProductName" />-->
+<!--      <el-table-column label="品牌" fixed align="center" prop="fMarks" />-->
+<!--      <el-table-column label="调拨日期" align="center" fixed sortable prop="createTime" width="100">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span>{{ parseTime(scope.row.fBsdate, "{y}-{m}-{d}") }}</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+<!--      <el-table-column label="调入仓库" sortable fixed align="center" prop="fWarehouseid" width="100"/>-->
+<!--      <el-table-column label="调出仓库" sortable fixed align="center" prop="fInwarehouseid" width="100"/>-->
+<!--      <el-table-column label="计划调拨件数" align="center" prop="fPlanqty" width="100"/>-->
+<!--      <el-table-column label="调拨件数" align="center" prop="fQty" />-->
+<!--      <el-table-column label="调拨毛重(kg)" align="center" prop="fGrossweight" width="100"/>-->
+<!--      <el-table-column label="调拨净重(kg)" align="center" prop="fNetweight" width="100"/>-->
+<!--      <el-table-column label="业务类别" align="center" prop="fBusinessType" :formatter="fBusinessTypeFormat"/>-->
+<!--      <el-table-column width="100" label="费用状态" align="center" prop="fBillstatus">-->
+<!--        <template slot-scope="scope">-->
+<!--          <span v-if="scope.row.fBillstatus === 1">录入</span>-->
+<!--          <span v-if="scope.row.fBillstatus === 2">暂存</span>-->
+<!--          <span v-if="scope.row.fBillstatus === 3">驳回</span>-->
+<!--          <span v-if="scope.row.fBillstatus === 4">请核</span>-->
+<!--          <span v-if="scope.row.fBillstatus === 5">审核中</span>-->
+<!--          <span v-if="scope.row.fBillstatus === 6">全部入账</span>-->
+<!--        </template>-->
+<!--      </el-table-column>-->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="180">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -2588,7 +2627,7 @@
         <tr>
           <td width="100">{{ form.fMblno }}</td>
           <td width="100">{{ form.fProductName }}</td>
-          <td width="100">{{ dataList.fCntrtype }}</td>
+          <td width="100">{{ fCntrtype }}</td>
           <td width="100">{{ form.fMarks }}</td>
           <td width="100">包</td>
           <td width="100">吨</td>
@@ -2713,6 +2752,8 @@ import ApprovalComments from '@/views/startApproval'
 import Treeselect from '@riophae/vue-treeselect'
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getToken } from '@/utils/auth'
+import Cookies from 'js-cookie'
+import { addSet, select } from '@/api/system/set'
 
 export default {
   name: "Warehousebills",
@@ -2724,6 +2765,227 @@ export default {
   },
   data() {
     return {
+      drag: false,
+      setRowList: [
+        {
+          surface: "1",
+          label: "createBy",
+          name: "制单人",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "fItemsStatus",
+          name: "调拨状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "createTime",
+          name: "调拨日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "调入仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fInwarehouseid",
+          name: "调出仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "出库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "调拨毛重(KG)",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight(KG)",
+          name: "出库净重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "17",
+          label: "fBusinessType",
+          name: "业务类别",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "18",
+          label: "fBillstatus",
+          name: "费用状态",
+          checked: 0,
+          width: null,
+        },
+      ],
+      getRowList: [
+        {
+          surface: "1",
+          label: "createBy",
+          name: "制单人",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "2",
+          label: "fItemsStatus",
+          name: "调拨状态",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "3",
+          label: "fCorpid",
+          name: "货权方",
+          checked: 0,
+          fixed:'fixed',
+          width: null,
+        },
+        {
+          surface: "4",
+          label: "fMblno",
+          name: "提单号",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "5",
+          label: "fProductName",
+          name: "品名",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "6",
+          label: "fMarks",
+          name: "品牌",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "7",
+          label: "createTime",
+          name: "调拨日期",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fWarehouseid",
+          name: "调入仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "8",
+          label: "fInwarehouseid",
+          name: "调出仓库",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "9",
+          label: "fPlanqty",
+          name: "计划件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "10",
+          label: "fQty",
+          name: "出库件数",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "11",
+          label: "fGrossweight",
+          name: "调拨毛重(KG)",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "12",
+          label: "fNetweight(KG)",
+          name: "出库净重",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "17",
+          label: "fBusinessType",
+          name: "业务类别",
+          checked: 0,
+          width: null,
+        },
+        {
+          surface: "18",
+          label: "fBillstatus",
+          name: "费用状态",
+          checked: 0,
+          width: null,
+        },
+      ],
+      allCheck: false,
+      showSetting:false,
       headers: {
         Authorization: 'Bearer ' + getToken()
       },
@@ -3027,28 +3289,94 @@ export default {
     this.warehousesssMethod()
     this.register()
     this.company = localStorage.getItem('companyName')
+    this.getRow();
   },
   activated(){
     this.Jump()
   },
   methods: {
+    //列设置全选
+    allChecked() {
+      if (this.allCheck == true) {
+        this.setRowList.map((e) => {
+          return (e.checked = 0);
+        });
+      } else {
+        this.setRowList.map((e) => {
+          return (e.checked = 1);
+        });
+      }
+    },
+    //查询列数据
+    getRow() {
+      let that = this;
+      this.data = {
+        tableName: "调拨",
+        userId: Cookies.get("userName"),
+      };
+      select(this.data).then((res) => {
+        if (res.data.length != 0) {
+          this.getRowList = res.data.filter((e) => e.checked == 0);
+          this.setRowList = res.data;
+          this.setRowList = this.setRowList.reduce((res, item) => {
+            res.push({
+              surface: item.surface,
+              label: item.label,
+              name: item.name,
+              checked: item.checked,
+              width: item.width,
+            });
+            return res;
+          }, []);
+        }
+      });
+    },
+    //保存列设置
+    save() {
+      this.showSetting = false;
+      this.data = {
+        tableName: "调拨",
+        userId: Cookies.get("userName"),
+        sysTableSetList: this.setRowList,
+      };
+      addSet(this.data).then((res) => {
+        this.getRowList = this.setRowList.filter((e) => e.checked == 0);
+      });
+    },
+    //开始拖拽事件
+    onStart() {
+      this.drag = true;
+    },
+    //拖拽结束事件
+    onEnd() {
+      this.drag = false;
+    },
+    //附件删除
     deleteFile(scope){
       this.relevantAttachments[scope.$index].fName = ''
       this.relevantAttachments[scope.$index].fUrl = ''
+      if(this.relevantAttachments[scope.$index].fUrl === ''){
+        this.$message.success("删除成功")
+      }else{
+        this.$message.error("未知错误,删除失败")
+      }
     },
+    //附件查看
     checkFile(scope){
-
       if(this.relevantAttachments[scope.$index].fUrl){
         window.open(this.relevantAttachments[scope.$index].fUrl)
       }else{
         this.$message.error("请上传附件")
       }
     },
+    //上传附件
     handleSucces(scope,res,file){
       this.relevantAttachments[scope.$index].fName = res.fileName
       this.relevantAttachments[scope.$index].fUrl = res.url
       if(this.relevantAttachments[scope.$index].fUrl === ''){
         this.$message.error('上传失败')
+      }{
+        this.$message.success("上传成功")
       }
     },
     //合计
@@ -3105,6 +3433,7 @@ export default {
             (date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
           this.$set(this.printinglist[aorp], "fBsdate", Y + M + D);
         }
+        this.fCntrtype = this.printinglist[0].fCntrtype
         this.$set(this.form , 'sumFNetweight', parseFloat(Number(sumFNetweight) / 1000).toFixed(2))
         this.$set(this.form , 'sumFGrossweight', parseFloat(Number(sumFGrossweight) / 1000).toFixed(2))
         for (let corp in this.fMblnoOptions) {
@@ -3821,7 +4150,6 @@ export default {
       }, 200);
       if(!this.dataListSelection[0].fSerialNumber){
         serialNumber().then(response =>{
-          console.log(response)
           this.fSerialNumber = response.data.fSerialNumber
         })
       }else{
@@ -4064,7 +4392,8 @@ export default {
     handleSelectionChange(selection) {
       this.ids = selection;
       // this.ids = selection.map((item) => item.fId);
-      this.single = selection.length !== 1;
+
+      this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6;
       this.multiple = !selection.length;
     },
     // 库存总账多选框
@@ -4108,7 +4437,6 @@ export default {
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
-        console.log(response)
         this.Operator = response.data.corps[0].createBy
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
@@ -4202,7 +4530,6 @@ export default {
       this.detailsHidden = false;
       let data = row || this.ids;
       getStockTransfer(data.fId).then((response) => {
-        console.log(response)
         this.Operator = response.data.corps[0].createBy
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
@@ -4673,10 +5000,10 @@ export default {
                   this.$set(this.warehouseCrList[cr], "fFeeunitid", this.warehouseCrList[cr].fFeeunitid + '');
                 }
               }
-              if (response.data.sysUser) {
-                // this.userVal = response.data.sysUser
-                this.userOptions = response.data.sysUser;
-              }
+              // if (response.data.sysUser) {
+              //   // this.userVal = response.data.sysUser
+              //   this.userOptions = response.data.sysUser;
+              // }
               if (response.data.dept) {
                 this.deptOptions = []
                 this.deptOptions.push(response.data.dept)
@@ -4758,7 +5085,6 @@ export default {
             formData.append("warehousebillsitems", JSON.stringify(dataList));
             formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
             formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
-            console.log(dataList)
             for(let index in dataList){
               if(dataList[index].fBillstatus < 20) {
 

+ 1 - 1
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -1411,7 +1411,7 @@
       handleSelectionChange(selection) {
         this.ids = selection;
         // this.ids = selection.map((item) => item.fId);
-        this.single = selection.length !== 1;
+        this.single = selection.length !== 1 || selection.map((item) => item.fBillstatus) == 6;
         this.multiple = !selection.length;
       },
       /** 新增按钮操作 */