Browse Source

提交陆运库存帐

caojunjie 2 năm trước cách đây
mục cha
commit
3c51d54847

+ 8 - 0
src/api/purchasingManagement/inStock.js

@@ -101,3 +101,11 @@ export function withdraw(data) {
         params: data
     })
 }
+
+export function scanningCodeAddPc(data) {
+    return request({
+        url: '/api/trade-purchase/woodHarvestingCloud/scanningCodeAddPc',
+        method: 'get',
+        params: data
+    })
+}

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

@@ -809,6 +809,9 @@ const columnName = [{
   code: 191,
   name: '销售管理-出库明细表'
 }, {
+  code: 191.1,
+  name: '销售管理-出库明细表-导入列表'
+}, {
   code: 192,
   name: '基础资料-仓储费协议列表页'
 }, {

+ 11 - 0
src/views/InventoryManagement/inventoryAccount/index.vue

@@ -207,6 +207,17 @@ export default {
           prop: 'morderNo',
           index: 19,
           search: true
+        }, {
+          label: '状态',
+          index: 19,
+          prop: 'status',
+          dataType: "number",
+          type: 'select',
+          dicUrl: "/api/blade-system/dict-biz/dictionary?code=inventory_account",
+          props: {
+            label: "dictValue",
+            value: "dictKey"
+          }
         }]
       },
       commodityLabel: [],

+ 21 - 47
src/views/purchasingManagement/inStock/config/customerContact.json

@@ -25,11 +25,6 @@
       "decimals": 3
     },
     {
-      "name": "price",
-      "type": "sum",
-      "decimals": 2
-    },
-    {
       "name": "balanceNumber",
       "type": "sum",
       "decimals": 2
@@ -71,17 +66,31 @@
     {
       "index": 2,
       "prop": "length",
-      "label": "长度(m)",
+      "label": "*长度(m)",
       "overHidden": true,
       "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
       "width": 100
     },
     {
       "index": 3,
       "prop": "thickness",
-      "label": "厚度(m)",
+      "label": "*厚度(m)",
       "overHidden": true,
       "cell": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
       "width": 100
     },
     {
@@ -140,7 +149,7 @@
     {
       "index": 8,
       "prop": "unit",
-      "label": "*入库单位",
+      "label": "入库单位",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -149,33 +158,19 @@
       },
       "dicData": [],
       "cell": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请选择",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },
     {
       "index": 9,
       "prop": "grade",
-      "label": "*等级",
+      "label": "等级",
       "overHidden": true,
       "cell": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 10,
       "prop": "storageId",
-      "label": "*库区",
+      "label": "库区",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -185,13 +180,6 @@
       "dicData": [],
       "filterable": true,
       "cell": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请选择",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 11,
@@ -203,16 +191,9 @@
     },{
       "index": 12,
       "prop": "itemType",
-      "label": "*品牌",
+      "label": "品牌",
       "overHidden": true,
       "cell": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 13,
@@ -224,19 +205,12 @@
     },{
       "index": 14,
       "prop": "sliceNumber",
-      "label": "*片数",
+      "label": "片数",
       "overHidden": true,
       "cell": true,
       "type": "number",
       "controls": false,
       "precision": 0,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 15,

+ 13 - 1
src/views/purchasingManagement/inStock/detailsPage.vue

@@ -319,6 +319,18 @@ export default {
             span: 6
           },
           {
+            label: "库管员",
+            prop: "stockUser",
+            span: 6,
+            dataType: "number",
+            type: 'select',
+            dicUrl: "/api/blade-user/MCSelectList",
+            props: {
+              label: "realName",
+              value: "id"
+            }
+          },
+          {
             label: "是否融资",
             prop: "arrival",
             type: "select",
@@ -349,7 +361,7 @@ export default {
             prop: "orderRemark",
             type: "textarea",
             minRows: 1,
-            span: 12
+            span: 24
           },
         ]
       },

+ 10 - 70
src/views/salesManagement/outStock/config/customerContact.json

@@ -12,6 +12,7 @@
   "refreshBtn": false,
   "showSumary": true,
   "indexSlot": false,
+  "showSummary": true,
   "sumaryText": "合计",
   "sumColumnList": [
     {
@@ -25,11 +26,6 @@
       "decimals": 3
     },
     {
-      "name": "price",
-      "type": "sum",
-      "decimals": 2
-    },
-    {
       "name": "storageAmount",
       "type": "sum",
       "decimals": 2
@@ -38,7 +34,7 @@
   "column": [{
     "index": 1,
     "prop": "itemId",
-    "label": "*品名",
+    "label": "品名",
     "type": "select",
     "props": {
       "label": "cname",
@@ -47,13 +43,6 @@
     "dicData": [],
     "overHidden": true,
     "filterable":true,
-    "rules": [
-      {
-        "required": true,
-        "message": "请选择",
-        "trigger": "blur"
-      }
-    ],
     "width": 100
   },{
     "index": 2,
@@ -72,7 +61,7 @@
     {
       "index": 4,
       "prop": "billNo",
-      "label": "*捆包号",
+      "label": "捆包号",
       "overHidden": true,
       "rules": [
         {
@@ -85,28 +74,14 @@
     },{
       "index": 5,
       "prop": "storageInQuantity",
-      "label": "*出库量",
+      "label": "出库量",
       "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 6,
       "prop": "price",
-      "label": "*出库单价",
+      "label": "出库单价",
       "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 7,
@@ -117,7 +92,7 @@
     },{
       "index": 8,
       "prop": "unit",
-      "label": "*出库单位",
+      "label": "出库单位",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -125,32 +100,18 @@
         "value": "dictKey"
       },
       "dicData": [],
-      "rules": [
-        {
-          "required": true,
-          "message": "请选择",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 9,
       "prop": "grade",
-      "label": "*等级",
+      "label": "等级",
       "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },
     {
       "index": 10,
       "prop": "storageId",
-      "label": "*库区",
+      "label": "库区",
       "overHidden": true,
       "type": "select",
       "props": {
@@ -159,13 +120,6 @@
       },
       "dicData": [],
       "filterable":true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请选择",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 11,
@@ -176,15 +130,8 @@
     },{
       "index": 12,
       "prop": "itemType",
-      "label": "*品牌",
+      "label": "品牌",
       "overHidden": true,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 13,
@@ -195,18 +142,11 @@
     },{
       "index": 14,
       "prop": "sliceNumber",
-      "label": "*片数",
+      "label": "片数",
       "overHidden": true,
       "type":"number",
       "controls":false,
       "precision":0,
-      "rules": [
-        {
-          "required": true,
-          "message": "请输入",
-          "trigger": "blur"
-        }
-      ],
       "width": 100
     },{
       "index": 15,

+ 262 - 0
src/views/salesManagement/outStock/config/customerContactTwo.json

@@ -0,0 +1,262 @@
+{
+  "searchShow": true,
+  "searchMenuSpan": 6,
+  "border": true,
+  "index": true,
+  "selection": true,
+  "viewBtn": false,
+  "editBtn": false,
+  "addBtn": false,
+  "delBtn": false,
+  "menu": false,
+  "headerAlign": "center",
+  "menuWidth": 160,
+  "refreshBtn": false,
+  "showSumary": true,
+  "indexSlot": false,
+  "column": [{
+    "index": 1,
+    "prop": "itemId",
+    "label": "*品名",
+    "type": "select",
+    "props": {
+      "label": "cname",
+      "value": "id"
+    },
+    "dicData": [],
+    "overHidden": true,
+    "filterable":true,
+    "rules": [
+      {
+        "required": true,
+        "message": "请选择",
+        "trigger": "blur"
+      }
+    ],
+    "width": 100
+  },{
+    "index": 2,
+    "prop": "length",
+    "label": "长度(m)",
+    "overHidden": true,
+    "width": 100
+  },
+    {
+      "index": 3,
+      "prop": "thickness",
+      "label": "厚度(m)",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 4,
+      "prop": "billNo",
+      "label": "*捆包号",
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 5,
+      "prop": "storageInQuantity",
+      "label": "*出库量",
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 6,
+      "prop": "price",
+      "label": "*出库单价",
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 7,
+      "prop": "storageAmount",
+      "label": "出库金额",
+      "overHidden": true,
+      "width": 100
+    },{
+      "index": 8,
+      "prop": "unit",
+      "label": "*出库单位",
+      "overHidden": true,
+      "type": "select",
+      "props": {
+        "label": "dictValue",
+        "value": "dictKey"
+      },
+      "dicData": [],
+      "rules": [
+        {
+          "required": true,
+          "message": "请选择",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 9,
+      "prop": "grade",
+      "label": "*等级",
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },
+    {
+      "index": 10,
+      "prop": "storageId",
+      "label": "*库区",
+      "overHidden": true,
+      "type": "select",
+      "props": {
+        "label": "cname",
+        "value": "id"
+      },
+      "dicData": [],
+      "filterable":true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请选择",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 11,
+      "prop": "containerNo",
+      "label": "箱号",
+      "overHidden": true,
+      "width": 100
+    },{
+      "index": 12,
+      "prop": "itemType",
+      "label": "*品牌",
+      "overHidden": true,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 13,
+      "prop": "itemProp",
+      "label": "产地",
+      "overHidden": true,
+      "width": 100
+    },{
+      "index": 14,
+      "prop": "sliceNumber",
+      "label": "*片数",
+      "overHidden": true,
+      "type":"number",
+      "controls":false,
+      "precision":0,
+      "rules": [
+        {
+          "required": true,
+          "message": "请输入",
+          "trigger": "blur"
+        }
+      ],
+      "width": 100
+    },{
+      "index": 15,
+      "prop": "forklift",
+      "label": "叉车工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    },
+    {
+      "index": 16,
+      "prop": "carry",
+      "label": "搬运工",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    },{
+      "index": 17,
+      "prop": "surplusLoss",
+      "label": "盈亏量",
+      "overHidden": true,
+      "width": 100
+    },
+    {
+      "index": 18,
+      "prop": "isIssue",
+      "label": "库存状态",
+      "overHidden": true,
+      "dicData": [
+        {
+          "label": "录入",
+          "value": "0"
+        },
+        {
+          "label": "待入库",
+          "value": "1"
+        },
+        {
+          "label": "入库中",
+          "value": "2"
+        },
+        {
+          "label": "在库",
+          "value": "3"
+        },
+        {
+          "label": "计划",
+          "value": "4"
+        },
+        {
+          "label": "待出库",
+          "value": "5"
+        },
+        {
+          "label": "出库中",
+          "value": "6"
+        },
+        {
+          "label": "已出库",
+          "value": "7"
+        }
+      ],
+      "width": 100
+    },
+    {
+      "index": 19,
+      "prop": "remarks",
+      "label": "备注",
+      "overHidden": true,
+      "cell": true,
+      "width": 100
+    }
+  ]
+}

+ 244 - 141
src/views/salesManagement/outStock/detailsPage.vue

@@ -3,25 +3,28 @@
     <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">返回列表
+                   @click="backToList">返回列表
         </el-button>
       </div>
       <div class="add-customer-btn">
         <el-button type="info" @click="getData" size="small">刷新资料
         </el-button>
         <el-button type="primary" size="small" :disabled="form.status>0" v-if="detailData.status == 3"
-          class="el-button--small-yh " @click.stop="openEdit">编辑
+                   class="el-button--small-yh " @click.stop="openEdit">编辑
         </el-button>
         <el-button type="primary" @click="editCustomer" :loading="subLoading" v-if="detailData.status != 3"
-          size="small">保存数据
+                   size="small">保存数据
         </el-button>
         <el-dropdown style="padding: 0 6px;line-height: 0">
           <el-button type="primary" size="small" :loading="subLoading" :disabled="!form.id">
             审核处理<i class="el-icon-arrow-down el-icon--right"></i>
           </el-button>
           <el-dropdown-menu slot="dropdown">
-            <el-dropdown-item :disabled="!(form.status == 0 || form.status == 2)" @click.native="auditCheck">提交审核</el-dropdown-item>
-            <el-dropdown-item v-if="roleName=='admin'" :disabled="!(form.status==8 || form.status==5)" @click.native="revokeCheck">撤销审核</el-dropdown-item>
+            <el-dropdown-item :disabled="!(form.status == 0 || form.status == 2)" @click.native="auditCheck">提交审核
+            </el-dropdown-item>
+            <el-dropdown-item v-if="roleName=='admin'" :disabled="!(form.status==8 || form.status==5)"
+                              @click.native="revokeCheck">撤销审核
+            </el-dropdown-item>
             <el-dropdown-item :disabled="form.status<1" @click.native="checkScheduleDialog = true">审核进度
             </el-dropdown-item>
             <el-dropdown-item v-if="$route.query.check" :disabled="form.status == 0" @click.native="check">审批数据
@@ -35,52 +38,53 @@
         <avue-form ref="form" class="trading-form" v-model="form" :option="option">
           <template slot="purchaserId">
             <crop-select ref="purchaser" v-model="form.purchaserId" corpType="KH" :refresh="false"
-              @getCorpData="getKHData" :disabled="form.status > 0"></crop-select>
+                         @getCorpData="getKHData" :disabled="form.status > 0"></crop-select>
           </template>
           <template slot="corpId">
             <crop-select ref="corpId" v-model="form.corpId" corpType="GYS" :refresh="false" @getCorpData="getGYSData"
-              :disabled="form.status > 0"></crop-select>
+                         :disabled="form.status > 0"></crop-select>
           </template>
           <template slot="storageId">
             <el-cascader v-model="form.storageId" :options="storagetreeList" :show-all-levels="false"
-              :disabled="form.status > 0" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
-              clearable @change="storagetreeChange">
+                         :disabled="form.status > 0" :props="{ checkStrictly: true, emitPath: false, label: 'title' }"
+                         clearable @change="storagetreeChange">
             </el-cascader>
           </template>
           <template slot-scope="{column}" slot="purchaserIdLabel">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
           </template>
           <template slot-scope="{column}" slot="corpIdLabel">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
           </template>
           <template slot-scope="{column}" slot="storageIdLabel">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{column.label}}</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData('storage')">{{ column.label }}</span>
           </template>
         </avue-form>
       </trade-card>
       <trade-card title="出库明细">
         <avue-crud ref="crud" :data="itemsVOList" :option="tableOption" @row-del="rowDel" @saveColumn="saveColumn"
-          @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
+                   @resetColumn="resetColumn" :cell-style="cellStyle" @row-save="rowSave" @row-update="addUpdate">
           <template slot="menuLeft">
-<!--            <el-button type="primary" icon="el-icon-plus" size="small" :disabled="form.status > 0"-->
-<!--              @click.stop="addRow">录入明细-->
-<!--            </el-button>-->
-<!--            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板-->
-<!--            </el-button>-->
+            <el-button type="primary" icon="el-icon-plus" size="small"
+                       :disabled="!(!form.status || form.status == 0 || form.status == 8)"
+                       @click.stop="addRow">导入
+            </el-button>
+            <!--            <el-button type="success" icon="el-icon-bottom" size="small" @click.stop="getTemplate">下载模板-->
+            <!--            </el-button>-->
             <!-- <el-button type="info" icon="el-icon-top" size="small" :disabled="detailData.status == 3"
               @click.stop="addRow">导入
             </el-button> -->
             <el-button type="info" icon="el-icon-printer" size="small" @click.stop="openReport()">报表打印</el-button>
           </template>
-<!--          <template slot="headerSerial">-->
-<!--            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
-<!--              :disabled="detailData.status == 3" circle></el-button>-->
-<!--          </template>-->
+          <!--          <template slot="headerSerial">-->
+          <!--            <el-button type="primary" icon="el-icon-plus" size="mini" @click.stop="addRow"-->
+          <!--              :disabled="detailData.status == 3" circle></el-button>-->
+          <!--          </template>-->
           <template slot="storageIdHeader" slot-scope="{column}">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
           </template>
           <template slot="itemIdHeader" slot-scope="{column}">
-            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{column.label}}</span>
+            <span style="color: #409EFF;cursor: pointer" @click.stop="addData(column.prop)">{{ column.label }}</span>
           </template>
           <template slot="oneCode" slot-scope="{ row, index }">
             <el-popover placement="right" width="160" trigger="click">
@@ -96,24 +100,29 @@
           </template>
           <template slot="storageInQuantityForm" slot-scope="{ row,disabled }">
             <el-input-number size="small" v-model="row.storageInQuantity" @change="calculateChange(row)"
-              :controls="false" style="width:100%" placeholder="请输入"></el-input-number>
+                             :controls="false" style="width:100%" placeholder="请输入"></el-input-number>
           </template>
           <template slot="priceForm" slot-scope="{ row,disabled }">
             <el-input-number size="small" v-model="row.price" @change="calculateChange(row)" :controls="false"
-              style="width:100%" placeholder="请输入"></el-input-number>
+                             style="width:100%" placeholder="请输入"></el-input-number>
           </template>
           <template slot="menu" slot-scope="{ row, index }">
             <div style="display:flex;justify-content: center;">
-              <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)" :disabled="form.status > 0">{{ row.$cellEdit ? "保存" : "编辑" }}</el-button>
-              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)" :disabled="form.status > 0">删除</el-button>
+              <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
+                         :disabled="!(!form.status || form.status == 0 || form.status == 8)">
+                {{ row.$cellEdit ? "保存" : "编辑" }}
+              </el-button>
+              <el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
+                         :disabled="!(!form.status || form.status == 0 || form.status == 8)">删除
+              </el-button>
               <!-- <el-button size="small" icon="el-icon-printer" type="text" @click="rowPrint(row, index)" :disabled="!row.id">
                 打印</el-button> -->
               <div style="display:flex;flex-direction: column;justify-content: center;margin-left: 10px;">
                 <el-tooltip effect="dark" content="向上移动" placement="top">
                   <i v-if="index != 0&&detailData.status != 3" :disabled="detailData.status == 3"
-                    class="el-icon-arrow-up" @click="moveUp(row, index)" style="color:#409EFF;"></i>
+                     class="el-icon-arrow-up" @click="moveUp(row, index)" style="color:#409EFF;"></i>
                 </el-tooltip>
-                <el-tooltip effect="dark" content="向下移动" placement="bottom"> <i
+                <el-tooltip effect="dark" content="向下移动" placement="bottom"><i
                     v-if="index != (itemsVOList.length - 1)&&detailData.status != 3" :disabled="detailData.status == 3"
                     class="el-icon-arrow-down" @click="moveDown(row, index)" style="color:#409EFF;"></i></el-tooltip>
               </div>
@@ -121,49 +130,79 @@
           </template>
         </avue-crud>
       </trade-card>
-      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0)"
-        feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
-        :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false" />
+      <fee-info ref="feeInfo" :orderFeesList="orderFeesList" :disabled="!(form.status == 2 || form.status == 0 || !form.status)"
+                feeUrl="/blade-purchase-sales/entranceOrder/removeOrderFees" :optionType="'CMY'" :itemType="'D'"
+                :inCropId="true" @beforeFinance="beforeFinance" :delType="2" :billingShow="false"/>
       <!-- <upload-file ref="uploadFile" title="合同附件" :disabled="detailData.status == 3" :orderFilesList="orderFilesList"
         delUrl="" /> -->
       <containerTitle title="上传附件"></containerTitle>
       <c-upload typeUpload="CD" deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
-        :data="orderFilesList" display :enumerationValue="85.6" :disabled="!(form.status == 2 || form.status == 0)"></c-upload>
-
+                :data="orderFilesList" display :enumerationValue="85.6"
+                :disabled="!(form.status == 2 || form.status == 0 || !form.status)"></c-upload>
       <el-dialog append-to-body title="审核进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
-        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+                 :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
         <check-schedule :checkId="form.id" :batchNo="batchNo" @choceScheduleFun="choceScheduleFun">
         </check-schedule>
       </el-dialog>
       <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
-        :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+                 :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
         <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
         </check>
       </el-dialog>
     </div>
+    <el-dialog
+        title="选择明细"
+        class="el-dialogDeep"
+        :visible.sync="dialogVisible"
+        append-to-body
+        width="80%">
+      <span>
+        <avue-crud :option="tableOptionTwo" ref="crudTwo" :data="dialogList" @selection-change="selectionChange" @saveColumn="saveColumnTwo" @resetColumn="resetColumnTwo"></avue-crud>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="confirmImport">确 定</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
 <script>
-import { detail, submit, checkWarehousing, getStoragetree, getStorage, getAllgoods, financingExcess, revokeWarehousing,delItem } from "@/api/purchasingManagement/inStock";
+import {
+  detail,
+  submit,
+  checkWarehousing,
+  getStoragetree,
+  getStorage,
+  getAllgoods,
+  financingExcess,
+  revokeWarehousing,
+  delItem,
+  scanningCodeAddPc
+} from "@/api/purchasingManagement/inStock";
 import tableOption from "./config/customerContact.json";
+import tableOptionTwo from "./config/customerContactTwo.json";
 import feeInfo from "@/components/fee-info/main";
 import checkSchedule from "../../../components/check/checkSchedule";
 import uploadFile from "@/components/upload-file/main";
-import { getToken } from "@/util/auth";
-import { contrastObj, contrastList, contrastList2 } from "@/util/contrastData";
-import { getCurrentDate } from "@/util/date";
-import {validatenull } from '@/util/validate'
+import {getToken} from "@/util/auth";
+import {contrastObj, contrastList, contrastList2} from "@/util/contrastData";
+import {getCurrentDate} from "@/util/date";
+import {validatenull} from '@/util/validate'
 import check from "@/components/check/check";
+
 export default {
   name: "detailsPageEdit",
   data() {
     return {
       checkData: {},
+      dialogVisible: false,
+      dialogList:[],
       checkDialog: false,
       form: {},
       checkScheduleDialog: false,
       tableOption: {},
+      tableOptionTwo: {},
       option: {
         disabled: false,
         menuBtn: false,
@@ -229,7 +268,7 @@ export default {
             label: "车船号",
             prop: "vehicleShipNumber",
             span: 6
-          },{
+          }, {
             label: "审核状态",
             prop: "status",
             type: "select",
@@ -252,7 +291,19 @@ export default {
             prop: "sysNo",
             disabled: true,
             span: 6
-          },{
+          },
+          {
+            label: "库管员",
+            prop: "stockUser",
+            span: 6,
+            dataType: "number",
+            type: 'select',
+            dicUrl: "/api/blade-user/MCSelectList",
+            props: {
+              label: "realName",
+              value: "id"
+            }
+          }, {
             label: "是否融资",
             prop: "arrival",
             type: "select",
@@ -273,7 +324,7 @@ export default {
             prop: "orderRemark",
             type: "textarea",
             minRows: 1,
-            span: 12
+            span: 24
           },
         ]
       },
@@ -288,7 +339,8 @@ export default {
       olditemsVOList: [],
       oldorderFeesList: [],
       oldorderFilesList: [],
-      roleName:localStorage.getItem("roleName")
+      roleName: localStorage.getItem("roleName"),
+      selectionList:[]
     };
   },
   props: {
@@ -302,14 +354,14 @@ export default {
     uploadFile,
     check
   },
-  watch:{
-    form:{
-      handler(){
+  watch: {
+    form: {
+      handler() {
         if (this.form.status > 0) {
-          this.$set(this.option,'disabled',true)
-          this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
-        }else {
-          this.$set(this.option,'disabled',false)
+          this.$set(this.option, 'disabled', true)
+          // this.$set(this.findObject(this.tableOption.column, "remarks"),'disabled',true)
+        } else {
+          this.$set(this.option, 'disabled', false)
         }
       }
     }
@@ -321,20 +373,18 @@ export default {
     if (this.detailData.id) {
       this.getDetail(this.detailData.id);
     }
-    this.tableOption = await this.getColumnData(
-      this.getColumnName(191),
-      tableOption
-    );
+    this.tableOption = await this.getColumnData(this.getColumnName(191),tableOption);
+    this.tableOptionTwo = await this.getColumnData(this.getColumnName(191.1),tableOptionTwo);
     getStoragetree().then(res => {
       this.storagetreeList = res.data.data;
     })
     this.getWorkDicts("approval_status").then(res => {
       this.findObject(this.option.column, "status").dicData =
-        res.data.data;
+          res.data.data;
     });
     this.getWorkDicts("CMY_business_type").then(res => {
       this.findObject(this.option.column, "businessType").dicData =
-        res.data.data;
+          res.data.data;
     });
     if (this.$route.query.generateId) {
       this.getGenerate(this.$route.query.generateId);
@@ -342,6 +392,24 @@ export default {
     this.getAllWorkDicts()
   },
   methods: {
+    selectionChange(list){
+      this.selectionList = list
+    },
+    confirmImport(){
+      for (let item in this.selectionList){
+        for (let li of this.itemsVOList){
+          if (this.selectionList[item].billNo == li.billNo) return this.$message.warning('第'+Number(Number(item)+1)+'条已存在,请勿重复导入!')
+        }
+        this.itemsVOList.push({
+          ...this.selectionList[item],
+          srcItemId:this.selectionList[item].id,
+          $cellEdit: true
+        })
+        delete this.itemsVOList[this.itemsVOList.length-1].id
+      }
+      this.selectionList = []
+      this.dialogVisible = false
+    },
     check() {
       this.checkData = this.$route.query.check
       this.checkDialog = true
@@ -353,7 +421,9 @@ export default {
     getData() {
       getAllgoods().then(res => {
         this.findObject(this.tableOption.column, "itemId").dicData =
-          res.data.data;
+            res.data.data;
+        this.findObject(this.tableOptionTwo.column, "itemId").dicData =
+            res.data.data;
       })
       getStoragetree().then(res => {
         this.storagetreeList = res.data.data;
@@ -365,18 +435,20 @@ export default {
     getAllWorkDicts() {
       getAllgoods().then(res => {
         this.findObject(this.tableOption.column, "itemId").dicData =
-          res.data.data;
+            res.data.data;
+        this.findObject(this.tableOptionTwo.column, "itemId").dicData =
+            res.data.data;
       })
       this.getWorkDicts("unit").then(res => {
         this.findObject(this.tableOption.column, "unit").dicData =
-          res.data.data;
+            res.data.data;
       });
     },
     cellStyle() {
       return "padding:0;height:40px;";
     },
     getStorage() {
-      getStorage({ storageTypeId: this.form.storageId }).then(res => {
+      getStorage({storageTypeId: this.form.storageId}).then(res => {
         this.findObject(this.tableOption.column, "storageId").dicData = res.data;
       })
     },
@@ -413,8 +485,15 @@ export default {
       this.$refs["form"].validate((valid, done) => {
         done();
         if (valid) {
-          this.itemsVOList.push({ $cellEdit: true });
-          this.getStorage()
+          scanningCodeAddPc({
+            storageId:this.form.storageId,
+            purchaserId:this.form.purchaserId
+          }).then(res=>{
+            this.dialogList = res.data.data.records
+            this.dialogVisible = true
+          })
+          // this.itemsVOList.push({$cellEdit: true});
+          // this.getStorage()
         } else {
           return false;
         }
@@ -437,7 +516,7 @@ export default {
         type: "warning"
       }).then(() => {
         if (row.id) {
-          delItem({ itemId: row.id }).then(res => {
+          delItem({itemId: row.id, type: "CK"}).then(res => {
             this.$message({
               type: "success",
               message: "删除成功!"
@@ -456,44 +535,45 @@ export default {
     getDetail(id) {
       this.pageLoading = true;
       detail(id)
-        .then(res => {
-          this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList;
-          this.orderFeesList = res.data.data.orderFeesList;
-          this.orderFilesList = res.data.data.orderFilesList;
-          this.oldform = this.deepClone(res.data.data);
-          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
-          this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
-          this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
-          this.getStorage()
-        })
-        .finally(() => {
-          this.pageLoading = false;
-        });
+          .then(res => {
+            this.form = res.data.data;
+            this.itemsVOList = res.data.data.itemsVOList;
+            this.orderFeesList = res.data.data.orderFeesList;
+            this.orderFilesList = res.data.data.orderFilesList;
+            this.oldform = this.deepClone(res.data.data);
+            this.olditemsVOList = this.deepClone(res.data.data.itemsVOList);
+            this.oldorderFeesList = this.deepClone(res.data.data.orderFeesList);
+            this.oldorderFilesList = this.deepClone(res.data.data.orderFilesList);
+            this.getStorage()
+          })
+          .finally(() => {
+            this.pageLoading = false;
+          });
     },
     getGenerate(id) {
       this.pageLoading = true;
       detail(id)
-        .then(res => {
-          delete res.data.data.id
-          delete res.data.data.createTime
-          delete res.data.data.createUser
-          delete res.data.data.createUserName
-          delete res.data.data.sysNo
-          delete res.data.data.status
-          res.data.data.stockTime = getCurrentDate()
-          res.data.data.itemsVOList.forEach(e => {
-            e.storageInQuantity=e.balanceNumber
-            delete e.id
-          })
-          this.form = res.data.data;
-          this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 3);
-          this.oldform = this.deepClone(res.data.data);
-          this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 3));
-          this.getStorage()
-        }).finally(() => {
-          this.pageLoading = false;
-        });
+          .then(res => {
+            delete res.data.data.id
+            delete res.data.data.createTime
+            delete res.data.data.createUser
+            delete res.data.data.createUserName
+            delete res.data.data.sysNo
+            delete res.data.data.status
+            res.data.data.stockTime = getCurrentDate()
+            res.data.data.itemsVOList.forEach(e => {
+              e.storageInQuantity = e.balanceNumber
+              e.srcItemId = e.id
+              delete e.id
+            })
+            this.form = res.data.data;
+            this.itemsVOList = res.data.data.itemsVOList.filter(item => item.isIssue == 3);
+            this.oldform = this.deepClone(res.data.data);
+            this.olditemsVOList = this.deepClone(res.data.data.itemsVOList.filter(item => item.isIssue == 3));
+            this.getStorage()
+          }).finally(() => {
+        this.pageLoading = false;
+      });
     },
     //修改提交触发
     editCustomer(status) {
@@ -501,32 +581,32 @@ export default {
         done();
         if (valid) {
           for (let i = 0; i < this.itemsVOList.length; i++) {
-            if(validatenull(this.itemsVOList[i].storageId)){
-              return this.$message.error('请完善第'+(i+1)+'行的库区')
+            if (validatenull(this.itemsVOList[i].storageId)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的库区')
             }
-            if(validatenull(this.itemsVOList[i].itemId)){
-              return this.$message.error('请完善第'+(i+1)+'行的品名')
+            if (validatenull(this.itemsVOList[i].itemId)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的品名')
             }
-            if(validatenull(this.itemsVOList[i].itemType)){
-              return this.$message.error('请完善第'+(i+1)+'行的品牌')
+            if (validatenull(this.itemsVOList[i].itemType)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的品牌')
             }
-            if(validatenull(this.itemsVOList[i].grade)){
-              return this.$message.error('请完善第'+(i+1)+'行的等级')
+            if (validatenull(this.itemsVOList[i].grade)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的等级')
             }
-            if(validatenull(this.itemsVOList[i].billNo)){
-              return this.$message.error('请完善第'+(i+1)+'行的捆包号')
+            if (validatenull(this.itemsVOList[i].billNo)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的捆包号')
             }
-            if(validatenull(this.itemsVOList[i].sliceNumber)){
-              return this.$message.error('请完善第'+(i+1)+'行的片数')
+            if (validatenull(this.itemsVOList[i].sliceNumber)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的片数')
             }
-            if(validatenull(this.itemsVOList[i].storageInQuantity)){
-              return this.$message.error('请完善第'+(i+1)+'行的入库量')
+            if (validatenull(this.itemsVOList[i].storageInQuantity)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的入库量')
             }
-            if(validatenull(this.itemsVOList[i].unit)){
-              return this.$message.error('请完善第'+(i+1)+'行的入库单位')
+            if (validatenull(this.itemsVOList[i].unit)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的入库单位')
             }
-            if(validatenull(this.itemsVOList[i].price)){
-              return this.$message.error('请完善第'+(i+1)+'行的入库单价')
+            if (validatenull(this.itemsVOList[i].price)) {
+              return this.$message.error('请完善第' + (i + 1) + '行的入库单价')
             }
           }
           this.itemsVOList.forEach((e, index) => {
@@ -558,9 +638,9 @@ export default {
               this.$emit("goBack");
             }
           })
-            .finally(() => {
-              this.subLoading = false;
-            });
+              .finally(() => {
+                this.subLoading = false;
+              });
         } else {
           return false;
         }
@@ -575,7 +655,7 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(() => {
-          financingExcess({ id: this.form.purchaserId }).then(res => {
+          financingExcess({id: this.form.purchaserId}).then(res => {
             if (res.data.data == '操作成功') {
               this.$confirm("确定审核此订单?", {
                 confirmButtonText: "确定",
@@ -586,7 +666,7 @@ export default {
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
-                  status:this.form.status,
+                  status: this.form.status,
                   url: '/salesManagement/outStock/index',
                   pageStatus: "this.$store.getters.entranceXsStatus",
                   pageLabel: "出库管理",
@@ -613,7 +693,7 @@ export default {
                 const data = {
                   id: this.form.id,
                   checkType: 'CK',
-                  status:this.form.status,
+                  status: this.form.status,
                   url: '/salesManagement/outStock/index',
                   pageStatus: "this.$store.getters.entranceXsStatus",
                   pageLabel: "出库管理",
@@ -634,7 +714,7 @@ export default {
           })
         })
       } else {
-        financingExcess({ id: this.form.purchaserId }).then(res => {
+        financingExcess({id: this.form.purchaserId}).then(res => {
           if (res.data.data == '操作成功') {
             this.$confirm("确定审核此订单?", {
               confirmButtonText: "确定",
@@ -645,7 +725,7 @@ export default {
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
-                status:this.form.status,
+                status: this.form.status,
                 url: '/salesManagement/outStock/index',
                 pageStatus: "this.$store.getters.entranceXsStatus",
                 pageLabel: "出库管理",
@@ -672,7 +752,7 @@ export default {
               const data = {
                 id: this.form.id,
                 checkType: 'CK',
-                status:this.form.status,
+                status: this.form.status,
                 url: '/salesManagement/outStock/index',
                 pageStatus: "this.$store.getters.entranceXsStatus",
                 pageLabel: "出库管理",
@@ -725,22 +805,22 @@ export default {
     backToList() {
       let orderFeesList = this.$refs.feeInfo.submitData();
       if (
-        contrastObj(this.form, this.oldform) ||
-        contrastList(this.itemsVOList, this.olditemsVOList) ||
-        contrastList2(orderFeesList, this.oldorderFeesList) ||
-        contrastList(this.orderFilesList, this.oldorderFilesList)
+          contrastObj(this.form, this.oldform) ||
+          contrastList(this.itemsVOList, this.olditemsVOList) ||
+          contrastList2(orderFeesList, this.oldorderFeesList) ||
+          contrastList(this.orderFilesList, this.oldorderFilesList)
       ) {
         this.$confirm("数据发生变化未有提交记录, 是否提交?", "提示", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
           type: "warning"
         })
-          .then(() => {
-            this.editCustomer("goBack");
-          })
-          .catch(() => {
-            this.$emit("goBack");
-          });
+            .then(() => {
+              this.editCustomer("goBack");
+            })
+            .catch(() => {
+              this.$emit("goBack");
+            });
       } else {
         this.$emit("goBack");
       }
@@ -784,8 +864,8 @@ export default {
     },
     async saveColumn() {
       const inSave = await this.saveColumnData(
-        this.getColumnName(191),
-        this.tableOption
+          this.getColumnName(191),
+          this.tableOption
       );
       if (inSave) {
         this.$nextTick(() => {
@@ -799,8 +879,8 @@ export default {
     async resetColumn() {
       this.tableOption = tableOption;
       const inSave = await this.delColumnData(
-        this.getColumnName(191),
-        tableOption
+          this.getColumnName(191),
+          tableOption
       );
       if (inSave) {
         this.$nextTick(() => {
@@ -814,6 +894,29 @@ export default {
           this.$refs.crud.$refs.dialogColumn.columnBox = false;
         }, 1000);
       }
+    },
+    async saveColumnTwo() {
+      const inSave = await this.saveColumnData(
+          this.getColumnName(191.1),
+          this.tableOptionTwo
+      );
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口
+        this.$refs.crudTwo.$refs.dialogColumn.columnBox = false;
+      }
+    },
+    async resetColumnTwo() {
+      this.tableOptionTwo = tableOptionTwo;
+      const inSave = await this.delColumnData(
+          this.getColumnName(191.1),
+          tableOptionTwo
+      );
+      if (inSave) {
+        this.$message.success("重置成功");
+        //关闭窗口
+        this.$refs.crudTwo.$refs.dialogColumn.columnBox = false;
+      }
     }
   }
 };

+ 2 - 2
src/views/salesManagement/outStock/index.vue

@@ -6,10 +6,10 @@
                 @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad" :table-loading="loading"
                 @saveColumn="saveColumn" @resetColumn="resetColumn" :cell-style="cellStyle"
                 @selection-change="selectionChange" @search-criteria-switch="searchCriteriaSwitch">
-                <!-- <template slot="menuLeft">
+                <template slot="menuLeft">
                     <el-button type="primary" icon="el-icon-plus" size="small" @click.stop="newAdd()">创建单据
                     </el-button>
-                </template> -->
+                </template>
                 <template slot-scope="{ row,index}" slot="menu">
                     <el-button type="text" icon="el-icon-delete" size="small" :disabled="row.status>0"
                         @click.stop="rowDel(row, index)">删除