Qukatie 2 недель назад
Родитель
Сommit
0021cdaf9d

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

@@ -2093,6 +2093,9 @@ const columnName = [{
 },{
   code: 480,
   name: '库存管理(L)-库存查询-库区明细'
+}, {
+  code: 481,
+  name: '库存管理L-盘点-选择库存'
 }
 ]
 export const getColumnName = (key) => {

+ 6 - 2
src/views/tirePartsMall/inventory/areaDetail.vue

@@ -45,11 +45,15 @@ export default {
         summaryText: "合计",
         sumColumnList: [
           {
-            name: "addSendTotalNum",
+            name: "quantity",
             type: "sum"
           },
           {
-            name: "subSendTotalNum",
+            name: "outQuantity",
+            type: "sum"
+          },
+          {
+            name: "balanceQuantity",
             type: "sum"
           }
         ],

+ 1 - 1
src/views/tirePartsMall/purchaseService/outStorage/components/viewArea.vue

@@ -156,7 +156,7 @@ export default {
       this.query = row;
       this.index = index;
       this.data = row.historyList;
-      this.qtyMax = row.goodsNum;
+      this.qtyMax = row.remainingNum;
       this.dialogVisible = true;
       if(row.historyList.length==0){
         this.onLoad()

+ 17 - 2
src/views/tirePartsMall/purchaseService/outStorage/detailsPage.vue

@@ -55,8 +55,23 @@
                 >
                   清空库区
                 </el-button>
-                <el-button v-if="reservoirArea == 1" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
-                  {{ row.historyList.length ? "查看库区" : "选择库区" }}
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length"
+                  :size="size"
+                  :disabled="!row.id"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  查看库区
+                </el-button>
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length == 0"
+                  :size="size"
+                  :disabled="!row.id || disabled || isDisabled"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  选择库区
                 </el-button>
                 <el-button
                   v-if="reservoirArea != 1"

+ 1 - 1
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/components/viewArea.vue

@@ -177,7 +177,7 @@ export default {
       this.query = row;
       this.index = index;
       this.data = row.historyList;
-      this.qtyMax = row.goodsNum;
+      this.qtyMax = row.remainingNum;
       this.dialogVisible = true;
     },
     submit() {

+ 19 - 4
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -90,8 +90,23 @@
                 >
                   清空库区
                 </el-button>
-                <el-button v-if="reservoirArea == 1" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
-                  {{ row.historyList.length ? "查看库区" : "选择库区" }}
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length"
+                  :size="size"
+                  :disabled="!row.id"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  查看库区
+                </el-button>
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length == 0"
+                  :size="size"
+                  :disabled="!row.id || form.statusName == '已入库' || isEdit || isEdits"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  选择库区
                 </el-button>
                 <el-button
                   v-if="reservoirArea != 1"
@@ -266,7 +281,7 @@ export default {
       fixForm: {
         reservoirAreaId: null,
         reservoirAreaName: null,
-          balanceQuantity:0
+        balanceQuantity: 0
       },
       numberDecimal: 0,
       // 上传附件的需要参数
@@ -955,7 +970,7 @@ export default {
         this.fixForm = {
           reservoirAreaId: null,
           reservoirAreaName: null,
-          balanceQuantity:0
+          balanceQuantity: 0
         };
         this.diaVisible = true;
       }

+ 16 - 7
src/views/tirePartsMall/salesManagement/Inventory/detailsPage.vue

@@ -104,10 +104,19 @@
               type="text"
               @click="rowDelArea(row, index)"
             >
-              撤销
+              清空库区
             </el-button>
-            <el-button v-if="reservoirArea == 1" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
-              {{ row.historyList.length ? "查看库区" : "选择库区" }}
+            <el-button v-if="reservoirArea == 1 && row.historyList.length" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
+              查看库区
+            </el-button>
+            <el-button
+              v-if="reservoirArea == 1 && row.historyList.length == 0"
+              :size="size"
+              :disabled="!row.id || form.status == '已确认'"
+              type="text"
+              @click="rowArea(row, index)"
+            >
+              选择库区
             </el-button>
             <el-button
               v-if="mingxibaocun"
@@ -138,7 +147,7 @@
           </template>
         </avue-crud>
       </trade-card>
-      <view-area ref="viewArea" @areaData="areaData"></view-area>
+      <view-area ref="viewArea" @areaData="areaData" :disabled="form.status == '已确认'"></view-area>
       <el-dialog title="导入明细" append-to-body :visible.sync="excelBox" v-if="excelBox" width="555px" :close-on-click-modal="false" v-dialog-drag>
         <avue-form :option="excelOption" table-loading="excelLoading" :upload-before="uploadBefore" :upload-after="uploadAfter"> </avue-form>
         <p style="text-align: center;color: #DC0505">
@@ -179,8 +188,8 @@
             @selection-change="selectionChange"
             @current-change="currentCurrent"
             @size-change="sizeChange"
-            @resetColumn="resetColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)"
-            @saveColumn="saveColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 268)"
+            @resetColumn="resetColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 481)"
+            @saveColumn="saveColumnTwo('inventoryCrud', 'inventoryOption', 'inventoryOptionList', 481)"
           >
           </avue-crud>
         </el-col>
@@ -885,7 +894,7 @@ export default {
     // 明细的配置
     this.optionContacts = await this.getColumnData(this.getColumnName(269.4), this.optionContactsBack);
     // 弹窗的配置
-    this.inventoryOption = await this.getColumnData(this.getColumnName(268), this.inventoryOptionList);
+    this.inventoryOption = await this.getColumnData(this.getColumnName(481), this.inventoryOptionList);
     isProcurement({ param: "whether.model" }).then(res => {
       if (res.data.data == 1) {
         this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";

+ 1 - 1
src/views/tirePartsMall/salesManagement/outboundWorkOrder/components/viewArea.vue

@@ -155,7 +155,7 @@ export default {
       this.query = row;
       this.index = index;
       this.data = row.historyList;
-      this.qtyMax = row.goodsNum;
+      this.qtyMax = row.remainingNum;
       this.dialogVisible = true;
       if (row.historyList.length == 0) {
         this.onLoad();

+ 11 - 2
src/views/tirePartsMall/salesManagement/outboundWorkOrder/detailsPage.vue

@@ -100,13 +100,22 @@
                   清空库区
                 </el-button>
                 <el-button
-                  v-if="reservoirArea == 1"
+                  v-if="reservoirArea == 1 && row.historyList.length"
                   :size="size"
                   :disabled="!row.id"
                   type="text"
                   @click="rowArea(row, index)"
                 >
-                  {{ row.historyList.length ? "查看库区" : "选择库区" }}
+                  查看库区
+                </el-button>
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length == 0"
+                  :size="size"
+                  :disabled="!row.id || disabled || isDisabled"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  选择库区
                 </el-button>
                 <el-button
                   v-if="reservoirArea != 1"

+ 5 - 5
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/commodityxsho.json

@@ -70,11 +70,6 @@
       "width": 100
     },
     {
-      "label": "单价",
-      "prop":"price",
-      "overHidden": true
-    },
-    {
       "label": "批次号",
       "prop": "whether",
       "type":"select",
@@ -186,6 +181,11 @@
       }]
     },
     {
+      "label": "单价",
+      "prop":"price",
+      "overHidden": true
+    },
+    {
       "label": "共享公司",
       "prop": "sharedCompany",
       "slot": true,

+ 0 - 296
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/components/viewArea copy.vue

@@ -1,296 +0,0 @@
-<template>
-  <div>
-    <el-dialog title="查看库区" :visible.sync="dialogVisible" append-to-body width="60%" :before-close="handleClose">
-      <avue-crud
-        v-if="dialogVisible"
-        :option="option"
-        :table-loading="loading"
-        :data="data"
-        ref="crud"
-        id="out-table"
-        :header-cell-class-name="headerClassName"
-      >
-        <template slot="callInReservoirAreaName" slot-scope="{ row }">
-          <dic-select
-            :key="callInStorageId"
-            v-model="row.callInReservoirAreaName"
-            placeholder="库区"
-            label="cname"
-            res="records"
-            :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + callInStorageId"
-            :filterable="true"
-            :remote="true"
-            dataName="cname"
-            :disabled="disabled"
-            @selectChange="rowDicChange('callInReservoirAreaName', $event, row)"
-          ></dic-select>
-        </template>
-        <template slot="quantity" slot-scope="{ row }">
-          <el-input-number
-            v-model="row.quantity"
-            size="small"
-            :controls="false"
-            style="width: 100%"
-            :max="row.balanceQuantity"
-            :disabled="disabled"
-            @change="qtyChange(row)"
-          />
-        </template>
-      </avue-crud>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false" size="mini">取 消</el-button>
-        <el-button type="primary" @click="submit" size="mini">确 认</el-button>
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { selectReservoirAreaList } from "@/api/tirePartsMall/salesManagement/outboundWorkOrder";
-import { head } from "lodash";
-import { isProcurement } from "@/api/basicData/configuration";
-import dicSelect from "@/components/dicSelect/main";
-export default {
-   props: {
-    disabled: {
-      type: Boolean,
-      default: false
-    }
-  },
-  components: {
-    dicSelect
-  },
-  data() {
-    return {
-      callInStorageId: null,
-      data: [],
-      dialogVisible: false,
-      loading: false,
-      option: {
-        height: 500,
-        calcHeight: 30,
-        border: true,
-        index: true,
-        addBtn: false,
-        viewBtn: false,
-        delBtn: false,
-        editBtn: false,
-        menu: false,
-        header: false,
-        column: [
-          {
-            label: "库区",
-            prop: "reservoirAreaName",
-            overHidden: true
-          },
-          {
-            label: "调入库库区",
-            prop: "callInReservoirAreaName",
-            overHidden: true
-          },
-          {
-            label: "批次",
-            prop: "dot",
-            overHidden: true
-          },
-          {
-            label: "库存",
-            prop: "balanceQuantity",
-            overHidden: true
-          },
-          {
-            label: "融资库存",
-            prop: "balanceQuantityFinancing",
-            overHidden: true,
-            hide: true
-          },
-          {
-            label: "自有库存",
-            prop: "balanceQuantityHave",
-            overHidden: true,
-            hide: true
-          },
-          {
-            label: "本次数量",
-            prop: "quantity",
-            overHidden: true
-          },
-          {
-            label: "本次融资数量",
-            prop: "quantityFinancing",
-            overHidden: true,
-            hide: true
-          },
-          {
-            label: "本次自有数量",
-            prop: "quantityHave",
-            overHidden: true,
-            hide: true
-          }
-        ]
-      },
-      query: {},
-      index: 0,
-      whetherFinancing: 0,
-      qtyMax: 0
-    };
-  },
-  async created() {
-    isProcurement({ param: "whether.financing" }).then(res => {
-      if (res.data.data == 1) {
-        this.whetherFinancing = res.data.data;
-        this.findObject(this.option.column, "balanceQuantityFinancing").hide = false;
-        this.findObject(this.option.column, "balanceQuantityHave").hide = false;
-        this.findObject(this.option.column, "quantityFinancing").hide = false;
-        this.findObject(this.option.column, "quantityHave").hide = false;
-      }
-    });
-  },
-  methods: {
-    rowDicChange(name, row, el) {
-      if (name == "callInReservoirAreaName") {
-        if (row) {
-          el.callInReservoirAreaId = row.id;
-        } else {
-          el.callInReservoirAreaId = null;
-          el.callInReservoirAreaName = null;
-        }
-      }
-    },
-    qtyChange(row) {
-      let sum = 0;
-      for (let item of this.data) {
-        sum += Number(item.quantity);
-      }
-      if (sum > this.qtyMax) {
-        return this.$message.error("总数量不能超过" + this.qtyMax);
-      }
-      //融资系统参数=1
-      if (this.whetherFinancing == 1) {
-        if (row.balanceQuantityFinancing > 0) {
-          //融资库存>0
-          if (Number(row.quantity) <= Number(row.balanceQuantityFinancing)) {
-            //本次数量小于等于融资库存 取本次数量
-            row.quantityFinancing = row.quantity;
-          } else {
-            //本次数量大于融资库存 最大值取融资库存
-            row.quantityFinancing = row.balanceQuantityFinancing;
-          }
-        } else {
-          //融资库存=0
-          row.quantityFinancing = 0;
-        }
-        if (row.balanceQuantityHave > 0) {
-          //自有库存>0
-          if (Number(row.quantity) <= Number(row.balanceQuantityHave)) {
-            //本次数量小于等于自有库存 取本次数量
-            row.quantityHave = row.quantity;
-          } else {
-            //本次数量大于融资库存 最大值取自有库存
-            row.quantityHave = row.balanceQuantityHave;
-          }
-        } else {
-          //自有库存=0
-          row.quantityHave = 0;
-        }
-      }
-    },
-    onLoad() {
-      this.loading = true;
-      selectReservoirAreaList(this.obj)
-        .then(res => {
-          this.data = res.data.data;
-        })
-        .finally(() => {
-          this.loading = false;
-        });
-    },
-    openDialog(val, index, list, max, callInStorageId) {
-      this.data = [];
-      this.index = 0;
-      this.qtyMax = 0;
-      this.callInStorageId = null;
-      this.dialogVisible = true;
-      this.obj = val;
-      this.index = index;
-      this.data = list;
-      this.qtyMax = max;
-      this.callInStorageId = callInStorageId;
-      if (list.length == 0) {
-        this.onLoad();
-      }
-    },
-    submit() {
-      if (this.data.filter(item => item.quantity > 0).length == 0) {
-        return this.$message.error("至少有一条本次数量不能为0");
-      }
-      let sum = 0;
-      for (let item of this.data) {
-        sum += Number(item.quantity);
-      }
-      if (sum > this.qtyMax) {
-        return this.$message.error("总数量不能超过" + this.qtyMax);
-      }
-      this.$emit(
-        "areaData",
-        this.data.filter(item => item.quantity > 0),
-        this.index
-      );
-
-      this.dialogVisible = false;
-    },
-    //自定义列保存
-    async saveColumn(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;
-        this.searchReset();
-      }
-    },
-    //自定义列重置
-    async resetColumn(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;
-      }
-    },
-
-    // 更改表格颜色
-    headerClassName(tab) {
-      //颜色间隔
-      let back = "";
-      if (tab.columnIndex >= 0 && tab.column.level === 1) {
-        if (tab.columnIndex % 2 === 0) {
-          back = "back-one";
-        } else if (tab.columnIndex % 2 === 1) {
-          back = "back-two";
-        }
-      }
-      return back;
-    }
-  }
-};
-</script>
-
-<style scoped>
-::v-deep#out-table .back-one {
-  background: #ecf5ff !important;
-  text-align: center;
-  padding: 4px 0;
-}
-
-::v-deep#out-table .back-two {
-  background: #ecf5ff !important;
-  text-align: center;
-  padding: 4px 0;
-}
-</style>

+ 16 - 25
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/detailsPage.vue

@@ -29,7 +29,7 @@
           style="margin-left: 6px;"
           @click="confirmComplete"
           :disabled="isSave"
-          >完成调拨
+          >已出仓
         </el-button>
       </div>
     </div>
@@ -104,14 +104,23 @@
             <el-button
               v-if="reservoirArea == 1 && row.historyList.length"
               :size="size"
-              :disabled="!row.id || disabled || isDisabled"
+              :disabled="!row.id || disabled || isAddDisabled"
               type="text"
               @click="rowDelArea(row, index)"
             >
               清空库区
             </el-button>
-            <el-button v-if="reservoirArea == 1" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
-              {{ row.historyList.length ? "查看库区" : "选择库区" }}
+            <el-button v-if="reservoirArea == 1 && row.historyList.length" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
+              查看库区
+            </el-button>
+            <el-button
+              v-if="reservoirArea == 1 && row.historyList.length == 0"
+              :size="size"
+              :disabled="!row.id || disabled || isAddDisabled"
+              type="text"
+              @click="rowArea(row, index)"
+            >
+              选择库区
             </el-button>
             <el-button
               v-if="reservoirArea != 1"
@@ -1169,6 +1178,9 @@ export default {
               if (item.historyList.length == 0) {
                 return this.$message.error("请维护出库明细的库区");
               }
+              if (!item.dot) {
+                return this.$message.error("请维护明细信息的批次号");
+              }
             }
           }
           const loading = this.$loading({
@@ -1217,27 +1229,6 @@ export default {
             spinner: "el-icon-loading",
             background: "rgba(255,255,255,0.7)"
           });
-          console.log(this.form);
-          let i = 0;
-          this.form.shipItemsList.forEach((item, index) => {
-            if (item.whether == 1) {
-              if (!item.dot) {
-                this.$message.warning(`序号${index + 1}请填写批次号`);
-                i++;
-                return;
-              }
-            }
-            // if (Number(item.goodsNum) > Number(item.inventory)) {
-            //     this.$message.warning("不能大于库存数量");
-            //     i++
-            //     return
-            // }
-            // item.goodsName = item.$goodsId
-          });
-          if (i != 0) {
-            loading.close();
-            return;
-          }
           // this.goodsName;
           transferAllocateSubmit({
             ...this.form,

+ 286 - 261
src/views/tirePartsMall/salesManagement/outboundWorkOrderL/index.vue

@@ -1,48 +1,52 @@
 <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"
+      <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">
+        @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>
+          <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">
+        <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>-->
+          <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>
+        <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>
+          <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>
+          <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%">
+    <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">
@@ -58,22 +62,19 @@
           </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-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
+              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">
@@ -86,14 +87,13 @@
         <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";
+import detailsPage from "./detailsPage";
+import { getWorkDicts } from "../../../../api/system/dictbiz";
 
 export default {
   name: "index",
@@ -126,52 +126,58 @@ export default {
         menu: false,
         column: [
           {
-            label: '商品名称',
-            prop: 'goodsName',
+            label: "商品名称",
+            prop: "goodsName",
             disabled: true,
             width: 200,
-            overHidden: true,
-          }, {
-            label: '商品编码',
+            overHidden: true
+          },
+          {
+            label: "商品编码",
             disabled: true,
-            prop: 'goodsNo',
+            prop: "goodsNo",
             width: 100
-          }, {
-            label: '品牌',
-            prop: 'brandId',
+          },
+          {
+            label: "品牌",
+            prop: "brandId",
             disabled: true,
             width: 100,
             overHidden: true,
             props: {
-              label: 'cname',
-              value: 'id'
+              label: "cname",
+              value: "id"
             },
-            dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1'
-          }, {
-            label: '规格型号',
-            prop: 'propertyName',
+            dicUrl: "/api/blade-sales-part/brandDesc/listAll?type=PP&enableOrNot=1"
+          },
+          {
+            label: "规格型号",
+            prop: "propertyName",
             disabled: true,
             width: 100
-          }, {
-            label: '花纹',
-            prop: 'pattern',
+          },
+          {
+            label: "花纹",
+            prop: "pattern",
             disabled: true,
             width: 100
-          }, {
-            label: '商品描述',
-            prop: 'goodsDescription',
-            disabled: true,
-          }, {
-            label: '批次号',
-            prop: 'dot',
-            type: 'select',
+          },
+          {
+            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",
+            dicUrl: "/api/blade-sales-part/stockDesc/dotList"
           }
         ]
       },
@@ -196,155 +202,173 @@ export default {
         expand: true,
         expandWidth: 60,
         dialogWidth: "70%",
-        summaryText:this.$t("land118n.total"),
+        summaryText: this.$t("land118n.total"),
         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'
+        sumColumnList: [
+          {
+            name: "goodsTotalNum",
+            type: "sum",
+            decimals: 0
+          }
+        ],
+        column: [
+          {
+            label: "调拨单号",
+            prop: "billno",
+            search: true,
+            overHidden: true
           },
-          dicUrl: '/api/blade-sales-part/storageDesc/listAll',
-        },{
-            label: '调入仓库',
+          {
+            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',
+            type: "select",
             props: {
-                label: 'cname',
-                value: 'id'
+              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:'确认调拨'
-                }
+            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: "确认调拨"
+              },
+              {
+                dictValue: "已出仓",
+                dictKey: "已出仓"
+              }
             ],
-          props: {
-            label: "dictValue",
-            value: "dictKey"
-          }
-        }, {
-          label: '调拨日期',
-          prop: "businesDate",
-          overHidden: true,
-          searchProp: "businesDateList",
-          type: "date",
-          search: true,
-          width: 100,
-          unlinkPanels: true,
-          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'
+            props: {
+              label: "dictValue",
+              value: "dictKey"
+            }
           },
-          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: "businesDate",
+            overHidden: true,
+            searchProp: "businesDateList",
+            type: "date",
+            search: true,
+            width: 100,
+            unlinkPanels: true,
+            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"
           }
-        }, {
-          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++
+    this.key++;
     let i = 0;
     this.option.column.forEach(item => {
-      if (item.search) i++
-    })
+      if (item.search) i++;
+    });
     if (i % 3 !== 0) {
-      const num = 3 - Number(i % 3)
+      const num = 3 - Number(i % 3);
       this.option.searchMenuSpan = num * 8;
       this.option.searchMenuPosition = "right";
     }
@@ -355,14 +379,13 @@ export default {
       this.detailsOpen = true;
     }
     console.log(this.$route.query);
-
   },
   activated() {
-      console.log(this.$route.query,400);
-      // 主页快捷跳转来的 直接打开新建订单
-      if (this.$route.query.showTrue) {
-          this.detailsOpen = true;
-      }
+    console.log(this.$route.query, 400);
+    // 主页快捷跳转来的 直接打开新建订单
+    if (this.$route.query.showTrue) {
+      this.detailsOpen = true;
+    }
     if (this.$route.query.id) {
       this.detailData = {
         id: this.$route.query.id
@@ -372,43 +395,44 @@ export default {
   },
   methods: {
     check(row) {
-      this.form = row
-      this.detailsOpen = true
+      this.form = row;
+      this.detailsOpen = true;
     },
     backToList(type) {
-      this.form = {}
-      this.detailsOpen = false
+      this.form = {};
+      this.detailsOpen = false;
       if (type === 0) {
-        this.detailData = {}
+        this.detailData = {};
       }
-      this.onLoad(this.page, this.search)
+      this.onLoad(this.page, this.search);
     },
     //刷新
     refreshChange() {
-      this.onLoad(this.page, this.search)
+      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.$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);
           });
-          this.dataList.splice(index, 1);
-          this.onLoad(this.page)
         })
-      }).catch(() => {
-      });
+        .catch(() => {});
     },
     searchChange(params, done) {
-        this.page.currentPage = 1
+      this.page.currentPage = 1;
       done();
-      this.onLoad(this.page, params)
+      this.onLoad(this.page, params);
     },
     onLoad(page, params = {}) {
       console.log(params);
@@ -416,31 +440,33 @@ export default {
         ...params,
         current: page.currentPage,
         size: page.pageSize,
-          bizTypeName: "DBGD",
+        bizTypeName: "DBGD",
         ...Object.assign(params, this.search)
-      }
-      this.loading = true
+      };
+      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;
+      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.dataList = res.data.data.records
-        this.page.total = res.data.data.total
-        this.$nextTick(() => {
-          this.$refs.crud.doLayout()
+          this.loading = false;
         })
-        this.loading = false
-      }).finally(() => {
-        this.loading = false
-      })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     editOpen(row, status) {
-      this.form = row
+      this.form = row;
       this.detailData = {
         id: row.id,
         status: status
@@ -460,45 +486,44 @@ export default {
     },
     // 发货按钮
     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.dialogForm = row;
 
-      this.dialogVisible = true
+      this.dialogVisible = true;
     },
     courierTypeChange() {
-      this.dialogForm.courierCorporation = null
+      this.dialogForm.courierCorporation = null;
     },
     // 发货
     confirmShipment() {
       for (let courierCompanies of this.courierList) {
         if (courierCompanies.dictValue === this.dialogForm.logisticsCorpName) {
-          this.dialogForm.logisticsCorpId = courierCompanies.dictKey
-          break
+          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
-      }
+        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)
+        console.log(res);
         this.$message.success("发货成功");
         this.dialogVisible = false;
-      })
+      });
     },
     //自定义列保存
     async saveColumnTwo(ref, option, optionBack, code) {
@@ -524,7 +549,7 @@ export default {
       }
     }
   }
-}
+};
 </script>
 
 <style scoped></style>

+ 1 - 1
src/views/tirePartsMall/salesService/inStorage/components/viewArea.vue

@@ -177,7 +177,7 @@ export default {
       this.query = row;
       this.index = index;
       this.data = row.historyList;
-      this.qtyMax = row.goodsNum;
+      this.qtyMax = row.remainingNum;
       this.dialogVisible = true;
     },
     submit() {

+ 17 - 2
src/views/tirePartsMall/salesService/inStorage/detailsPage.vue

@@ -75,8 +75,23 @@
                 >
                   清空库区
                 </el-button>
-                <el-button v-if="reservoirArea == 1" :size="size" :disabled="!row.id" type="text" @click="rowArea(row, index)">
-                  {{ row.historyList.length ? "查看库区" : "选择库区" }}
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length"
+                  :size="size"
+                  :disabled="!row.id"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  查看库区
+                </el-button>
+                <el-button
+                  v-if="reservoirArea == 1 && row.historyList.length == 0"
+                  :size="size"
+                  :disabled="!row.id || form.statusName == '已入库' || isEdit || isEdits"
+                  type="text"
+                  @click="rowArea(row, index)"
+                >
+                  选择库区
                 </el-button>
                 <el-button
                   v-if="reservoirArea != 1"