Browse Source

调拨菜单,货代对账列表增加快捷多选 11.20

caojunjie 1 year ago
parent
commit
bdb156af83

+ 34 - 0
src/api/tirePartsMall/salesManagement/outboundWorkOrder.js

@@ -72,3 +72,37 @@ export const getGoodsInfo = (query) => {
     params: query
   })
 }
+
+// 调拨列表
+export const transferAllocateList = (params) => {
+  return request({
+    url: '/api/blade-sales-part/transferAllocate/list',
+    method: 'get',
+    params: params
+  })
+}
+// 调拨保存
+export const transferAllocateSubmit = (data) => {
+  return request({
+    url: '/api/blade-sales-part/transferAllocate/submit',
+    method: 'POST',
+    data: data
+  })
+}
+// 确认调拨
+export const confirmTransferAllocate = (data) => {
+  return request({
+    url: '/api/blade-sales-part/transferAllocate/confirmTransferAllocate',
+    method: 'POST',
+    data: data
+  })
+}
+// 撤销调拨
+export const revokeTransferAllocate = (data) => {
+  return request({
+    url: '/api/blade-sales-part/transferAllocate/revokeTransferAllocate',
+    method: 'POST',
+    data: data
+  })
+}
+

+ 8 - 0
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -194,3 +194,11 @@ export const getZd = () => {
     method: 'get'
   })
 }
+// 调拨添加轮胎列表
+export const goodsPageDB = (params) => {
+  return request({
+    url: '/api/blade-sales-part/goodsDesc/goodsPageDB',
+    method: 'get',
+    params:params
+  })
+}

+ 4 - 0
src/enums/column-name.js

@@ -1401,6 +1401,10 @@ const columnName = [{
     code: 316,
     name: '货运代理-账单管理-付费申请'
   },
+  {
+    code: 317,
+    name: '鑫畅途-调拨L'
+  },
 ]
 export const getColumnName = (key) => {
   for (let index = 0; index < columnName.length; index++) {

+ 15 - 0
src/router/views/index.js

@@ -2853,5 +2853,20 @@ export default [{
       component: () => import( /* webpackChunkName: "views" */ '@/views/iosBasicData/CollectionSettlement/index.vue')
     }]
   },
+  // 调拨(L)
+  {
+    path: '/tirePartsMall/salesManagement/outboundWorkOrderL/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/tirePartsMall/salesManagement/outboundWorkOrderL/index',
+      name: '调拨(L)',
+      meta: {
+        i18n: '/tirePartsMall/salesManagement/outboundWorkOrderL/index',
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/salesManagement/outboundWorkOrderL/index')
+    }]
+  },
 
 ]

+ 160 - 60
src/views/iosBasicData/CollectionSettlement/assembly/finstlbillsitems.vue

@@ -1,27 +1,27 @@
 <template>
     <div>
+        <!--:row-style="{height:'20px',padding:'0px',fontSize:'12px'}"-->
         <el-table
             ref="tableRef"
-            :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
             :cell-style="{padding:'0px',fontSize:'12px'}"
             :header-cell-style="tableHeaderCellStyle"
             :data="tableData"
             border
             style="width: 100%"
             @selection-change="handleSelectionChange"
-            @mousedown="handleMouseDown"
-            @mousemove="handleMouseMove"
-            @mouseup="handleMouseUp" >
+            @row-click="rowClick"
+            :row-style="rowStyle"
+            :row-class-name="rowClassName" >
             <el-table-column
                 v-if="brfalse"
                 type="selection"
                 width="55">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
+                <!--<template slot-scope="scope">-->
+                <!--    <el-checkbox v-model="scope.row.tableSelect"-->
+                <!--                 :true-label="1" :false-label="0"-->
+                <!--                 @change="toggleSelection([scope.row])">-->
+                <!--    </el-checkbox>-->
+                <!--</template>-->
             </el-table-column>
             <el-table-column
                 prop="lineNo"
@@ -39,16 +39,16 @@
                     <span class="textHide" v-else>{{row.businessBillNo}}</span>
                 </template>
             </el-table-column>
-            <el-table-column
-                prop="tableSelect"
-                label="选择" width="50px" v-if="brfalse">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
-            </el-table-column>
+            <!--<el-table-column-->
+            <!--    prop="tableSelect"-->
+            <!--    label="选择" width="50px" v-if="brfalse">-->
+            <!--    <template slot-scope="scope">-->
+            <!--        <el-checkbox v-model="scope.row.tableSelect"-->
+            <!--                     :true-label="1" :false-label="0"-->
+            <!--                     @change="toggleSelection([scope.row])">-->
+            <!--        </el-checkbox>-->
+            <!--    </template>-->
+            <!--</el-table-column>-->
             <el-table-column
                 prop="accBillNo"
                 label="账单编号">
@@ -297,7 +297,11 @@
             brfalse:{
                 type:Boolean,
                 default:true,
-            }
+            },
+            handleSelectionData:{
+                type:Array,
+                default:[],
+            },
         },
         data(){
             return {
@@ -311,44 +315,7 @@
             this.invoicelosWorkDictsfun()
         },
         methods:{
-            // 多选选择的数据
-            handleSelectionChange(arr){
-                // 全选
-                if (arr.length == this.tableData.length) {
-                    for (let item of arr) {
-                        this.$set(item,'tableSelect',1)
-                    }
-                }
-                // 清除全选
-                if (arr.length == 0) {
-                    for (let item of this.tableData) {
-                        this.$set(item,'tableSelect',0)
-                    }
-                }
-                this.$emit('handleSelectionChange',arr)
-            },
-            // 多选
-            toggleSelection(rows){
-                if (rows) {
-                    rows.forEach(row => {
-                        this.$refs.tableRef.toggleRowSelection(row);
-                    });
-                } else {
-                    this.$refs.tableRef.clearSelection();
-                }
-            },
-            handleMouseDown(event) {
-                console.log(event,351)
-                const table = this.$refs.tableRef
-                const cell = event.target.closest('td')
-            },
-            handleMouseMove(event) {
-
-            },
-            handleMouseUp(){
-
-            },
-
+            // 币别切换
             corpChange(value,row){
                 this.$set(row,'currentStlCurCode',value)
                 row.currentStlAmountNet = Number(row.currentStlAmount) - (Number(row.currentStlAmount) * (Number(row.taxRate) + Number(row.surchargeRate)))
@@ -388,8 +355,141 @@
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
                 return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
             },
-        }
 
+            // Element UI 表格点击选中行/取消选中 快捷多选 以及快捷连续多选,高亮选中行 ——-------------------------------------——
+            // 多选选择的数据
+            handleSelectionChange(arr){
+                // // 全选
+                // if (arr.length == this.tableData.length) {
+                //     for (let item of arr) {
+                //         this.$set(item,'tableSelect',1)
+                //     }
+                // }
+                // // 清除全选
+                // if (arr.length == 0) {
+                //     for (let item of this.tableData) {
+                //         this.$set(item,'tableSelect',0)
+                //     }
+                // }
+                this.$emit('handleSelectionChange',arr)
+            },
+            // // 多选
+            // toggleSelection(rows){
+            //     if (rows) {
+            //         rows.forEach(row => {
+            //             this.$refs.tableRef.toggleRowSelection(row);
+            //         });
+            //     } else {
+            //         this.$refs.tableRef.clearSelection();
+            //     }
+            // },
+            // 监听点击表格事件
+            rowClick(row, column, event) {
+                let refsElTable = this.$refs.tableRef; // 获取表格对象
+                if (this.CtrlDown) {
+                    refsElTable.toggleRowSelection(row); // ctrl多选 如果点击两次同样会取消选中
+                    return;
+                }
+                if ( this.shiftOrAltDown && this.handleSelectionData.length > 0) {
+                    // 通过rowIndex判断已选择的行中最上面和最下面的是哪行,再对比按住shift/alt点击的当前行得到新的最上面和最下面的行,把这两行中间的行进行循环选中。
+                    let topAndBottom = this.getTopAndBottom(  row, this.bottomSelectionRow, this.topSelectionRow );
+                    refsElTable.clearSelection(); //先清空 不然会导致在这两行中间之外的行状态不变
+                    for (let index = topAndBottom.top; index <= topAndBottom.bottom; index++) { //选中两行之间的所有行
+                        refsElTable.toggleRowSelection(this.tableData[index], true);
+                    }
+                } else {
+                    let findRow = this.handleSelectionData.find(c => c.rowIndex == row.rowIndex); //找出当前选中行
+                    //如果只有一行且点击的也是这一行则取消选择 否则清空再选中当前点击行
+                    if (findRow&& this.handleSelectionData.length === 1 ) {
+                        refsElTable.toggleRowSelection(row, false);
+                        return;
+                    }
+                    // refsElTable.clearSelection(); // 清空之前选择的数据(如果放开,选择之前会变成单选)
+                    refsElTable.toggleRowSelection(row); // 调用选中行方法
+                }
+            },
+            // 行的 style 的回调方法
+            rowStyle({row,rowIndex}) {
+                // 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象
+                // object: 要添加或者修改属性的目标对象;prop: 要定义或修改属性的名称;descript: 是一个对象,里面是我们上述的对象属性的特性;
+                Object.defineProperty(row, 'rowIndex', { //给每一行添加不可枚举属性rowIndex来标识当前行
+                    value: rowIndex, // 设置age的值,不设置的话默认为undefined
+                    writable: true, // 表示属性的值true可以修改,false不可以被修改
+                    enumerable: false, // 设置为false表示不能通过 for-in 循环返回
+                    // configurable: false, // configurable 设置为 false,意味着这个属性不能从对象上删除
+                })
+            },
+            keyDown(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = true;
+                if (key == 16 || key == 18) this.shiftOrAltDown = true;
+            },
+            keyUp(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = false;
+                if (key == 16 || key == 18) this.shiftOrAltDown = false;
+            },
+            // 文章说明 https://www.jianshu.com/p/48f2c522d2a2
+            getTopAndBottom(row, bottom, top){
+                let n = row.rowIndex,
+                    mx = bottom.rowIndex,
+                    mi = top.rowIndex;
+                if (n > mx) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mx && n > mi) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mi) {
+                    return {
+                        top: n,
+                        bottom: mx
+                    };
+                } else if (n == mi || n == mx) {
+                    return {
+                        top: mi,
+                        bottom: mx
+                    };
+                }
+            },
+            // 给选中行加上current-row这个class类,所以要使用row-class-name这个属性(其实给每一行添加rowIndex也可以用这个属性),
+            // 判断方式也是通过判断rowIndex对比
+            rowClassName({ row,  rowIndex }) {
+                let rowName = "",
+                    findRow = this.handleSelectionData.find(c => c.rowIndex === row.rowIndex);
+                if (findRow) {
+                    rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+                }
+                return rowName; //也可以再加上其他类名 如果有需求的话
+            },
+        },
+        mounted() {
+            // 按住ctrl实现多选 设置监听keydown事件,以及keyup事件,
+            addEventListener("keydown", this.keyDown, false);
+            addEventListener("keyup", this.keyUp, false);
+        },
+        beforeDestroy() { //解绑
+            removeEventListener("keydown", this.keyDown);
+            removeEventListener("keyup", this.keyUp);
+        },
+        computed: { //实时得到最上行和最下行
+            bottomSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex > end.rowIndex ? start : end;
+                });
+            },
+            topSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex < end.rowIndex ? start : end;
+                });
+            }
+        },
     }
 </script>
 

+ 13 - 6
src/views/iosBasicData/CollectionSettlement/finstlbillsDetails.vue

@@ -399,7 +399,10 @@
 
                 <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                     <el-tab-pane label="核销明细" name="first">
-                        <finstlbillsitems :tableData="tableData" @handleSelectionChange="handleSelectionChange"></finstlbillsitems>
+                        <finstlbillsitems :tableData="tableData"
+                                          :handleSelectionData="handleSelectionData"
+                                          @handleSelectionChange="handleSelectionChange">
+                        </finstlbillsitems>
                     </el-tab-pane>
                     <el-tab-pane label="凭证明细" name="second">凭证明细</el-tab-pane>
                 </el-tabs>
@@ -522,10 +525,12 @@
                     this.$message.warning('请选择业务类型');
                     return
                 }
-                // 是否选择从表数据
-                if (this.handleSelectionData.length == 0) {
-                    this.$message.warning('请选择结算数据');
-                    return;
+                if (!this.form.id) {
+                    // 是否选择从表数据
+                    if (this.handleSelectionData.length == 0) {
+                        this.$message.warning('请选择结算数据');
+                        return;
+                    }
                 }
                 for (let item of this.handleSelectionData) {
                     if (!item.currentStlCurCode) {
@@ -556,7 +561,9 @@
                         item.currentStlAmount = item.currentStlAmountUSD
                     }
                     delete item.businessType
-                    delete item.id
+                    if (!this.form.id) {
+                        delete item.id
+                    }
                     delete item.billNo
                     delete item.billDate
                     delete item.accountDc

+ 155 - 60
src/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue

@@ -1,27 +1,27 @@
 <template>
     <div>
+        <!--:row-style="{height:'20px',padding:'0px',fontSize:'12px'}"-->
         <el-table
             ref="tableRef"
-            :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
             :cell-style="{padding:'0px',fontSize:'12px'}"
             :header-cell-style="tableHeaderCellStyle"
             :data="tableData"
             border
             style="width: 100%"
             @selection-change="handleSelectionChange"
-            @mousedown="handleMouseDown"
-            @mousemove="handleMouseMove"
-            @mouseup="handleMouseUp" >
+            @row-click="rowClick"
+            :row-style="rowStyle"
+            :row-class-name="rowClassName" >
             <el-table-column
                 v-if="brfalse"
                 type="selection"
                 width="55">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
+                <!--<template slot-scope="scope">-->
+                <!--    <el-checkbox v-model="scope.row.tableSelect"-->
+                <!--                 :true-label="1" :false-label="0"-->
+                <!--                 @change="toggleSelection([scope.row])">-->
+                <!--    </el-checkbox>-->
+                <!--</template>-->
             </el-table-column>
             <el-table-column
                 prop="lineNo"
@@ -39,16 +39,16 @@
                     <span class="textHide" v-else>{{row.businessBillNo}}</span>
                 </template>
             </el-table-column>
-            <el-table-column
-                prop="tableSelect"
-                label="选择" width="50px" v-if="brfalse">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
-            </el-table-column>
+            <!--<el-table-column-->
+            <!--    prop="tableSelect"-->
+            <!--    label="选择" width="50px" v-if="brfalse">-->
+            <!--    <template slot-scope="scope">-->
+            <!--        <el-checkbox v-model="scope.row.tableSelect"-->
+            <!--                     :true-label="1" :false-label="0"-->
+            <!--                     @change="toggleSelection([scope.row])">-->
+            <!--        </el-checkbox>-->
+            <!--    </template>-->
+            <!--</el-table-column>-->
             <el-table-column
                 prop="accBillNo"
                 label="账单编号">
@@ -311,44 +311,7 @@
             this.invoicelosWorkDictsfun()
         },
         methods:{
-            // 多选选择的数据
-            handleSelectionChange(arr){
-                // 全选
-                if (arr.length == this.tableData.length) {
-                    for (let item of arr) {
-                        this.$set(item,'tableSelect',1)
-                    }
-                }
-                // 清除全选
-                if (arr.length == 0) {
-                    for (let item of this.tableData) {
-                        this.$set(item,'tableSelect',0)
-                    }
-                }
-                this.$emit('handleSelectionChange',arr)
-            },
-            // 多选
-            toggleSelection(rows){
-                if (rows) {
-                    rows.forEach(row => {
-                        this.$refs.tableRef.toggleRowSelection(row);
-                    });
-                } else {
-                    this.$refs.tableRef.clearSelection();
-                }
-            },
-            handleMouseDown(event) {
-                console.log(event,351)
-                const table = this.$refs.tableRef
-                const cell = event.target.closest('td')
-            },
-            handleMouseMove(event) {
-
-            },
-            handleMouseUp(){
-
-            },
-
+            // 币别切换
             corpChange(value,row){
                 this.$set(row,'currentStlCurCode',value)
                 if (value == 'CNY') {
@@ -376,13 +339,145 @@
                     this.curCodeData = res.data.data.records
                 })
             },
-
             // 表头样式
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
                 return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
             },
-        }
 
+            // Element UI 表格点击选中行/取消选中 快捷多选 以及快捷连续多选,高亮选中行 ——-------------------------------------——
+            // 多选选择的数据
+            handleSelectionChange(arr){
+                // // 全选
+                // if (arr.length == this.tableData.length) {
+                //     for (let item of arr) {
+                //         this.$set(item,'tableSelect',1)
+                //     }
+                // }
+                // // 清除全选
+                // if (arr.length == 0) {
+                //     for (let item of this.tableData) {
+                //         this.$set(item,'tableSelect',0)
+                //     }
+                // }
+                this.$emit('handleSelectionChange',arr)
+            },
+            // // 多选
+            // toggleSelection(rows){
+            //     if (rows) {
+            //         rows.forEach(row => {
+            //             this.$refs.tableRef.toggleRowSelection(row);
+            //         });
+            //     } else {
+            //         this.$refs.tableRef.clearSelection();
+            //     }
+            // },
+            // 监听点击表格事件
+            rowClick(row, column, event) {
+                let refsElTable = this.$refs.tableRef; // 获取表格对象
+                if (this.CtrlDown) {
+                    refsElTable.toggleRowSelection(row); // ctrl多选 如果点击两次同样会取消选中
+                    return;
+                }
+                if ( this.shiftOrAltDown && this.handleSelectionData.length > 0) {
+                    // 通过rowIndex判断已选择的行中最上面和最下面的是哪行,再对比按住shift/alt点击的当前行得到新的最上面和最下面的行,把这两行中间的行进行循环选中。
+                    let topAndBottom = this.getTopAndBottom(  row, this.bottomSelectionRow, this.topSelectionRow );
+                    refsElTable.clearSelection(); //先清空 不然会导致在这两行中间之外的行状态不变
+                    for (let index = topAndBottom.top; index <= topAndBottom.bottom; index++) { //选中两行之间的所有行
+                        refsElTable.toggleRowSelection(this.tableData[index], true);
+                    }
+                } else {
+                    let findRow = this.handleSelectionData.find(c => c.rowIndex == row.rowIndex); //找出当前选中行
+                    //如果只有一行且点击的也是这一行则取消选择 否则清空再选中当前点击行
+                    if (findRow&& this.handleSelectionData.length === 1 ) {
+                        refsElTable.toggleRowSelection(row, false);
+                        return;
+                    }
+                    // refsElTable.clearSelection(); // 清空之前选择的数据(如果放开,选择之前会变成单选)
+                    refsElTable.toggleRowSelection(row); // 调用选中行方法
+                }
+            },
+            // 行的 style 的回调方法
+            rowStyle({row,rowIndex}) {
+                // 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象
+                // object: 要添加或者修改属性的目标对象;prop: 要定义或修改属性的名称;descript: 是一个对象,里面是我们上述的对象属性的特性;
+                Object.defineProperty(row, 'rowIndex', { //给每一行添加不可枚举属性rowIndex来标识当前行
+                    value: rowIndex, // 设置age的值,不设置的话默认为undefined
+                    writable: true, // 表示属性的值true可以修改,false不可以被修改
+                    enumerable: false, // 设置为false表示不能通过 for-in 循环返回
+                    // configurable: false, // configurable 设置为 false,意味着这个属性不能从对象上删除
+                })
+            },
+            keyDown(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = true;
+                if (key == 16 || key == 18) this.shiftOrAltDown = true;
+            },
+            keyUp(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = false;
+                if (key == 16 || key == 18) this.shiftOrAltDown = false;
+            },
+            // 文章说明 https://www.jianshu.com/p/48f2c522d2a2
+            getTopAndBottom(row, bottom, top){
+                let n = row.rowIndex,
+                    mx = bottom.rowIndex,
+                    mi = top.rowIndex;
+                if (n > mx) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mx && n > mi) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mi) {
+                    return {
+                        top: n,
+                        bottom: mx
+                    };
+                } else if (n == mi || n == mx) {
+                    return {
+                        top: mi,
+                        bottom: mx
+                    };
+                }
+            },
+            // 给选中行加上current-row这个class类,所以要使用row-class-name这个属性(其实给每一行添加rowIndex也可以用这个属性),
+            // 判断方式也是通过判断rowIndex对比
+            rowClassName({ row,  rowIndex }) {
+                let rowName = "",
+                    findRow = this.handleSelectionData.find(c => c.rowIndex === row.rowIndex);
+                if (findRow) {
+                    rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+                }
+                return rowName; //也可以再加上其他类名 如果有需求的话
+            },
+        },
+        mounted() {
+            // 按住ctrl实现多选 设置监听keydown事件,以及keyup事件,
+            addEventListener("keydown", this.keyDown, false);
+            addEventListener("keyup", this.keyUp, false);
+        },
+        beforeDestroy() { //解绑
+            removeEventListener("keydown", this.keyDown);
+            removeEventListener("keyup", this.keyUp);
+        },
+        computed: { //实时得到最上行和最下行
+            bottomSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex > end.rowIndex ? start : end;
+                });
+            },
+            topSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex < end.rowIndex ? start : end;
+                });
+            }
+        },
     }
 </script>
 

+ 13 - 6
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -399,7 +399,10 @@
 
                 <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
                     <el-tab-pane label="核销明细" name="first">
-                        <finstlbillsitems :tableData="tableData" @handleSelectionChange="handleSelectionChange"></finstlbillsitems>
+                        <finstlbillsitems :tableData="tableData"
+                                          :handleSelectionData="handleSelectionData"
+                                          @handleSelectionChange="handleSelectionChange">
+                        </finstlbillsitems>
                     </el-tab-pane>
                     <el-tab-pane label="凭证明细" name="second">凭证明细</el-tab-pane>
                 </el-tabs>
@@ -522,10 +525,12 @@
                     this.$message.warning('请选择业务类型');
                     return
                 }
-                // 是否选择从表数据
-                if (this.handleSelectionData.length == 0) {
-                    this.$message.warning('请选择结算数据');
-                    return;
+                if (!this.form.id) {
+                    // 是否选择从表数据
+                    if (this.handleSelectionData.length == 0) {
+                        this.$message.warning('请选择结算数据');
+                        return;
+                    }
                 }
                 for (let item of this.handleSelectionData) {
                     if (!item.currentStlCurCode) {
@@ -556,7 +561,9 @@
                         item.currentStlAmount = item.currentStlAmountUSD
                     }
                     delete item.businessType
-                    delete item.id
+                    if (!this.form.id) {
+                        delete item.id
+                    }
                     delete item.billNo
                     delete item.billDate
                     delete item.accountDc

+ 10 - 0
src/views/iosBasicData/SeafreightExportF/bills/assembly/feecenter.vue

@@ -483,6 +483,16 @@
                             <span v-else>{{row.quantity}}</span>
                         </template>
                     </el-table-column>
+                    <!--<el-table-column-->
+                    <!--    prop="rmbAmountNet"-->
+                    <!--    label="CNY(净额)" width="100px"-->
+                    <!--    header-align="center">-->
+                    <!--</el-table-column>-->
+                    <!--<el-table-column-->
+                    <!--    prop="usdAmountNet"-->
+                    <!--    label="USD(净额)" width="100px"-->
+                    <!--    header-align="center">-->
+                    <!--</el-table-column>-->
                     <el-table-column
                         prop="rmbAmount"
                         label="CNY(含税)" width="100px"

+ 165 - 62
src/views/iosBasicData/finstlbills/assembly/finstlbillsitems.vue

@@ -1,28 +1,28 @@
 <template>
     <div>
+        <!--:row-style="{height:'20px',padding:'0px',fontSize:'12px'}"-->
         <el-table
             ref="tableRef"
-            :row-style="{height:'20px',padding:'0px',fontSize:'12px'}"
             :cell-style="{padding:'0px',fontSize:'12px'}"
             :header-cell-style="tableHeaderCellStyle"
             :data="tableData"
             border
             style="width: 100%"
             @selection-change="handleSelectionChange"
-            @mousedown="handleMouseDown"
-            @mousemove="handleMouseMove"
-            @mouseup="handleMouseUp" >
+            @row-click="rowClick"
+            :row-style="rowStyle"
+            :row-class-name="rowClassName" >
             <el-table-column
                 v-if="brfalse"
                 fixed="left"
                 type="selection"
                 width="55">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
+                <!--<template slot-scope="scope">-->
+                <!--    <el-checkbox v-model="scope.row.tableSelect"-->
+                <!--                 :true-label="1" :false-label="0"-->
+                <!--                 @change="toggleSelection([scope.row])">-->
+                <!--    </el-checkbox>-->
+                <!--</template>-->
             </el-table-column>
             <el-table-column
                 prop="lineNo"
@@ -73,16 +73,16 @@
                 prop="currentStlExrate"
                 label="汇率">
             </el-table-column>
-            <el-table-column
-                prop="tableSelect"
-                label="选择" width="50px" v-if="brfalse">
-                <template slot-scope="scope">
-                    <el-checkbox v-model="scope.row.tableSelect"
-                                 :true-label="1" :false-label="0"
-                                 @change="toggleSelection([scope.row])">
-                    </el-checkbox>
-                </template>
-            </el-table-column>
+            <!--<el-table-column-->
+            <!--    prop="tableSelect"-->
+            <!--    label="选择" width="50px" v-if="brfalse">-->
+            <!--    <template slot-scope="scope">-->
+            <!--        <el-checkbox v-model="scope.row.tableSelect"-->
+            <!--                     :true-label="1" :false-label="0"-->
+            <!--                     @change="toggleSelection([scope.row])">-->
+            <!--        </el-checkbox>-->
+            <!--    </template>-->
+            <!--</el-table-column>-->
             <el-table-column
                 prop="isChecked"
                 label="对账">
@@ -321,6 +321,10 @@
             brfalse:{
                 type:Boolean,
                 default:true,
+            },
+            handleSelectionData:{
+                type:Array,
+                default:[],
             }
         },
         data(){
@@ -335,55 +339,17 @@
             this.invoicelosWorkDictsfun()
         },
         methods:{
-            // 多选选择的数据
-            handleSelectionChange(arr){
-                // 全选
-                if (arr.length == this.tableData.length) {
-                    for (let item of arr) {
-                        this.$set(item,'tableSelect',1)
-                    }
-                }
-                // 清除全选
-                if (arr.length == 0) {
-                    for (let item of this.tableData) {
-                        this.$set(item,'tableSelect',0)
-                    }
-                }
-                this.$emit('handleSelectionChange',arr)
-            },
-            // 多选
-            toggleSelection(rows){
-                if (rows) {
-                    rows.forEach(row => {
-                        this.$refs.tableRef.toggleRowSelection(row);
-                    });
-                } else {
-                    this.$refs.tableRef.clearSelection();
-                }
-            },
-            handleMouseDown(event) {
-                console.log(event,351)
-                const table = this.$refs.tableRef
-                const cell = event.target.closest('td')
-            },
-            handleMouseMove(event) {
-
-            },
-            handleMouseUp(){
-
-            },
-
+            // 币别选择监听
             corpChange(value,row){
                 for (let item of this.curCodeData) {
                     if (item.code == value) {
                         this.$set(row,'currentStlCurCode',value)
                         if (value == 'CNY') {
                             delete row.currentStlAmountUSD
-                            this.$set(row,'currentStlAmountRMB',Number(row.amount) - Number(row.stlTtlAmount))
+                            this.$set(row,'currentStlAmountRMB',row.unsettledAmount)
                         }else {
                             delete row.currentStlAmountRMB
-                            // let num = (Number(row.amount) - Number(row.stlTtlAmount)) / Number(item.exrate)
-                            this.$set(row,'currentStlAmountUSD',Number(row.amount) - Number(row.stlTtlAmount))
+                            this.$set(row,'currentStlAmountUSD',row.unsettledAmount)
                         }
                     }
                 }
@@ -412,7 +378,141 @@
             tableHeaderCellStyle({row,column,rowIndex, columnIndex}){
                 return "padding:4px 0px;fontSize:12px;color:#000;background:#ecf5ff"
             },
-        }
+
+            // Element UI 表格点击选中行/取消选中 快捷多选 以及快捷连续多选,高亮选中行 ——-------------------------------------——
+            // 多选选择的数据
+            handleSelectionChange(arr){
+                // // 全选
+                // if (arr.length == this.tableData.length) {
+                //     for (let item of arr) {
+                //         this.$set(item,'tableSelect',1)
+                //     }
+                // }
+                // // 清除全选
+                // if (arr.length == 0) {
+                //     for (let item of this.tableData) {
+                //         this.$set(item,'tableSelect',0)
+                //     }
+                // }
+                this.$emit('handleSelectionChange',arr)
+            },
+            // // 多选
+            // toggleSelection(rows){
+            //     if (rows) {
+            //         rows.forEach(row => {
+            //             this.$refs.tableRef.toggleRowSelection(row);
+            //         });
+            //     } else {
+            //         this.$refs.tableRef.clearSelection();
+            //     }
+            // },
+            // 监听点击表格事件
+            rowClick(row, column, event) {
+                let refsElTable = this.$refs.tableRef; // 获取表格对象
+                if (this.CtrlDown) {
+                    refsElTable.toggleRowSelection(row); // ctrl多选 如果点击两次同样会取消选中
+                    return;
+                }
+                if ( this.shiftOrAltDown && this.handleSelectionData.length > 0) {
+                    // 通过rowIndex判断已选择的行中最上面和最下面的是哪行,再对比按住shift/alt点击的当前行得到新的最上面和最下面的行,把这两行中间的行进行循环选中。
+                    let topAndBottom = this.getTopAndBottom(  row, this.bottomSelectionRow, this.topSelectionRow );
+                    refsElTable.clearSelection(); //先清空 不然会导致在这两行中间之外的行状态不变
+                    for (let index = topAndBottom.top; index <= topAndBottom.bottom; index++) { //选中两行之间的所有行
+                        refsElTable.toggleRowSelection(this.tableData[index], true);
+                    }
+                } else {
+                    let findRow = this.handleSelectionData.find(c => c.rowIndex == row.rowIndex); //找出当前选中行
+                    //如果只有一行且点击的也是这一行则取消选择 否则清空再选中当前点击行
+                    if (findRow&& this.handleSelectionData.length === 1 ) {
+                        refsElTable.toggleRowSelection(row, false);
+                        return;
+                    }
+                    // refsElTable.clearSelection(); // 清空之前选择的数据(如果放开,选择之前会变成单选)
+                    refsElTable.toggleRowSelection(row); // 调用选中行方法
+                }
+            },
+            // 行的 style 的回调方法
+            rowStyle({row,rowIndex}) {
+                // 直接在一个对象上定义一个新属性,或者修改一个对象的现有属性,并返回此对象
+                // object: 要添加或者修改属性的目标对象;prop: 要定义或修改属性的名称;descript: 是一个对象,里面是我们上述的对象属性的特性;
+                Object.defineProperty(row, 'rowIndex', { //给每一行添加不可枚举属性rowIndex来标识当前行
+                    value: rowIndex, // 设置age的值,不设置的话默认为undefined
+                    writable: true, // 表示属性的值true可以修改,false不可以被修改
+                    enumerable: false, // 设置为false表示不能通过 for-in 循环返回
+                    // configurable: false, // configurable 设置为 false,意味着这个属性不能从对象上删除
+                })
+            },
+            keyDown(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = true;
+                if (key == 16 || key == 18) this.shiftOrAltDown = true;
+            },
+            keyUp(event) {
+                let key = event.keyCode;
+                if (key == 17) this.CtrlDown = false;
+                if (key == 16 || key == 18) this.shiftOrAltDown = false;
+            },
+            // 文章说明 https://www.jianshu.com/p/48f2c522d2a2
+            getTopAndBottom(row, bottom, top){
+                let n = row.rowIndex,
+                    mx = bottom.rowIndex,
+                    mi = top.rowIndex;
+                if (n > mx) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mx && n > mi) {
+                    return {
+                        top: mi,
+                        bottom: n
+                    };
+                } else if (n < mi) {
+                    return {
+                        top: n,
+                        bottom: mx
+                    };
+                } else if (n == mi || n == mx) {
+                    return {
+                        top: mi,
+                        bottom: mx
+                    };
+                }
+            },
+            // 给选中行加上current-row这个class类,所以要使用row-class-name这个属性(其实给每一行添加rowIndex也可以用这个属性),
+            // 判断方式也是通过判断rowIndex对比
+            rowClassName({ row,  rowIndex }) {
+                let rowName = "",
+                    findRow = this.handleSelectionData.find(c => c.rowIndex === row.rowIndex);
+                if (findRow) {
+                    rowName = "current-row "; // elementUI 默认高亮行的class类 不用再样式了^-^,也可通过css覆盖改变背景颜色
+                }
+                return rowName; //也可以再加上其他类名 如果有需求的话
+            },
+        },
+        mounted() {
+            // 按住ctrl实现多选 设置监听keydown事件,以及keyup事件,
+            addEventListener("keydown", this.keyDown, false);
+            addEventListener("keyup", this.keyUp, false);
+        },
+        beforeDestroy() { //解绑
+            removeEventListener("keydown", this.keyDown);
+            removeEventListener("keyup", this.keyUp);
+        },
+        computed: { //实时得到最上行和最下行
+            bottomSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex > end.rowIndex ? start : end;
+                });
+            },
+            topSelectionRow() {
+                if (this.handleSelectionData.length == 0) return null;
+                return this.handleSelectionData.reduce((start, end) => {
+                    return start.rowIndex < end.rowIndex ? start : end;
+                });
+            }
+        },
 
     }
 </script>
@@ -424,4 +524,7 @@
     white-space: nowrap;
     text-overflow: ellipsis;
 }
+::v-deep.current-row {
+    background: red;
+}
 </style>

+ 15 - 6
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -525,7 +525,10 @@
                     <!--</el-button>-->
                 </div>
 
-                <finstlbillsitems :tableData="tableData" @handleSelectionChange="handleSelectionChange"></finstlbillsitems>
+                <finstlbillsitems :tableData="tableData"
+                                  :handleSelectionData="handleSelectionData"
+                                  @handleSelectionChange="handleSelectionChange">
+                </finstlbillsitems>
             </el-card>
         </div>
 
@@ -736,10 +739,12 @@
                     this.$message.warning('请选择业务类型');
                     return
                 }
-                // 是否选择从表数据
-                if (this.handleSelectionData.length == 0) {
-                    this.$message.warning('请选择对账数据');
-                    return;
+                if (!this.form.id) {
+                    // 是否选择从表数据
+                    if (this.handleSelectionData.length == 0) {
+                        this.$message.warning('请选择对账数据');
+                        return;
+                    }
                 }
                 for (let item of this.handleSelectionData) {
                     if (!item.currentStlCurCode) {
@@ -770,7 +775,9 @@
                         item.currentStlAmount = item.currentStlAmountUSD
                     }
                     delete item.businessType
-                    delete item.id
+                    if (!this.form.id) {
+                        delete item.id
+                    }
                     delete item.billNo
                     delete item.billDate
                     delete item.accountDc
@@ -796,11 +803,13 @@
                             this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
                             this.$set(item,'unsettledAmountRMB',item.unsettledAmount)
                             this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                            this.$set(item,'currentStlAmountRMB',item.currentStlAmount)
                         }else {
                             this.$set(item,'amountUSD',item.amount)
                             this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
                             this.$set(item,'unsettledAmountUSD',item.unsettledAmount)
                             this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                            this.$set(item,'currentStlAmountUSD',item.currentStlAmount)
                         }
                         return item
                     })

+ 174 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/commodityxsho.json

@@ -0,0 +1,174 @@
+{
+  "align": "center",
+  "height": "auto",
+  "calcHeight": 80,
+  "stripe": true,
+  "tip": false,
+  "addBtn": false,
+  "searchShow": true,
+  "searchShowBtn": false,
+  "menu": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "delBtn": false,
+  "menuWidth": 80,
+  "searchSpan": 8,
+  "searchMenuSpan": 8,
+  "searchMenuPosition": "right",
+  "border": true,
+  "index": true,
+  "selection": true,
+  "dialogClickModal": false,
+  "searchIcon": true,
+  "searchIndex": 2,
+  "column": [
+    {
+      "label": "轮胎名称",
+      "prop": "cname",
+      "search": true,
+      "width": 100,
+      "overHidden": true
+    },
+    {
+      "label": "数量",
+      "prop": "goodsNum",
+      "slot": true,
+      "overHidden": true,
+      "width": 120
+    },
+    {
+      "label": "单价",
+      "prop":"price",
+      "overHidden": true,
+      "slot": true,
+      "width": 120,
+      "cell": true,
+      "rules": [{
+        "required": true,
+        "message": " ",
+        "trigger": "blur"
+      }]
+    },
+    {
+      "label": "批次号",
+      "prop": "dot",
+      "cell":true,
+      "width": "150",
+      "type": "select",
+      "disabled": true,
+      "allowCreate": true,
+      "filterable": true,
+      "dicData": [],
+      "props": {
+        "label": "dot",
+        "value": "dot"
+      },
+      "dicUrl": "/api/blade-sales-part/stockDesc/dotList",
+      "overHidden": true
+    },
+    {
+      "label": "批次号",
+      "prop": "whether",
+      "type":"select",
+      "search":true,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
+      "label": "库存",
+      "prop": "inventory",
+      "addDisabled": false,
+      "multiple": true,
+      "overHidden": true
+    },
+    {
+      "label": "规格型号",
+      "prop": "specificationAndModel",
+      "width": "120",
+      "slot": true,
+      "overHidden": true,
+      "search": true
+    },
+    {
+      "label": "公司",
+      "prop": "salesCompanyName",
+      "slot": true,
+      "width": "120",
+      "overHidden": true
+    },
+    {
+      "label": "轮胎分类",
+      "prop": "goodsTypeName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "品牌",
+      "prop": "brandName",
+      "slot": true,
+      "overHidden": true
+    },
+    {
+      "label": "花纹",
+      "prop": "brandItem",
+      "width": "120",
+      "slot": true,
+      "overHidden": true,
+      "search": true
+    },
+    {
+      "label": "是否静音棉",
+      "prop": "originalFactory",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
+      "label": "是否防爆",
+      "prop": "explosionProof",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":0
+      },{
+        "label":"是",
+        "value":1
+      }]
+    },
+    {
+      "label": "是否自修补",
+      "prop": "selfRecovery",
+      "type":"select",
+      "search":true,
+      "width": 120,
+      "dicData":[{
+        "label":"否",
+        "value":"0"
+      },{
+        "label":"是",
+        "value":"1"
+      }]
+    },
+    {
+      "label": "共享公司",
+      "prop": "sharedCompany",
+      "slot": true,
+      "width": "120",
+      "overHidden": true
+    }
+  ]
+}

+ 666 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -0,0 +1,666 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
+          @click="backToList(0)">返回列表
+        </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button&#45;&#45;small-yh" type="primary" size="small" v-if="editButton"
+          @click="confirmEditing">编辑
+        </el-button>
+        <el-button class="el-button--small-yh" type="primary" size="small" :disabled="isSave" @click="editCustomer">保存数据
+        </el-button>
+        <el-button class="el-button--small-yh" type="warning" size="small" v-if="form.statusName == '确认调拨'" @click="revoke"
+          :disabled="isSave">撤销调拨
+        </el-button>
+        <el-button class="el-button--small-yh" type="success" size="small" style="margin-left: 6px;"
+          v-else @click="complete" :disabled="isSave">确认调拨
+        </el-button>
+      </div>
+    </div>
+    <div style="margin-top: 50px">
+      <trade-card title="基础信息">
+        <avue-form :option="optionForm" v-model="form" ref="form"></avue-form>
+      </trade-card>
+      <trade-card title="明细信息">
+          <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts" :data="form.shipItemsList"
+                     :key="key" @row-save="rowSave" @row-update="rowUpdate"
+                     @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)"
+                     @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 270.1)">
+              <template slot-scope="scope" slot="menuLeft">
+                  <el-button type="primary" icon="el-icon-printer" size="small" @click="adddiailsfun">录入明细</el-button>
+                  <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
+              </template>
+              <template slot-scope="{type,size,row,index,disabled}" slot="menu">
+                  <el-button :size="size" :disabled="disabled || isAddDisabled" :type="type"
+                             :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" @click="rowEdit(row, index)">编辑
+                  </el-button>
+                  <el-button icon="el-icon-delete" :size="size" :disabled="disabled || isDisabled" :type="type"
+                             @click="rowDelBox(row, index)">删除
+                  </el-button>
+              </template>
+          </avue-crud>
+      </trade-card>
+
+        <containerTitle title="上传附件"></containerTitle>
+        <c-upload v-loading="loadingBtn" typeUpload="LT" :disabled="isAddDisabled"
+                  deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
+                  :enumerationValue="35.1"></c-upload>
+
+      <report-dialog :switchDialog="switchDialog" :reportId="form.id" @onClose="onClose()"></report-dialog>
+
+        <dialogAssembly ref="dialogAssemblyRef" :form="form"
+                        @tableDataHandle="tableDataHandle">
+        </dialogAssembly>
+    </div>
+  </div>
+</template>
+
+<script>
+
+import {
+    getDetails,
+    tradingBox,
+    transferAllocateSubmit,
+    confirmTransferAllocate,
+    revokeTransferAllocate
+} from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import { dateFormat } from "@/util/date";
+import reportDialog from "@/components/report-dialog/main";
+import { dotList } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
+
+import dialogAssembly from "@/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue";
+import {getKh} from "@/api/tirePartsMall/salesManagement/saleOrder";
+
+
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+        tableData:[],
+        // 上传附件的需要参数
+        loadingBtn:false,
+        filesList:[],
+
+      switchDialog: false,
+      activeName: "sale_detail",
+      editButton: true,
+      isSave: true,
+      disabled: false,
+      isDisabled: false,
+      isAddDisabled: false,
+      form: {
+        shipItemsList: [],
+        shipVOList: [],
+        historyList: []
+      },
+      key: 0,
+      optionForm: {
+        disabled: false,
+        menuBtn: false,
+        span: 8,
+        column: [
+        //     {
+        //   label: '业务对象',
+        //   disabled: false,
+        //   prop: "customerId",
+        //   type: 'select',
+        //   props: {
+        //     label: 'cname',
+        //     value: 'id'
+        //   },
+        //   dicUrl: '/api/blade-sales-part/corpsDesc/listAll?corpType=KH&enableOrNot=1',
+        //     dicData:[],
+        //   rules: [{
+        //     required: true,
+        //     message: " ",
+        //     trigger: "blur"
+        //   }]
+        // },
+            {
+          label: '调出仓库',
+          prop: "storageId",
+          disabled: false,
+          type: 'select',
+          props: {
+            label: 'cname',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        },{
+            label: '调入仓库',
+            prop: "callInStorageId",
+            disabled: false,
+            type: 'select',
+            props: {
+                label: 'cname',
+                value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+            rules: [{
+                required: true,
+                message: " ",
+                trigger: "blur"
+            }]
+        }, {
+          label: '库管',
+          prop: "stockClerkId",
+          type: 'select',
+          disabled: false,
+          props: {
+            label: 'realName',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-user/stockClerkList',
+          rules: [{
+            required: true,
+            message: " ",
+            trigger: "blur"
+          }]
+        },
+        {
+          label: '业务日期',
+          prop: "businesDate",
+          searchProp: "businesDateList",
+          disabled: false,
+          type: "datetime",
+          value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
+          format: "yyyy-MM-dd HH:mm",
+          valueFormat: "yyyy-MM-dd HH:mm:ss",
+          rules: [
+            {
+              required: true,
+              message: "",
+              trigger: "blur"
+            }
+          ]
+        },
+        {
+          label: '调拨单号',
+          prop: "billno",
+          disabled: true
+        },
+        {
+          label: '调拨数量',
+          prop: "goodsTotalNum",
+          disabled: true,
+        },
+        {
+          label: '备注',
+          prop: "remarks",
+          type: 'textarea',
+          disabled: false,
+          span: 16,
+          minRows: 1
+        }]
+      },
+      formContacts: {},
+      optionContacts: {},
+      optionContactsBack: {
+        align: 'center',
+        index: true,
+        addBtnText: "录入明细",
+        updateBtnText: '保存',
+        refreshBtn: false,
+        dialogDrag: true,
+        addBtn: false,
+        span: 8,
+        height: 300,
+        addRowBtn: false,
+        editBtn: false,
+        delBtn: false,
+        menuWidth: 140,
+        dialogTop: 25,
+        dialogWidth: "80%",
+        showSummary: true,
+        sumColumnList: [
+          {
+            name: 'goodsNum',
+            type: 'sum',
+          }, {
+            name: 'sendNum',
+            type: 'sum',
+          }],
+        column: [{
+          label: '轮胎名称',
+          prop: 'goodsId',
+          // disabled: true,
+          width: 200,
+          overHidden: true,
+            hide:false,
+          type: 'select',
+          props: {
+            label: 'cname',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+        }, {
+          label: '轮胎编码',
+          disabled: true,
+          prop: 'goodsNo',
+          width: 100
+        }, {
+          label: '品牌',
+          prop: 'brandId',
+          disabled: true,
+          width: 100,
+          overHidden: true,
+          type: 'select',
+          props: {
+            label: 'cname',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1'
+        }, {
+          label: '规格型号',
+          prop: 'propertyName',
+          disabled: true,
+          width: 100
+        }, {
+          label: '花纹',
+          prop: 'pattern',
+          disabled: true,
+          width: 100
+        }, {
+          label: '轮胎描述',
+          prop: 'goodsDescription',
+          disabled: true,
+        }, {
+          label: '批次号',
+          prop: 'dot',
+          type: 'select',
+          // disabled: true,
+          dicData: [],
+          props: {
+            label: "dot",
+            value: "dot"
+          },
+          dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+
+        },{
+            label: '库存数量',
+            prop: "inventory",
+            disabled: true,
+        }, {
+          label: '调拨数量',
+          prop: 'goodsNum',
+          disabled: false,
+        },{
+            label: '单位',
+            prop: 'units',
+            type: "select",
+            disabled: true,
+            props: {
+                label: "dictValue",
+                value: "dictValue"
+            },
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
+        }, {
+          label: '备注',
+          prop: 'remarks'
+        }]
+      },
+    }
+  },
+  components: {
+    reportDialog,
+      dialogAssembly
+  },
+  props: {
+    onLoad: Object,
+    detailData: Object
+  },
+  async created() {
+    this.optionContacts = await this.getColumnData(this.getColumnName(270.1), this.optionContactsBack);
+    this.key++
+    if (this.detailData.id) {
+      this.refresh()
+    }else {
+        this.editButton = false
+        this.isSave = false
+    }
+    this.$store.commit("DOMIO_IN_DETAIL");
+  },
+  activated(){
+    if (this.detailData.id) {
+      this.refresh()
+    }
+    this.$store.commit("DOMIO_IN_DETAIL");
+  },
+  methods: {
+    // 撤销调拨
+    revoke() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          revokeTransferAllocate({
+            ...this.form,
+              bizTypeName: "DBGD"
+          }).then(res => {
+            this.$message.success("撤销成功");
+            this.refresh(res.data.data.id)
+            loading.close();
+          }).finally(() => {
+            loading.close();
+          });
+        }
+      })
+    },
+    rowEdit(row, index) {
+      if (this.form.statusName == '待出库') {
+        this.optionContactsBack.column.forEach(its => {
+          if (its.prop == 'dot') {
+            this.$set(its, 'disabled', false)
+          }
+        })
+      }
+      console.log('this.formContacts.goodsId', this.formContacts.goodsId);
+      dotList({
+        storageId: this.form.storageId,
+        goodsId: row.goodsId
+      }).then(res => {
+        this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
+      })
+      this.$refs.formContacts.rowEdit(row, index)
+    },
+      // 确认调拨
+    complete() {
+      if (!this.form.id) {
+          this.$message.warning("请先保存数据");
+          return
+      }
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          this.form.shipItemsList.forEach(item => {
+            item.goodsName = item.$goodsId
+          })
+          transferAllocateSubmit({
+            ...this.form,
+              bizTypeName: "DBGD"
+          }).then(res => {
+            confirmTransferAllocate({
+              ...this.form,
+                bizTypeName: "DBGD"
+            }).then(res => {
+              this.$message.success("调拨完成");
+              this.refresh(res.data.data.id)
+              loading.close();
+            }).finally(() => {
+              loading.close();
+            });
+          })
+        } else {
+          this.$message.error('请选择库管')
+        }
+      })
+    },
+    //修改提交触发
+    editCustomer() {
+      this.$refs["form"].validate((valid, done) => {
+        done();
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          console.log(this.form)
+          this.form.shipItemsList.forEach(item => {
+            item.goodsName = item.$goodsId
+          })
+          // this.goodsName;
+          transferAllocateSubmit({
+            ...this.form,
+              bizTypeName: "DBGD",
+            filesList:this.filesList
+          }).then(res => {
+            this.$message.success("保存成功");
+            this.refresh(res.data.data.id)
+            loading.close();
+          }).finally(() => {
+            loading.close();
+          });
+        } else {
+          return false;
+        }
+      });
+    },
+    refresh(id, type) {
+      this.$set(this.optionContactsBack, 'addBtn', false)
+      this.$set(this.optionContacts, 'addBtn', false)
+      this.isDisabled = true
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      })
+      if (!this.detailData.id) {
+        getDetails({ id: id }).then(res => {
+          if (res.data.data.statusName == '确认调拨') {
+            this.$set(this.optionForm, 'disabled', true)
+            this.isAddDisabled = true
+            this.optionContacts.column.forEach(item => {
+              if (item.prop == 'sendNum') {
+                item.disabled = true
+              }
+            })
+          }
+          this.isAddDisabled = true
+          if (res.data.data.statusName == '录入') {
+            this.isAddDisabled = true
+            this.isDisabled = true
+          }
+          this.form = res.data.data
+            this.filesList = res.data.data.filesList
+          this.$nextTick(() => {
+            this.$refs.formContacts.refreshTable()
+          })
+          loading.close();
+        }).catch(() => {
+          loading.close();
+        })
+      } else {
+        getDetails({ id: this.detailData.id }).then(res => {
+          if (res.data.data.statusName == '已出库') {
+            this.$set(this.optionForm, 'disabled', true)
+            this.isAddDisabled = true
+            this.optionContacts.column.forEach(item => {
+              if (item.prop == 'sendNum') {
+                item.disabled = true
+              }
+            })
+          }
+          this.isAddDisabled = true
+          if (res.data.data.statusName == '待出库') {
+            this.isAddDisabled = true
+            this.isDisabled = true
+          }
+          this.form = res.data.data
+            this.filesList = res.data.data.filesList
+          this.$nextTick(() => {
+            this.$refs.formContacts.refreshTable()
+          })
+          loading.close();
+        }).catch(() => {
+          loading.close();
+        })
+      }
+    },
+    rowDelBox(row, index) {
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        if (row.id) {
+          tradingBox(row.id).then(res => {
+            this.form.shipItemsList.splice(index, 1);
+            this.$message.success("操作成功!");
+          });
+        } else {
+          this.form.shipItemsList.splice(index, 1);
+          this.$message.success("操作成功!");
+        }
+      }
+      )
+        ;
+    },
+    rowSave(form, done, loading) {
+      done(form)
+    },
+    rowUpdate(form, index, done, loading) {
+      done(form)
+    },
+    //打印
+    handlePrint() {
+      this.switchDialog = !this.switchDialog;
+
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+      // 新增出库明细
+      adddiailsfun(){
+          console.log(this.$refs.dialogAssemblyRef,635)
+        this.$refs.dialogAssemblyRef.dialogVisible = true
+        // this.dialogVisible = true
+      },
+    //编辑
+    confirmEditing() {
+      if (this.form.statusName == '录入') {
+        this.isDisabled = false
+        this.isSave = false
+        this.$set(this.optionForm, 'disabled', false)
+        this.optionForm.column.forEach(item => {
+          if (item.prop == 'storageId'
+            || item.prop == 'remarks'
+            || item.prop == 'createTime'
+            || item.prop == 'stockClerkId'
+            || item.prop == 'shipType'
+            || item.prop == 'logisticsCorpName'
+            || item.prop == 'expressNo') {
+            item.disabled = false
+          } else {
+            item.disabled = true
+          }
+        })
+        this.isAddDisabled = false
+        this.optionContactsBack.column.forEach(its => {
+          if (its.prop == 'dot') {
+            this.$set(its, 'disabled', false)
+          }
+        })
+      } else {
+        this.$set(this.optionForm, 'disabled', false)
+        this.isAddDisabled = true
+        this.isSave = false
+        // this.optionForm.column.forEach(item => {
+        //   if (item.prop == 'remarks') {
+        //     item.disabled = false
+        //   } else {
+        //     item.disabled = true
+        //   }
+        // })
+        this.optionForm.column.forEach(item => {
+          item.disabled = true
+        })
+        // this.isAddDisabled = false
+
+      }
+    },
+      // 导入按钮事件
+      tableDataHandle(arr){
+        this.tableData = arr
+          // 循环获取库存数量
+          for(let item of this.tableData) {
+              let obj = {
+                  goodsId:item.id,
+                  price:item.price,
+                  goodsName:item.cname,
+                  goodsNum:item.goodsNum,
+                  brandName:item.brandName,
+                  brandId:item.brandId,
+                  goodsNo:item.code,
+                  propertyName: item.specificationAndModel,
+                  inventory:item.inventory,
+                  pattern:item.brandItem,
+                  goodsDescription:item.goodsDescription,
+                  dot:item.dot,
+                  whether:item.whether,
+                  units:item.unit,
+                  // 小计
+                  subTotalMoney:item.goodsNum * item.price,
+                  // 备注
+                  remarks:item.remarks,
+                  // 批次号的状态
+                  dotedittype:false,
+                  // 价格数量
+                  goodsNumtype:false,
+                  // 价格
+                  pricetype:false,
+              }
+              this.form.shipItemsList.push(obj)
+          }
+          this.$refs.dialogAssemblyRef.dialogVisible = false
+          // this.dialogVisible = false
+      },
+
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    backToList(type) {
+      this.$emit("backToList", type);
+      // this.$store.commit("DOMIO_OUT_DETAIL");
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+</style>

+ 261 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/dialogAssembly.vue

@@ -0,0 +1,261 @@
+<template>
+    <div>
+        <el-dialog title="选择轮胎" append-to-body class="el-dialogDeep" :visible.sync="dialogVisible" width="80%"
+                   :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" @close="closeGoods">
+            <el-row :style="{ height: rowHeight }">
+                <el-col :span="5" style="height: 100%;overflow-y: auto">
+                    <div>
+                        <el-scrollbar>
+                            <basic-container>
+                                <avue-tree :option="treeOption" :data="treeDataGoods" @node-click="nodeClick" />
+                            </basic-container>
+                        </el-scrollbar>
+                    </div>
+                </el-col>
+                <el-col :span="19">
+                    <basic-container>
+                        <avue-crud :option="optionTwo" :table-loading="loading" :data="goodsListShow" ref="crud"
+                                   @refresh-change="refreshChange" @selection-change="selectionChange" @search-change="goodsSearch"
+                                   :page.sync="page" @on-load="onLoadfun"
+                                   @resetColumn="resetCrud" @saveColumn="saveCrud">
+                            <template slot="menuLeft">
+                                <el-tabs v-model="activeNameTabs" @tab-click="tabHandle">
+                                    <el-tab-pane label="查询结果" name="searchList" />
+                                    <el-tab-pane label="已选定数据" name="importStaging" />
+                                </el-tabs>
+                            </template>
+                            <template slot="goodsNum" slot-scope="{row}">
+                                <el-input-number v-model="row.goodsNum" size="small" :controls="false" :precision="0"
+                                                 @input="amountChange(row)" style="width: 100%" />
+                            </template>
+                            <template slot="dot" slot-scope="{row}">
+                                <!--使用allow-create属性即可通过在输入框中输入文字来创建新的条目。注意此时filterable必须为真。-->
+                                <!--本例还使用了default-first-option属性, 在该属性打开的情况下,按下回车就可以选中当前选项列表中的第一个选项,-->
+                                <!--无需使用鼠标或键盘方向键进行定位。-->
+                                <!--allow-create filterable default-first-option-->
+                                <el-select v-model="row.dot" filterable default-first-option @focus="picihaolistfun(row.id)"
+                                           @change="picihaolistChangefun($event,row)">
+                                    <el-option v-for="(item, index) in picihaolist" :key="index" :label="item.dot"
+                                               :value="item.dot"></el-option>
+                                </el-select>
+                                <!--<span v-else>{{ row.dot }}</span>-->
+                            </template>
+                            <template slot="price" slot-scope="{row}">
+                                <el-input-number v-model="row.price" size="small" :controls="false"
+                                                 style="width: 100%" />
+                            </template>
+                            <template slot-scope="scope" slot="menu">
+                                <el-button type="text" icon="el-icon-edit" size="small"
+                                           @click.stop="importStagList(scope.row, scope.index)" v-if="activeNameTabs == 'searchList'"
+                                           :disabled="goodsListSave.findIndex(item => item.id == scope.row.id) !== -1">选择
+                                </el-button>
+                                <el-button type="text" icon="el-icon-delete" size="small"
+                                           @click.stop="removeStagList(scope.row, scope.index)" v-else>移除
+                                </el-button>
+                            </template>
+                        </avue-crud>
+                    </basic-container>
+                </el-col>
+            </el-row>
+            <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false" :loading="saveLoading">取 消</el-button>
+        <el-button type="primary" @click="importGoods" v-if="commodityData !== true" :loading="saveLoading">导入</el-button>
+                <!--<el-button type="primary" @click="importChoice" v-if="commodityData === true" :loading="saveLoading"-->
+                <!--           :disabled="tableData.length !== 1">导入</el-button>-->
+      </span>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import commodityxsho from './commodityxsho.json'
+import {goodsPageDB} from "@/api/tirePartsMall/salesManagement/saleOrder";
+import {dotList} from '@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder'
+import {getCorpTypes} from "@/api/tirePartsMall/basicData/commodityInformation";
+
+    export default {
+        props:{
+            // dialogVisible:{
+            //     type:Boolean,
+            //     default:false
+            // },
+            form:{
+                type:Object,
+                default:{}
+            },
+        },
+        data(){
+            return {
+                dialogVisible:false,
+                // 弹窗高度
+                rowHeight: '',
+                // 左侧选择
+                treeOption:{
+                    addBtn: false,
+                    menu: false,
+                    size: "small",
+                    props: {
+                        labelText: "标题",
+                        label: "title",
+                        value: "id",
+                    }
+                },
+                // 左侧数据
+                treeDataGoods: [],
+                // 表格需要的配置
+                optionTwo: commodityxsho,
+                loading: false,
+                // 商品列表数据合计
+                goodsListShow: [],
+                page: {
+                    pageSize: 10,
+                    currentPage: 1,
+                    total: 0,
+                    pageSizes: [10, 50, 100, 300, 500]
+                },
+                // tabs切换
+                activeNameTabs:'searchList',
+                // 批次号请求到的数据
+                picihaolist:[],
+                // 商品列表暂存
+                goodsListSave: [],
+                saveLoading: false,
+                commodityData: false,
+
+            }
+        },
+        created() {
+            this.getAllWorkDicts()
+        },
+        methods:{
+            closeGoods() {
+                this.treeDataGoods = [];
+                this.treeDeptId = "";
+                this.activeNameTabs = "searchList";
+            },
+            //导入页左商品类型查询
+            nodeClick(data) {
+                this.treeDeptId = data.id;
+                this.page.currentPage = 1;
+                this.onLoadfun(this.page, {goodsTypeId:this.treeDeptId});
+            },
+            //刷新触发
+            refreshChange() {
+                this.treeDeptId = ''
+                this.page.currentPage = 1;
+                this.onLoadfun(this.page);
+            },
+            //选中触发
+            selectionChange(list) {
+                this.tableData = list
+            },
+            // 点击搜索触发
+            goodsSearch(params, done) {
+                this.treeDeptId = ''
+                params = {
+                    ...params,
+                    artsVision: this.form.belongToCorpId
+                }
+
+                // params.specificationAndModel = params.cname
+                // delete params.cname
+                this.onLoadfun(this.page, params);
+                done()
+            },
+            // 标签页切换
+            tabHandle(data) {
+                if (data.name == 'searchList') {
+                    this.goodsListShow = this.data;
+                    this.page.total = this.pageList.total
+                } else if (data.name == 'importStaging') {
+                    this.goodsListShow = this.goodsListSave;
+                    this.page.total = 0
+                }
+            },
+            //导入轮胎弹窗列表查询
+            onLoadfun(page, params = {}) {
+                this.loading = true;
+                goodsPageDB({
+                    ...params,
+                    current: page.currentPage,
+                    size: page.pageSize,
+                    enableOrNot:1,
+                }).then(res=>{
+                    const data = res.data.data;
+                    this.page.total = data.total;
+                    this.goodsListShow = data.records;
+
+                    for(let item of this.goodsListShow) {
+                        item.goodsNum = item.goodsNum?item.goodsNum:0
+                    }
+                    this.loading = false;
+                })
+            },
+            // 弹框的重置
+            resetCrud(){
+                this.$message.success("重置成功");
+            },
+            // 弹窗的保存
+            saveCrud(){
+                this.$message.success("保存成功");
+            },
+            // 商品信息价格计算
+            amountChange(row) {
+                // 价格
+                // if (!row.price) {
+                //     row.price = 0;
+                // }
+            },
+            // 批次号
+            picihaolistChangefun(value,row){
+                for (let item of this.picihaolist) {
+                    if (item.dot == value) {
+                        this.$set(row,'inventory',item.balanceQuantity)
+                    }
+                }
+            },
+            // 批次号获取数据
+            picihaolistfun(goodsId){
+                dotList({
+                    storageId:this.form.storageId,
+                    goodsId: goodsId
+                }).then(res=>{
+                    this.picihaolist = res.data.data
+                })
+            },
+            // 获取左侧筛选
+            getAllWorkDicts(){
+                getCorpTypes().then(res => {
+                    this.treeDataGoods = res.data.data;
+                });
+            },
+            importStagList(row, index, type) {
+                this.goodsListSave.push(row);
+            },
+            removeStagList(row, index, type) {
+                this.goodsListSave.splice(row.$index, 1)
+            },
+            //确认导入触发
+            async importGoods() {
+                // this.surplusRouteQuantityOption.push({ storageQuantity: '0' });
+                if (this.goodsListSave.length > 0) {
+                    // this.goodsListSaveHandle()
+                    console.log(this.goodsListSave,242)
+                    this.$emit('tableDataHandle',this.goodsListSave)
+                } else {
+                    if (this.tableData.length > 0) {
+                        // this.tableDataHandle()
+                        console.log(this.tableData,246)
+                        this.$emit('tableDataHandle',this.tableData)
+                    }
+                }
+            },
+
+
+        }
+    }
+</script>
+
+<style scoped>
+
+</style>

+ 529 - 0
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/index.vue

@@ -0,0 +1,529 @@
+<template>
+  <div>
+    <basic-container v-show="!detailsOpen">
+      <avue-crud :option="option" :search.sync="search" v-model="form" :table-loading="loading" :data="dataList"
+        ref="crud" :key="key" @on-load="onLoad" @search-change="searchChange" @row-del="rowDel"
+        @expand-change="expandChange" @refresh-change="refreshChange"
+        @resetColumn="resetColumnTwo('crud', 'option', 'optionList', 317)"
+        @saveColumn="saveColumnTwo('crud', 'option', 'optionList', 317)" :page.sync="page">
+        <template slot-scope="{ row }" slot="expand">
+          <avue-crud :data="row.itemData" :option="itemOption" :table-loading="row.itemLoading" :cell-style="cellStyle"
+            class="itemTable"></avue-crud>
+        </template>
+        <template slot-scope="{type,size,row,index}" slot="menu">
+          <!-- <el-button  :size="size" :type="type" @click="check(row)">查看</el-button> -->
+          <el-button :size="size" :disabled="row.status !== '录入' && row.item >= 1" :type="type"
+            @click="$refs.crud.rowDel(row, index)">删除</el-button>
+<!--          <el-button :size="size" :type="type"-->
+<!--                     @click="deliverGoods(row)">发货</el-button>-->
+        </template>
+        <template slot="corpNameSearch">
+          <crop-select v-model="search.corpId" corpType="KH" :refresh="false"></crop-select>
+        </template>
+        <template slot-scope="{type,size,row,$index}" slot="menuLeft">
+          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true;">新增</el-button>
+          <!--<el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>-->
+        </template>
+        <template slot-scope="{ row, index }" slot="billno">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 1)">{{ row.billno }}
+          </span>
+        </template>
+        <template slot-scope="{ row, index }" slot="ordNo">
+          <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
+          </span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage ref="detailsPageRef" v-if="detailsOpen" :onLoad="form" :detailData="detailData" @backToList="backToList"></detailsPage>
+
+    <el-dialog
+      title="发货"
+      :visible.sync="dialogVisible"
+      append-to-body
+      close-on-click-modal
+      close-on-press-escape
+      width="40%">
+      <div class="elForm">
+        <el-form :model="dialogForm" label-position="right">
+          <el-col :span="24">
+            <el-form-item label="收货人姓名:" label-width="100px">
+              <span>{{ dialogForm.contacts }}</span>
+            </el-form-item>
+            <el-form-item label="收货人电话:" label-width="100px">
+              <span>{{ dialogForm.phone }}</span>
+            </el-form-item>
+            <el-form-item label="收货人地址:" label-width="100px">
+              <span>{{ dialogForm.recAddress }}</span>
+            </el-form-item>
+          </el-col>
+          <el-form-item label="配送方式" label-width="100px">
+            <el-select v-model="dialogForm.shipType" @change="courierTypeChange" style="width: 90%;" placeholder="请选择运输类型">
+              <el-option
+                v-for="item in courierTypeList"
+                :key="item.dictKey"
+                :label="item.dictValue"
+                :value="item.dictValue">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="货运公司" label-width="100px">
+            <el-select v-model="dialogForm.logisticsCorpName" filterable allow-create default-first-option style="width: 90%;" placeholder="请选择货运公司">
+              <el-option
+                v-for="item in courierList"
+                :key="item.dictKey"
+                :label="item.dictValue"
+                :value="item.dictValue">
+              </el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item label="货运单号" label-width="100px">
+            <el-input v-model="dialogForm.expressNo" style="width: 90%;" placeholder="请输入货运单号"></el-input>
+          </el-form-item>
+        </el-form>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="small" type="primary" @click="confirmShipment">确认发货</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { transferAllocateList, remove, getGoodsInfo, getDetails, shipments } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
+import detailsPage from "./detailsPage"
+import {getWorkDicts} from "../../../../api/system/dictbiz";
+
+export default {
+  name: "index",
+  components: {
+    detailsPage
+  },
+  data() {
+    return {
+      dialogVisible: false,
+      dialogForm: {},
+      courierTypeList: [],
+      courierList: [],
+      detailsOpen: false,
+      loading: false,
+      search: {},
+      form: {},
+      dataList: [],
+      detailData: {},
+      page: {
+        pageSize: 20,
+        currentPage: 1,
+        total: 0,
+        pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 400, 500]
+      },
+      key: 0,
+      itemOption: {
+        align: "center",
+        header: false,
+        border: true,
+        menu: false,
+        column: [
+          {
+            label: '轮胎名称',
+            prop: 'goodsId',
+            disabled: true,
+            width: 200,
+            overHidden: true,
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/goodsDesc/goodsListAll'
+          }, {
+            label: '轮胎编码',
+            disabled: true,
+            prop: 'goodsNo',
+            width: 100
+          }, {
+            label: '品牌',
+            prop: 'brandId',
+            disabled: true,
+            width: 100,
+            overHidden: true,
+            props: {
+              label: 'cname',
+              value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1'
+          }, {
+            label: '规格型号',
+            prop: 'propertyName',
+            disabled: true,
+            width: 100
+          }, {
+            label: '花纹',
+            prop: 'pattern',
+            disabled: true,
+            width: 100
+          }, {
+            label: '轮胎描述',
+            prop: 'goodsDescription',
+            disabled: true,
+          }, {
+            label: '批次号',
+            prop: 'dot',
+            type: 'select',
+            disabled: true,
+            dicData: [],
+            props: {
+              label: "dot",
+              value: "dot"
+            },
+            dicUrl: "/api/blade-sales-part/stockDesc/dotList",
+          }
+        ]
+      },
+      option: {},
+      optionList: {
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        addBtn: false,
+        index: true,
+        span: 8,
+        border: true,
+        height: "auto",
+        searchMenuPosition: "right",
+        align: "center",
+        size: "small",
+        menuWidth: 100,
+        searchSpan: 8,
+        searchIcon: true,
+        searchIndex: 2,
+        highlightCurrentRow: true,
+        expand: true,
+        expandWidth: 60,
+        dialogWidth: "70%",
+        summaryText: "合计",
+        showSummary: true,
+        sumColumnList: [{
+          name: "goodsTotalNum",
+          type: "sum",
+          decimals: 0
+        }],
+        column: [{
+          label: '调拨单号',
+          prop: "billno",
+          search: true,
+          overHidden: true,
+        }, {
+          label: '调出仓库',
+          prop: "storageId",
+          search: true,
+          overHidden: true,
+          type: 'select',
+          props: {
+            label: 'cname',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+        },{
+            label: '调入仓库',
+            prop: "callInStorageId",
+            search: true,
+            overHidden: true,
+            type: 'select',
+            props: {
+                label: 'cname',
+                value: 'id'
+            },
+            dicUrl: '/api/blade-sales-part/storageDesc/listAll',
+        }, {
+          label: "调拨数量",
+          prop: "goodsTotalNum",
+          search: false,
+          overHidden: true,
+          // width: 120,
+        },  {
+          label: '状态',
+          prop: "statusName",
+          search: true,
+          overHidden: true,
+          type: 'select',
+            dicData:[
+                {
+                    dictValue:'录入',
+                    dictKey:'录入'
+                },
+                {
+                    dictValue:'确认调拨',
+                    dictKey:'确认调拨'
+                }
+            ],
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
+        }, {
+          label: '调拨日期',
+          prop: "businesDate",
+          overHidden: true,
+          searchProp: "businesDateList",
+          type: "date",
+          search: true,
+          width: 100,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: '库管',
+          prop: "stockClerkId",
+          type: 'select',
+          search: true,
+          props: {
+            label: 'realName',
+            value: 'id'
+          },
+          dicUrl: '/api/blade-user/stockClerkList',
+          overHidden: true,
+        }, {
+          label: "制单人",
+          prop: "createUserName",
+          searchProp: "createUser",
+          overHidden: true,
+          width: 100,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "制单日期",
+          prop: "createTime",
+          searchProp: "createTimeList",
+          type: "date",
+          overHidden: true,
+          width: 100,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }, {
+          label: "更新人",
+          prop: "updateUserName",
+          searchProp: "updateUser",
+          overHidden: true,
+          width: 100,
+          filterable: true,
+          remote: true,
+          type: "select",
+          dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
+          props: {
+            label: "account",
+            value: "id",
+            res: 'data.records'
+          }
+        }, {
+          label: "更新日期",
+          prop: "updateTime",
+          searchProp: "updateTimeList",
+          type: "date",
+          overHidden: true,
+          width: 100,
+          searchRange: true,
+          searchDefaultTime: ["00:00:00", "23:59:59"],
+          format: "yyyy-MM-dd",
+          valueFormat: "yyyy-MM-dd HH:mm:ss"
+        }]
+      }
+    }
+  },
+  async created() {
+    this.option = await this.getColumnData(this.getColumnName(317), this.optionList);
+    this.key++
+    let i = 0;
+    this.option.column.forEach(item => {
+      if (item.search) i++
+    })
+    if (i % 3 !== 0) {
+      const num = 3 - Number(i % 3)
+      this.option.searchMenuSpan = num * 8;
+      this.option.searchMenuPosition = "right";
+    }
+    if (this.$route.query.id) {
+      this.detailData = {
+        id: this.$route.query.id
+      };
+      this.detailsOpen = true;
+    }
+    console.log(this.$route.query);
+
+  },
+  activated() {
+    if (this.$route.query.id) {
+      this.detailData = {
+        id: this.$route.query.id
+      };
+      this.detailsOpen = true;
+    }
+  },
+  methods: {
+    check(row) {
+      this.form = row
+      this.detailsOpen = true
+    },
+    backToList(type) {
+      this.form = {}
+      this.detailsOpen = false
+      if (type === 0) {
+        this.detailData = {}
+      }
+      this.onLoad(this.page, this.search)
+    },
+    //刷新
+    refreshChange() {
+      this.onLoad(this.page, this.search)
+    },
+    rowDel(form, index) {
+      console.log(form);
+      this.$confirm('此操作将永久删除该行, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove(form.id).then(res => {
+          this.$message({
+            type: 'success',
+            message: '删除成功!'
+          });
+          this.dataList.splice(index, 1);
+          this.onLoad(this.page)
+        })
+      }).catch(() => {
+      });
+    },
+    searchChange(params, done) {
+        this.page.currentPage = 1
+      done();
+      this.onLoad(this.page, params)
+    },
+    onLoad(page, params = {}) {
+      console.log(params);
+      params = {
+        ...params,
+        current: page.currentPage,
+        size: page.pageSize,
+          bizTypeName: "DBGD",
+        ...Object.assign(params, this.search)
+      }
+      this.loading = true
+      this.dataList.forEach(item => {
+        this.$refs.crud.toggleRowExpansion(item, false);
+      });
+      transferAllocateList(params).then(res => {
+        if (res.data.data.records) {
+          res.data.data.records.forEach(e => {
+            e.itemLoading = true;
+          });
+        }
+        this.dataList = res.data.data.records
+        this.page.total = res.data.data.total
+        this.$nextTick(() => {
+          this.$refs.crud.doLayout()
+        })
+        this.loading = false
+      }).finally(() => {
+        this.loading = false
+      })
+    },
+    editOpen(row, status) {
+      this.form = row
+      this.detailData = {
+        id: row.id,
+        status: status
+      };
+      this.detailsOpen = true;
+    },
+    expandChange(row) {
+      if (!row.itemData) {
+        getDetails({ id: row.id })
+          .then(res => {
+            this.dataList[row.$index].itemData = res.data.data.shipItemsList;
+          })
+          .finally(() => {
+            this.dataList[row.$index].itemLoading = false;
+          });
+      }
+    },
+    // 发货按钮
+    deliverGoods(row) {
+
+      // 获取运输类型
+      getWorkDicts("deliveryMethod").then(res => {
+        this.courierTypeList = res.data.data;
+      })
+      // 获取快递公司
+      getWorkDicts("tyre_express_company").then(res => {
+        this.courierList = res.data.data;
+      })
+
+      this.dialogForm = row
+
+      this.dialogVisible = true
+    },
+    courierTypeChange() {
+      this.dialogForm.courierCorporation = null
+    },
+    // 发货
+    confirmShipment() {
+      for (let courierCompanies of this.courierList) {
+        if (courierCompanies.dictValue === this.dialogForm.logisticsCorpName) {
+          this.dialogForm.logisticsCorpId = courierCompanies.dictKey
+          break
+        }
+      }
+
+      const requestBody = {
+        id : this.dialogForm.id,
+        logisticsCorpId : this.dialogForm.logisticsCorpId,
+        logisticsCorpName : this.dialogForm.logisticsCorpName,
+        shipType : this.dialogForm.shipType,
+        expressNo : this.dialogForm.expressNo
+      }
+
+      shipments(requestBody).then(res => {
+        console.log(res)
+        this.$message.success("发货成功");
+        this.dialogVisible = false;
+      })
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
+      if (inSave) {
+        this.$message.success("重置成功");
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    }
+  }
+}
+</script>
+
+<style scoped></style>