Procházet zdrojové kódy

采购入库 新加库区
销售订单 查看库存新加参数

Qukatie před 2 měsíci
rodič
revize
1c0894ee78

+ 1313 - 1059
src/views/tirePartsMall/purchasingManagement/warehouseEntryOrder/detailsPage.vue

@@ -1,135 +1,231 @@
 <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="form.id"
-                    @click="confirmEditing">编辑
-                </el-button>
-                <el-button class="el-button--small-yh" type="primary" :disabled="isButton" size="small"
-                    v-if="form.statusName != '已入库'" @click="editCustomer">保存数据
-                </el-button>
-                <el-button class="el-button--small-yh" type="success" size="small"
-                    v-if="form.statusName == '待入库' || form.statusName == '已撤销'" @click="complete"
-                    :disabled="isButton">入库完成
+  <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="form.id" @click="confirmEditing">编辑 </el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="primary"
+          :disabled="isButton"
+          size="small"
+          v-if="form.statusName != '已入库'"
+          @click="editCustomer"
+          >保存数据
+        </el-button>
+        <el-button
+          class="el-button--small-yh"
+          type="success"
+          size="small"
+          v-if="form.statusName == '待入库' || form.statusName == '已撤销'"
+          @click="complete"
+          :disabled="isButton"
+          >入库完成
+        </el-button>
+        <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '已入库'" @click="revoke" :disabled="isButton"
+          >撤销入库
+        </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="明细信息">
+        <el-tabs v-model="activeName" type="card">
+          <el-tab-pane label="入库明细" name="sale_detail">
+            <avue-crud
+              :option="optionContacts"
+              v-model="formContacts"
+              ref="formContacts"
+              :data="form.shipItemsList"
+              :key="key"
+              @row-save="rowSave"
+              @row-update="rowUpdate"
+              @selection-change="selectionContacts"
+              @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
+              @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
+            >
+              <template slot-scope="{ row }" slot="reservoirAreaName">
+                <dic-select
+                  v-if="row.$cellEdit"
+                  :key="form.storageId"
+                  v-model="row.reservoirAreaName"
+                  placeholder="库区"
+                  label="cname"
+                  res="records"
+                  :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + form.storageId"
+                  :filterable="true"
+                  :remote="true"
+                  dataName="cname"
+                  @selectChange="rowDicChange('reservoirAreaName', $event, row)"
+                ></dic-select>
+                <span v-else>{{ row.reservoirAreaName }}</span>
+              </template>
+              <template slot="sendNum" slot-scope="{ row }">
+                <el-input-number
+                  v-if="row.$cellEdit"
+                  size="small"
+                  v-model="row.sendNum"
+                  :controls="false"
+                  :precision="numberDecimal"
+                  :min="0"
+                  style="width: 100%"
+                ></el-input-number>
+                <span v-else>{{ row.sendNum }}</span>
+              </template>
+              <template slot-scope="{ type, size, row, index, disabled }" slot="menu">
+                <el-button
+                  :size="size"
+                  :disabled="disabled || isEdit"
+                  :type="type"
+                  :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
+                  @click="rowEdit(row, index)"
+                >
+                  {{ row.$cellEdit ? "保存" : "编辑" }}
                 </el-button>
-                <el-button class="el-button--small-yh" type="success" size="small" v-if="form.statusName == '已入库'"
-                    @click="revoke" :disabled="isButton">撤销入库
+                <el-button
+                  icon="el-icon-delete"
+                  :size="size"
+                  :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits"
+                  :type="type"
+                  @click="rowDelBox(row, index)"
+                  >删除
                 </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="明细信息">
-                <el-tabs v-model="activeName" type="card">
-                    <el-tab-pane label="入库明细" name="sale_detail">
-                        <avue-crud :option="optionContacts" v-model="formContacts" ref="formContacts"
-                            :data="form.shipItemsList" :key="key" @row-save="rowSave" @row-update="rowUpdate"
-                            @selection-change="selectionContacts"
-                            @resetColumn="resetColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)"
-                            @saveColumn="saveColumnTwo('formContacts', 'optionContacts', 'optionContactsBack', 274.1)">
-
-                            <!--<template slot-scope="{ row }" slot="dot">-->
-                            <!--    <el-select v-model="row.dot" placeholder="请选择">-->
-                            <!--        <el-option-->
-                            <!--            v-for="item in options"-->
-                            <!--            :key="item.value"-->
-                            <!--            :label="item.label"-->
-                            <!--            :value="item.value">-->
-                            <!--        </el-option>-->
-                            <!--    </el-select>-->
-                            <!--</template>-->
-                            <template slot="sendNum" slot-scope="{ row }">
-                                <el-input-number v-if="row.$cellEdit" size="small" v-model="row.sendNum"
-                                    :controls="false" :precision="numberDecimal" :min="0"
-                                    style="width: 100%"></el-input-number>
-                                <span v-else>{{ row.sendNum }}</span>
-                            </template>
-                            <template slot-scope="{type,size,row,index,disabled}" slot="menu">
-                                <el-button :size="size" :disabled="disabled || isEdit" :type="type"
-                                    :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'"
-                                    @click="rowEdit(row, index)">
-                                    {{ row.$cellEdit ? '保存' : '编辑' }}
-                                </el-button>
-                                <el-button icon="el-icon-delete" :size="size"
-                                    :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits" :type="type"
-                                    @click="rowDelBox(row, index)">删除
-                                </el-button>
-                            </template>
-                            <template slot-scope="{scope,row}" slot="menuLeft">
-                                <!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="rowAdd(row, score)"
+              </template>
+              <template slot-scope="{ scope, row }" slot="menuLeft">
+                <!-- <el-button type="primary" icon="el-icon-plus" size="small" @click="rowAdd(row, score)"
                                     :disabled="isrowAdd">添加商品</el-button>
                                 <el-button type="success" size="small" :disabled="isrowAdd" icon="el-icon-bottom" @click="excelBox = true">导入
                                 </el-button> -->
-                                <el-button type="primary" icon="el-icon-printer" size="small"
-                                    @click="handlePrint">打印</el-button>
-                                <el-button type="danger" plain size="small"
-                                    :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits"
-                                    @click="batchDelete">一键删除</el-button>
-                            </template>
-                        </avue-crud>
-                    </el-tab-pane>
-                    <el-tab-pane label="采购信息" name="payment_details">
-                        <avue-crud :option="optionPaymentDetails" ref="payment_details" :data="form.shipVOList"
-                            :key="key"
-                            @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)"
-                            @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)">
-                        </avue-crud>
-                    </el-tab-pane>
-                    <el-tab-pane label="历史记录" name="outbound_records">
-                        <avue-crud :option="optionOutboundRecords" ref="outbound_records" :data="form.historyList"
-                            :key="key"
-                            @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)"
-                            @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)">
-                        </avue-crud>
-                    </el-tab-pane>
-                </el-tabs>
-            </trade-card>
-            <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="入库工单"
-                @onClose="onClose()"></report-dialog>
-
-            <containerTitle title="上传附件"></containerTitle>
-            <c-upload v-loading="loadingBtn" typeUpload="LT" :disabled="isEdit"
-                deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId" :data="filesList" display
-                :enumerationValue="35.1"></c-upload>
+                <el-button type="primary" icon="el-icon-printer" size="small" @click="handlePrint">打印</el-button>
+                <el-button
+                  type="danger"
+                  plain
+                  size="small"
+                  :disabled="disabled || form.statusName == '已入库' || isEdit || isEdits"
+                  @click="batchDelete"
+                  >一键删除</el-button
+                >
+                <el-button
+                  v-if="reservoirArea == 1"
+                  type="success"
+                  size="small"
+                  @click="allClick('批量修改')"
+                  :disabled="disabled || isEdit || selectionMultilist.length == 0"
+                  >批量修改</el-button
+                >
+                <el-button v-if="reservoirArea == 1" type="success" size="small" @click="allClick('导入')" :disabled="disabled || isEdit"
+                  >导入</el-button
+                >
+              </template>
+            </avue-crud>
+          </el-tab-pane>
+          <el-tab-pane label="采购信息" name="payment_details">
+            <avue-crud
+              :option="optionPaymentDetails"
+              ref="payment_details"
+              :data="form.shipVOList"
+              :key="key"
+              @resetColumn="resetColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)"
+              @saveColumn="saveColumnTwo('payment_details', 'optionPaymentDetails', 'optionPaymentDetailsBack', 274.2)"
+            >
+            </avue-crud>
+          </el-tab-pane>
+          <el-tab-pane label="历史记录" name="outbound_records">
+            <avue-crud
+              :option="optionOutboundRecords"
+              ref="outbound_records"
+              :data="form.historyList"
+              :key="key"
+              @resetColumn="resetColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)"
+              @saveColumn="saveColumnTwo('outbound_records', 'optionOutboundRecords', 'optionOutboundRecordsBack', 274.3)"
+            >
+            </avue-crud>
+          </el-tab-pane>
+        </el-tabs>
+      </trade-card>
+      <report-dialog :switchDialog="switchDialog" :reportId="form.id" reportName="入库工单" @onClose="onClose()"></report-dialog>
 
-        </div>
-        <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" v-model="excelForm" table-loading="excelLoading"
-                :upload-before="uploadBefore" :upload-after="uploadAfter">
-                <template slot="excelTemplate">
-                    <el-button type="primary" @click="derivation">
-                        点击下载<i class="el-icon-download el-icon--right"></i>
-                    </el-button>
-                </template>
-            </avue-form>
-            <p style="text-align: center;color: #DC0505">
-                温馨提示 第一次导入时请先下载模板
-            </p>
-        </el-dialog>
+      <containerTitle title="上传附件"></containerTitle>
+      <c-upload
+        v-loading="loadingBtn"
+        typeUpload="LT"
+        :disabled="isEdit"
+        deleteUrl="/api/trade-purchase/woodHarvestingCloud/removeByFileId"
+        :data="filesList"
+        display
+        :enumerationValue="35.1"
+      ></c-upload>
     </div>
+    <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" v-model="excelForm" table-loading="excelLoading" :upload-before="uploadBefore" :upload-after="uploadAfter">
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="derivation"> 点击下载<i class="el-icon-download el-icon--right"></i> </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+    <el-dialog title="批量修改库区" append-to-body :visible.sync="diaVisible" width="300px" :close-on-click-modal="false" v-dialog-drag>
+      <span>
+        <dic-select
+          v-if="diaVisible"
+          :key="form.storageId"
+          v-model="fixForm.reservoirAreaName"
+          placeholder="库区"
+          label="cname"
+          res="records"
+          :url="'/blade-sales-part/reservoirarea/list?current=1&size=5&storageId=' + form.storageId"
+          :filterable="true"
+          :remote="true"
+          dataName="cname"
+          @selectChange="dicChange('reservoirAreaName', $event)"
+        ></dic-select>
+      </span>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="diaVisible = false" size="mini">取 消</el-button>
+        <el-button type="primary" @click="allClick('修改')" size="mini">修 改</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="导入明细" append-to-body :visible.sync="excelBox2" width="555px" :close-on-click-modal="false" v-dialog-drag>
+      <avue-form
+        v-if="excelBox2"
+        :option="excelOption2"
+        v-model="excelForm2"
+        table-loading="excelLoading"
+        :upload-before="uploadBefore2"
+        :upload-after="uploadAfter2"
+      >
+        <template slot="excelTemplate">
+          <el-button type="primary" @click="derivation2"> 点击下载<i class="el-icon-download el-icon--right"></i> </el-button>
+        </template>
+      </avue-form>
+      <p style="text-align: center;color: #DC0505">
+        温馨提示 第一次导入时请先下载模板
+      </p>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
-
+import dicSelect from "@/components/dicSelect/main";
 import {
-    getDetails,
-    tradingBox,
-    submit,
-    warehousingComplete,
-    revoke,
-    goodsDetail,
-    dotList,
-    getWarehouseKeeper,
-    dotListAll,
-    removeItem
+  getDetails,
+  tradingBox,
+  submit,
+  warehousingComplete,
+  revoke,
+  goodsDetail,
+  dotList,
+  getWarehouseKeeper,
+  dotListAll,
+  removeItem
 } from "@/api/tirePartsMall/purchasingManagement/warehouseEntryOrder";
 import { dateFormat } from "@/util/date";
 import { getToken } from "@/util/auth";
@@ -138,979 +234,1137 @@ import reportDialog from "@/components/report-dialog/main";
 import { corpsDescListAll } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { isProcurement } from "@/api/basicData/configuration";
 export default {
-    name: "detailsPage",
-    data() {
-        return {
-            numberDecimal: 0,
-            // 上传附件的需要参数
-            loadingBtn: false,
-            filesList: [],
+  name: "detailsPage",
+  data() {
+    return {
+      reservoirArea: 0,
+      diaVisible: false,
+      fixForm: {
+        reservoirAreaId: null,
+        reservoirAreaName: null
+      },
+      numberDecimal: 0,
+      // 上传附件的需要参数
+      loadingBtn: false,
+      filesList: [],
 
-            switchDialog: false,
-            isEdit: false,
-            values: '',
-            isEdits: false,
-            isButton: false,
-            activeName: "sale_detail",
+      switchDialog: false,
+      isEdit: false,
+      values: "",
+      isEdits: false,
+      isButton: false,
+      activeName: "sale_detail",
+      disabled: false,
+      isrowAdd: true,
+      excelBox: false,
+      excelOption: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "导入明细",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "上传中,请稍等",
+            accept: ".xls,.xlsx",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-sales-part/ship/import-item"
+          }
+        ]
+      },
+      excelForm: {},
+      excelBox2: false,
+      excelOption2: {
+        submitBtn: false,
+        emptyBtn: false,
+        column: [
+          {
+            label: "模板下载",
+            prop: "excelTemplate",
+            formslot: true,
+            span: 24
+          },
+          {
+            label: "导入明细",
+            prop: "excelFile",
+            type: "upload",
+            drag: true,
+            loadText: "上传中,请稍等",
+            accept: ".xls,.xlsx",
+            span: 24,
+            propsHttp: {
+              res: "data"
+            },
+            tip: "请上传 .xls,.xlsx 标准格式文件",
+            action: "/api/blade-sales-part/ship/importReservoirArea"
+          }
+        ]
+      },
+      excelForm2: {},
+      form: {
+        shipItemsList: [],
+        shipVOList: [],
+        historyList: []
+      },
+      key: 0,
+      optionForm: {
+        disabled: false,
+        menuBtn: false,
+        labelWidth: 100,
+        columnBtn: false,
+        span: 8,
+        column: [
+          {
+            label: "业务对象",
+            prop: "customerId",
             disabled: false,
-            isrowAdd: true,
-            excelBox: false,
-            excelOption: {
-                submitBtn: false,
-                emptyBtn: false,
-                column: [
-                    {
-                        label: "模板下载",
-                        prop: "excelTemplate",
-                        formslot: true,
-                        span: 24
-                    },
-                    {
-                        label: "导入明细",
-                        prop: "excelFile",
-                        type: "upload",
-                        drag: true,
-                        loadText: "上传中,请稍等",
-                        accept: '.xls,.xlsx',
-                        span: 24,
-                        propsHttp: {
-                            res: "data"
-                        },
-                        tip: "请上传 .xls,.xlsx 标准格式文件",
-                        action: "/api/blade-sales-part/ship/import-item"
-                    }
-                ]
+            type: "select",
+            props: {
+              label: "cname",
+              value: "id"
             },
-            excelForm: {},
-            form: {
-                shipItemsList: [],
-                shipVOList: [],
-                historyList: []
+            dicData: [],
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ],
+            change: ({ value, column }) => {
+              if (this.form.billno.indexOf("TK") != -1) {
+                this.corpsDescListAllfun("KH");
+              } else {
+                this.corpsDescListAllfun("GYS");
+              }
+            }
+          },
+          {
+            label: "仓库",
+            prop: "storageId",
+            search: true,
+            overHidden: true,
+            type: "select",
+            dicUrl: "/api/blade-sales-part/storageDesc/listAll",
+            disabled: true,
+            props: {
+              label: "cname",
+              value: "id"
             },
-            key: 0,
-            optionForm: {
-                disabled: false,
-                menuBtn: false,
-                labelWidth: 100,
-                columnBtn: false,
-                span: 8,
-                column: [
-                    {
-                        label: "业务对象",
-                        prop: "customerId",
-                        disabled: false,
-                        type: 'select',
-                        props: {
-                            label: 'cname',
-                            value: 'id'
-                        },
-                        dicData: [],
-                        rules: [
-                            {
-                                required: true,
-                                message: " ",
-                                trigger: "blur"
-                            }
-                        ],
-                        change: ({ value, column }) => {
-                            if (this.form.billno.indexOf('TK') != -1) {
-                                this.corpsDescListAllfun('KH')
-                            } else {
-                                this.corpsDescListAllfun('GYS')
-                            }
-                        }
-                    },
-                    {
-                        label: "仓库",
-                        prop: "storageId",
-                        search: true,
-                        overHidden: true,
-                        type: 'select',
-                        dicUrl: "/api/blade-sales-part/storageDesc/listAll",
-                        disabled: false,
-                        props: {
-                            label: 'cname',
-                            value: 'id'
-                        },
 
-                        rules: [
-                            {
-                                required: true,
-                                message: " ",
-                                trigger: "blur"
-                            }
-                        ],
-                        // change:(data)=>{
-                        // //   console.log(this.$refs);
-                        // getWarehouseKeeper({salesCompanyId:this.form.storageId}).then((res)=>{
-                        //     console.log(res.data.data);
-                        //     this.form.stockClerkId = res.data.data[0].id
-                        // })
-                        // }
-                    },
-                    {
-                        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: "goodsTotalNum",
-                        search: false,
-                        overHidden: true,
-                        disabled: true,
-                        // width: 120,
-                        // rules: [
-                        //     {
-                        //         required: true,
-                        //         message: " ",
-                        //         trigger: "blur"
-                        //     }
-                        // ]
-                    },
-                    {
-                        label: "入库数量",
-                        prop: "sendTotalNum",
-                        search: false,
-                        overHidden: true,
-                        disabled: true,
-
-                    },
-                    {
-                        label: "业务日期",
-                        prop: "createTime",
-                        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: "ordNo",
-                        disabled: true,
-                    }, {
-                        label: '备注',
-                        disabled: false,
-                        prop: "remarks",
-                        type: 'textarea',
-                        span: 16,
-                        minRows: 1
-                    }
-                ]
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+            // change:(data)=>{
+            // //   console.log(this.$refs);
+            // getWarehouseKeeper({salesCompanyId:this.form.storageId}).then((res)=>{
+            //     console.log(res.data.data);
+            //     this.form.stockClerkId = res.data.data[0].id
+            // })
+            // }
+          },
+          {
+            label: "库管",
+            prop: "stockClerkId",
+            type: "select",
+            disabled: false,
+            props: {
+              label: "realName",
+              value: "id"
             },
-            formContacts: {},
-            optionContacts: {},
-            optionContactsBack: {
-                dialogDrag: true,
-                cancelBtn: false,
-                disabled: false,
-                align: "center",
-                index: true,
-                addBtn: false, // 新增按钮
-                addBtnText: "录入明细",
-                refreshBtn: false,
-                editBtn: false, // 修改按钮
-                delBtn: false, //删除按钮
-                border: true,
-                menuWidth: 160,
-                stripe: true,
-                span: 8,
-                addRowBtn: false,
-                menu: true, // 是否员操作栏
-                dialogTop: 25,
-                dialogWidth: "80%",
-                showSummary: true,
-                saveBtn: false, // 表格弹窗保存按钮
-                cellBtn: false, // 行编辑
-                selection: true,
-                sumColumnList: [
-                    {
-                        name: 'sendNum',
-                        type: 'sum',
-                    }, {
-                        name: 'goodsNum',
-                        type: 'sum',
-                    }
-                ],
-                column: [
-                    {
-                    label: '商品名称',
-                    prop: 'goodsId',
-                    width: 200,
-                    overHidden: true,
-                    hide: true,
-                    showColumn: false,
-                    // disabled: false,
-                    // filterable: true,
-                    // remote: true,
-                    // type: 'select',
-                    // props: {
-                    //     label: 'cname',
-                    //     value: 'id'
-                    // },
-                    // dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
-                },
-                {
-                    label: '商品名称',
-                    prop: 'goodsName',
-                    width: 200,
-                    overHidden: true,
-                    disabled: false,
-                    filterable: true,
+            dicUrl: "/api/blade-user/stockClerkList"
+            // rules: [{
+            //     required: true,
+            //     message: " ",
+            //     trigger: "blur"
+            // }]
+          },
+          {
+            label: "订单数量",
+            prop: "goodsTotalNum",
+            search: false,
+            overHidden: true,
+            disabled: true
+            // width: 120,
+            // rules: [
+            //     {
+            //         required: true,
+            //         message: " ",
+            //         trigger: "blur"
+            //     }
+            // ]
+          },
+          {
+            label: "入库数量",
+            prop: "sendTotalNum",
+            search: false,
+            overHidden: true,
+            disabled: true
+          },
+          {
+            label: "业务日期",
+            prop: "createTime",
+            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: "ordNo",
+            disabled: true
+          },
+          {
+            label: "备注",
+            disabled: false,
+            prop: "remarks",
+            type: "textarea",
+            span: 16,
+            minRows: 1
+          }
+        ]
+      },
+      formContacts: {},
+      optionContacts: {},
+      optionContactsBack: {
+        dialogDrag: true,
+        cancelBtn: false,
+        disabled: false,
+        align: "center",
+        index: true,
+        addBtn: false, // 新增按钮
+        addBtnText: "录入明细",
+        refreshBtn: false,
+        editBtn: false, // 修改按钮
+        delBtn: false, //删除按钮
+        border: true,
+        menuWidth: 160,
+        stripe: true,
+        span: 8,
+        addRowBtn: false,
+        menu: true, // 是否员操作栏
+        dialogTop: 25,
+        dialogWidth: "80%",
+        showSummary: true,
+        saveBtn: false, // 表格弹窗保存按钮
+        cellBtn: false, // 行编辑
+        selection: true,
+        sumColumnList: [
+          {
+            name: "sendNum",
+            type: "sum"
+          },
+          {
+            name: "goodsNum",
+            type: "sum"
+          }
+        ],
+        column: [
+          {
+            label: "商品名称",
+            prop: "goodsId",
+            width: 200,
+            overHidden: true,
+            hide: true,
+            showColumn: false
+            // disabled: false,
+            // filterable: true,
+            // remote: true,
+            // type: 'select',
+            // props: {
+            //     label: 'cname',
+            //     value: 'id'
+            // },
+            // dicUrl: '/api/blade-sales-part/goodsDesc/list?current=1&size=10&cname={{key}}&enableOrNot=1'
+          },
+          {
+            label: "商品名称",
+            prop: "goodsName",
+            width: 200,
+            overHidden: true,
+            disabled: false,
+            filterable: true
+          },
+          // {
+          //     label: "价格",
+          //     prop: "price",
+          //     disabled: false,
+          //     ovrHidden: true,
+          //     rules: [{
+          //         required: true,
+          //         message: " ",
+          //         trigger: "blur"
+          //     }, {
+          //         validator: (rule, value, callback) => {
+          //             if (value < 0) {
+          //                 callback(new Error("单价不能小于0"));
+          //             } else {
+          //                 callback();
+          //             }
+          //         },
+          //         trigger: "blur"
+          //     }]
+          // },
+          {
+            label: "到货数量",
+            prop: "sendNum",
+            width: 100,
+            // cell: true,
+            disabled: false,
+            overHidden: true,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              },
+              {
+                validator: (rule, value, callback) => {
+                  if (value < 0) {
+                    callback(new Error("实际数量不能小于0"));
+                  } else {
+                    callback();
+                  }
                 },
-                // {
-                //     label: "价格",
-                //     prop: "price",
-                //     disabled: false,
-                //     ovrHidden: true,
-                //     rules: [{
-                //         required: true,
-                //         message: " ",
-                //         trigger: "blur"
-                //     }, {
-                //         validator: (rule, value, callback) => {
-                //             if (value < 0) {
-                //                 callback(new Error("单价不能小于0"));
-                //             } else {
-                //                 callback();
-                //             }
-                //         },
-                //         trigger: "blur"
-                //     }]
-                // },
-                {
-                    label: "到货数量",
-                    prop: "sendNum",
-                    width: 100,
-                    // cell: true,
-                    disabled: false,
-                    overHidden: true,
-                    rules: [{
-                        required: true,
-                        message: " ",
-                        trigger: "blur"
-                    },
-                    {
-                        validator: (rule, value, callback) => {
-                            if (value < 0) {
-                                callback(new Error("实际数量不能小于0"));
-                            } else {
-                                callback();
-                            }
-                        },
-                        trigger: "blur"
-                    }]
-                }, {
-                    label: "批次号",
-                    cell: true,
-                    width: 120,
-                    prop: "dot",
-                    type: "select",
-                    disabled: false,
-                    allowCreate: true,
-                    filterable: true,
-                    dicData: [],
-                    props: {
-                        label: "dot",
-                        value: "dot"
-                    },
-                    overHidden: true
-                }, {
-                    label: '商品编码',
-                    prop: 'goodsNo',
-                    overHidden: true,
-                    disabled: false,
-                    width: 140
-                    // }, {
-                    //     label: "品牌",
-                    //     prop: 'brandId',
-                    //     width: 100,
-                    //     overHidden: true,
-                    //     disabled: false,
-                    //     type: 'select',
-                    //     props: {
-                    //         label: 'cname',
-                    //         value: 'id'
-                    //     },
-                    //     dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP'
-                    // }, {
-                }, {
-                    label: "品牌",
-                    prop: "brandName",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "规格型号",
-                    prop: "propertyName",
-                    overHidden: true,
-                    disabled: false,
-                    // rules: [{
-                    //     required: true,
-                    //     message: " ",
-                    //     trigger: "blur"
-                    // }]
-                }, {
-                    label: "花纹",
-                    prop: "pattern",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "商品描述",
-                    prop: "goodsDescription",
-                    disabled: false,
-                    overHidden: true
-                }, {
-                    label: "单位",
-                    prop: 'units',
-                    type: "select",
-                    disabled: false,
-                    props: {
-                        label: "dictValue",
-                        value: "dictValue"
-                    },
-                    dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
-                }, {
-                    label: "入库数量",
-                    prop: "goodsNum",
-                    disabled: true,
-                    ovrHidden: true,
-                }, {
-                    label: "备注",
-                    cell: true,
-                    prop: "remarks",
-                    width: 150,
-                    span: 16,
-                    disabled: false,
-                    overHidde: true
-                }]
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "批次号",
+            cell: true,
+            width: 120,
+            prop: "dot",
+            type: "select",
+            disabled: false,
+            allowCreate: true,
+            filterable: true,
+            dicData: [],
+            props: {
+              label: "dot",
+              value: "dot"
             },
-            selectionMultilist: [], // 多选数据
-            optionPaymentDetails: {},
-            optionPaymentDetailsBack: {
-                align: "center",
-                addBtn: false,
-                refreshBtn: false,
-                editBtn: false,
-                delBtn: false,
-                border: true,
-                menuWidth: 120,
-                stripe: true,
-                index: true,
-                menu: false,
-                column: [
-                    {
-                        label: "入库单号",
-                        prop: "billno",
-                        disabled: true
-                    },
-                    {
-                        label: "来源单号",
-                        prop: "ordNo",
-                        disabled: true
-                    },
-                    // {
-                    //     label: "业务来源",
-                    //     prop: "stockTime",
-                    //     type: "date",
-                    //     searchRange: true,
-                    //     searchDefaultTime: [
-                    //         "00:00:00",
-                    //         "23:59:59"
-                    //     ],
-                    //     format: "yyyy-MM-dd",
-                    //     valueFormat: "yyyy-MM-dd HH:mm:ss",
-                    //     overHidden: true
-                    // },
-                    {
-                        label: "地址",
-                        prop: "recAddress",
-                        overHidden: true,
-                    },
-                    {
-                        prop: "contacts",
-                        label: "联系人",
-                        overHidden: true
-                    },
-                    {
-                        prop: "phone",
-                        label: "电话",
-                        overHidden: true
-                    },
-                    {
-                        prop: "remarks",
-                        label: "备注",
-                        disabled: false,
-                        overHidden: true
-                    }
-                ]
+            overHidden: true
+          },
+          {
+            label: "商品编码",
+            prop: "goodsNo",
+            overHidden: true,
+            disabled: false,
+            width: 140
+            // }, {
+            //     label: "品牌",
+            //     prop: 'brandId',
+            //     width: 100,
+            //     overHidden: true,
+            //     disabled: false,
+            //     type: 'select',
+            //     props: {
+            //         label: 'cname',
+            //         value: 'id'
+            //     },
+            //     dicUrl: '/api/blade-sales-part/brandDesc/listAll?type=PP'
+            // }, {
+          },
+          {
+            label: "库区",
+            prop: "reservoirAreaName",
+            width: 140,
+            hide: true,
+            overHidden: true
+          },
+          {
+            label: "品牌",
+            prop: "brandName",
+            disabled: false,
+            overHidden: true
+          },
+          {
+            label: "规格型号",
+            prop: "propertyName",
+            overHidden: true,
+            disabled: false
+            // rules: [{
+            //     required: true,
+            //     message: " ",
+            //     trigger: "blur"
+            // }]
+          },
+          {
+            label: "花纹",
+            prop: "pattern",
+            disabled: false,
+            overHidden: true
+          },
+          {
+            label: "商品描述",
+            prop: "goodsDescription",
+            disabled: false,
+            overHidden: true
+          },
+          {
+            label: "单位",
+            prop: "units",
+            type: "select",
+            disabled: false,
+            props: {
+              label: "dictValue",
+              value: "dictValue"
             },
-            optionOutboundRecords: {},
-            optionOutboundRecordsBack: {
-                align: "center",
-                addBtn: false,
-                refreshBtn: false,
-                editBtn: false,
-                delBtn: false,
-                border: true,
-                menuWidth: 120,
-                index: true,
-                stripe: true,
-                menu: false,
-                column: [{
-                    prop: "operatorName",
-                    label: "操作人",
-                    overHidden: true,
-                    showColumn: false,
-                    width: 120,
-                }, {
-                    prop: "operateStatus",
-                    label: "状态",
-                    overHidden: true,
-                }, {
-                    prop: "operateTime",
-                    label: "时间",
-                    overHidden: true,
-                    searchDefaultTime: ["00:00:00", "23:59:59"],
-                    format: "yyyy-MM-dd",
-                    valueFormat: "yyyy-MM-dd HH:mm:ss",
-                }]
-            }
-        }
-    },
-    props: {
-        onLoad: Object,
-        detailData: Object
-    },
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=unit"
+          },
+          {
+            label: "入库数量",
+            prop: "goodsNum",
+            disabled: true,
+            ovrHidden: true
+          },
+          {
+            label: "备注",
+            cell: true,
+            prop: "remarks",
+            width: 150,
+            span: 16,
+            disabled: false,
+            overHidde: true
+          }
+        ]
+      },
+      selectionMultilist: [], // 多选数据
+      optionPaymentDetails: {},
+      optionPaymentDetailsBack: {
+        align: "center",
+        addBtn: false,
+        refreshBtn: false,
+        editBtn: false,
+        delBtn: false,
+        border: true,
+        menuWidth: 120,
+        stripe: true,
+        index: true,
+        menu: false,
+        column: [
+          {
+            label: "入库单号",
+            prop: "billno",
+            disabled: true
+          },
+          {
+            label: "来源单号",
+            prop: "ordNo",
+            disabled: true
+          },
+          // {
+          //     label: "业务来源",
+          //     prop: "stockTime",
+          //     type: "date",
+          //     searchRange: true,
+          //     searchDefaultTime: [
+          //         "00:00:00",
+          //         "23:59:59"
+          //     ],
+          //     format: "yyyy-MM-dd",
+          //     valueFormat: "yyyy-MM-dd HH:mm:ss",
+          //     overHidden: true
+          // },
+          {
+            label: "地址",
+            prop: "recAddress",
+            overHidden: true
+          },
+          {
+            prop: "contacts",
+            label: "联系人",
+            overHidden: true
+          },
+          {
+            prop: "phone",
+            label: "电话",
+            overHidden: true
+          },
+          {
+            prop: "remarks",
+            label: "备注",
+            disabled: false,
+            overHidden: true
+          }
+        ]
+      },
+      optionOutboundRecords: {},
+      optionOutboundRecordsBack: {
+        align: "center",
+        addBtn: false,
+        refreshBtn: false,
+        editBtn: false,
+        delBtn: false,
+        border: true,
+        menuWidth: 120,
+        index: true,
+        stripe: true,
+        menu: false,
+        column: [
+          {
+            prop: "operatorName",
+            label: "操作人",
+            overHidden: true,
+            showColumn: false,
+            width: 120
+          },
+          {
+            prop: "operateStatus",
+            label: "状态",
+            overHidden: true
+          },
+          {
+            prop: "operateTime",
+            label: "时间",
+            overHidden: true,
+            searchDefaultTime: ["00:00:00", "23:59:59"],
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          }
+        ]
+      }
+    };
+  },
+  props: {
+    onLoad: Object,
+    detailData: Object
+  },
 
-    async created() {
-        this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
-            console.log(value);
-            this.values = value
-            console.log('this.formContacts.goodsId', this.formContacts.goodsId);
-            if (this.formContacts.goodsId !== value) {
-                dotListAll({
-                    storageId: this.form.storageId,
-                    goodsId: this.formContacts.goodsId
-                }).then(res => { this.formContacts.price = res.data.data[0].inventoryCostPrice, console.log(res) })
-                goodsDetail({ id: value, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
-                    console.log(this.form.storageId);
-                    this.formContacts.goodsNo = res.data.data.code
-                    this.formContacts.brandId = res.data.data.brandId
-                    this.formContacts.brandName = res.data.data.brandName
+  async created() {
+    this.findObject(this.optionContactsBack.column, "goodsId").change = ({ value, column }) => {
+      console.log(value);
+      this.values = value;
+      console.log("this.formContacts.goodsId", this.formContacts.goodsId);
+      if (this.formContacts.goodsId !== value) {
+        dotListAll({
+          storageId: this.form.storageId,
+          goodsId: this.formContacts.goodsId
+        }).then(res => {
+          (this.formContacts.price = res.data.data[0].inventoryCostPrice), console.log(res);
+        });
+        goodsDetail({ id: value, stock: this.form.storageId ? this.form.storageId : "" }).then(res => {
+          console.log(this.form.storageId);
+          this.formContacts.goodsNo = res.data.data.code;
+          this.formContacts.brandId = res.data.data.brandId;
+          this.formContacts.brandName = res.data.data.brandName;
 
-                    this.formContacts.propertyName = res.data.data.specificationAndModel
-                    this.formContacts.pattern = res.data.data.brandItem
-                    this.formContacts.goodsDescription = res.data.data.goodsDescription
-                    this.formContacts.units = res.data.data.unit
-                    this.findObject(this.optionContacts.column, "goodsNum").disabled = true
-                    if (res.data.data.whether == 0) {
-                        this.findObject(this.optionContacts.column, "dot").disabled = true
-                    } else {
-                        this.findObject(this.optionContacts.column, "dot").disabled = false
-                        dotList({
-                            storageId: this.form.storageId,
-                            goodsId: this.formContacts.goodsId
-                        }).then(res => {
-                            console.log('dot', res);
-                            this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
-                        })
-                    }
-                })
-            }
-        }
-        this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
-        isProcurement({ "param": "whether.model" }).then(res => {
-            if (res.data.data == 1) {
-                this.findObject(this.optionContacts.column, "pattern").label = '规格型号1'
-            }
-        })
-        this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
-            console.log(value);
-            console.log(this.form.storageId);
-            this.values = value
-            if (this.formContacts.goodsId !== value) {
-                dotListAll({
-                    storageId: this.form.storageId,
-                    goodsId: this.formContacts.goodsId
-                }).then(res => { this.formContacts.price = res.data.data[0].inventoryCostPrice })
-                goodsDetail({ id: value, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
-                    this.formContacts.goodsNo = res.data.data.code
-                    this.formContacts.brandId = res.data.data.brandId
-                    this.formContacts.brandName = res.data.data.brandName
+          this.formContacts.propertyName = res.data.data.specificationAndModel;
+          this.formContacts.pattern = res.data.data.brandItem;
+          this.formContacts.goodsDescription = res.data.data.goodsDescription;
+          this.formContacts.units = res.data.data.unit;
+          this.findObject(this.optionContacts.column, "goodsNum").disabled = true;
+          if (res.data.data.whether == 0) {
+            this.findObject(this.optionContacts.column, "dot").disabled = true;
+          } else {
+            this.findObject(this.optionContacts.column, "dot").disabled = false;
+            dotList({
+              storageId: this.form.storageId,
+              goodsId: this.formContacts.goodsId
+            }).then(res => {
+              console.log("dot", res);
+              this.findObject(this.optionContacts.column, "dot").dicData = res.data.data;
+            });
+          }
+        });
+      }
+    };
+    this.optionContacts = await this.getColumnData(this.getColumnName(274.1), this.optionContactsBack);
+    isProcurement({ param: "whether.model" }).then(res => {
+      if (res.data.data == 1) {
+        this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
+      }
+    });
+    isProcurement({ param: "reservoir.area" }).then(res => {
+      if (res.data.data == 1) {
+        this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
+      }
+      this.reservoirArea = res.data.data;
+    });
+    this.findObject(this.optionContacts.column, "goodsId").change = ({ value, column }) => {
+      console.log(value);
+      console.log(this.form.storageId);
+      this.values = value;
+      if (this.formContacts.goodsId !== value) {
+        dotListAll({
+          storageId: this.form.storageId,
+          goodsId: this.formContacts.goodsId
+        }).then(res => {
+          this.formContacts.price = res.data.data[0].inventoryCostPrice;
+        });
+        goodsDetail({ id: value, stock: this.form.storageId ? this.form.storageId : "" }).then(res => {
+          this.formContacts.goodsNo = res.data.data.code;
+          this.formContacts.brandId = res.data.data.brandId;
+          this.formContacts.brandName = res.data.data.brandName;
 
-                    this.formContacts.propertyName = res.data.data.specificationAndModel
-                    this.formContacts.pattern = res.data.data.brandItem
-                    this.formContacts.goodsDescription = res.data.data.goodsDescription
-                    this.formContacts.units = res.data.data.unit
-                    this.findObject(this.optionContacts.column, "goodsNum").disabled = true
-                    if (res.data.data.whether == 0) {
-                        this.findObject(this.optionContacts.column, "dot").disabled = true
-                    } else {
-                        this.findObject(this.optionContacts.column, "dot").disabled = false
-                        dotList({
-                            storageId: this.form.storageId,
-                            goodsId: this.formContacts.goodsId
-                        }).then(res => {
-                            console.log('567');
-                            this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
-                        })
-                    }
-                })
-            }
-        }
-        this.optionPaymentDetails = await this.getColumnData(this.getColumnName(274.2), this.optionPaymentDetailsBack);
-        this.optionOutboundRecords = await this.getColumnData(this.getColumnName(274.3), this.optionOutboundRecordsBack);
-        this.key++
-        this.isButton = true
-        if (this.onLoad.id && this.detailData.id) {
-            this.refresh(this.onLoad.id, true)
-            this.$set(this.optionForm, 'disabled', true)
-            this.$set(this.optionContactsBack, 'disabled', true)
-        } else if (this.onLoad.id) {
-            console.log(2);
-            this.refresh(this.onLoad.id, true)
-        }
-        if (!this.form.id) {
-            this.isEdit = true
-            // this.$set(this.optionContactsBack, "addBtn", false)
-            this['optionContacts'] = this['optionContactsBack'];
-            this.delColumnData(this.getColumnName('269.1'), this['optionContactsBack']);
-        }
-        if (!this.onLoad.id) {
-            this.isrowAdd = false
-            this.isEdit = false
-            // this.$set(this.optionForm,'disabled',false)
-            // this.$set(this.optionContacts,'disabled',false)
+          this.formContacts.propertyName = res.data.data.specificationAndModel;
+          this.formContacts.pattern = res.data.data.brandItem;
+          this.formContacts.goodsDescription = res.data.data.goodsDescription;
+          this.formContacts.units = res.data.data.unit;
+          this.findObject(this.optionContacts.column, "goodsNum").disabled = true;
+          if (res.data.data.whether == 0) {
+            this.findObject(this.optionContacts.column, "dot").disabled = true;
+          } else {
+            this.findObject(this.optionContacts.column, "dot").disabled = false;
+            dotList({
+              storageId: this.form.storageId,
+              goodsId: this.formContacts.goodsId
+            }).then(res => {
+              console.log("567");
+              this.findObject(this.optionContacts.column, "dot").dicData = res.data.data;
+            });
+          }
+        });
+      }
+    };
+    this.optionPaymentDetails = await this.getColumnData(this.getColumnName(274.2), this.optionPaymentDetailsBack);
+    this.optionOutboundRecords = await this.getColumnData(this.getColumnName(274.3), this.optionOutboundRecordsBack);
+    this.key++;
+    this.isButton = true;
+    if (this.onLoad.id && this.detailData.id) {
+      this.refresh(this.onLoad.id, true);
+      this.$set(this.optionForm, "disabled", true);
+      this.$set(this.optionContactsBack, "disabled", true);
+    } else if (this.onLoad.id) {
+      console.log(2);
+      this.refresh(this.onLoad.id, true);
+    }
+    if (!this.form.id) {
+      this.isEdit = true;
+      // this.$set(this.optionContactsBack, "addBtn", false)
+      this["optionContacts"] = this["optionContactsBack"];
+      this.delColumnData(this.getColumnName("269.1"), this["optionContactsBack"]);
+    }
+    if (!this.onLoad.id) {
+      this.isrowAdd = false;
+      this.isEdit = false;
+      // this.$set(this.optionForm,'disabled',false)
+      // this.$set(this.optionContacts,'disabled',false)
+    }
+    // if (this.detailData.id) {
+    //     this.refresh()
+    // }
+    if (this.$route.query.srcId) {
+      this.refresh(this.$route.query.srcId);
+    }
+    if (this.$route.query.id) {
+      this.refresh(this.$route.query.id);
+    }
+    this.$store.commit("DOMIO_IN_DETAIL");
+    isProcurement({ param: "number.decimal" }).then(res => {
+      this.numberDecimal = res.data.data ? Number(res.data.data) : 0;
+    });
+  },
+  components: {
+    reportDialog,
+    dicSelect
+  },
+  activated() {
+    this.$store.commit("DOMIO_IN_DETAIL");
+  },
+  methods: {
+    allClick(name) {
+      if (name == "批量修改") {
+        this.fixForm = {
+          reservoirAreaId: null,
+          reservoirAreaName: null
+        };
+        this.diaVisible = true;
+      }
+      if (name == "修改") {
+        this.$confirm("是否确认修改库区?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          for (let item of this.selectionMultilist) {
+            this.form.shipItemsList.forEach(row => {
+              if (item.id == row.id) {
+                row.reservoirAreaId = this.fixForm.reservoirAreaId;
+                row.reservoirAreaName = this.fixForm.reservoirAreaName;
+              }
+            });
+          }
+          this.diaVisible = false;
+        });
+      }
+      if (name == "导入") {
+        this.findObject(this.excelOption2.column, "excelFile").action = "/api/blade-sales-part/ship/importReservoirArea?id=" + this.form.id;
+        this.excelBox2 = true;
+      }
+    },
+    dicChange(name, row) {
+      if (name == "reservoirAreaName") {
+        if (row) {
+          this.fixForm.reservoirAreaId = row.id;
+        } else {
+          this.fixForm.reservoirAreaId = null;
+          this.fixForm.reservoirAreaName = null;
         }
-        // if (this.detailData.id) {
-        //     this.refresh()
-        // }
-        if (this.$route.query.srcId) {
-            this.refresh(this.$route.query.srcId)
+      }
+    },
+    rowDicChange(name, row, el) {
+      if (name == "reservoirAreaName") {
+        if (row) {
+          el.reservoirAreaId = row.id;
+        } else {
+          el.reservoirAreaId = null;
+          el.reservoirAreaName = null;
         }
-        if (this.$route.query.id) {
-            this.refresh(this.$route.query.id)
+      }
+    },
+    rowAdd(row, score) {
+      console.log(123214);
+      this.optionContactsBack.column.forEach(its => {
+        if (
+          its.prop == "goodsNum" ||
+          its.prop == "goodsNo" ||
+          its.prop == "brandId" ||
+          its.prop == "propertyName" ||
+          its.prop == "pattern" ||
+          its.prop == "goodsDescription" ||
+          its.prop == "units"
+        ) {
+          this.$set(its, "disabled", true);
+        } else {
+          this.$set(its, "disabled", false);
         }
-        this.$store.commit("DOMIO_IN_DETAIL");
-        isProcurement({ "param": "number.decimal" }).then(res => {
-            this.numberDecimal = res.data.data ? Number(res.data.data) : 0
-        })
+      });
+      this.$refs.formContacts.rowAdd();
     },
-    components: {
-        reportDialog
+    derivation() {
+      window.open(`/api/blade-sales-part/ship/export-item?${this.website.tokenHeader}=${getToken()}`);
     },
-    activated() {
-        this.$store.commit("DOMIO_IN_DETAIL");
+    uploadAfter(res, done, loading, column) {
+      if (res instanceof Array) {
+        this.form.shipItemsList = this.form.shipItemsList.concat(res);
+      }
+      this.excelBox = false;
+      loading = false;
+      done();
     },
-    methods: {
-        rowAdd(row, score) {
-            console.log(123214);
-            this.optionContactsBack.column.forEach(its => {
-                if (its.prop == 'goodsNum' || its.prop == 'goodsNo' || its.prop == 'brandId' || its.prop == 'propertyName' || its.prop == 'pattern' || its.prop == 'goodsDescription' || its.prop == 'units') {
-                    this.$set(its, 'disabled', true)
-                } else {
-                    this.$set(its, 'disabled', false)
-                }
-            })
-            this.$refs.formContacts.rowAdd()
-        },
-        derivation() {
-            window.open(
-                `/api/blade-sales-part/ship/export-item?${this.website.tokenHeader
-                }=${getToken()}`
-            );
-        },
-        uploadAfter(res, done, loading, column) {
-            if (res instanceof Array) {
-                this.form.shipItemsList = this.form.shipItemsList.concat(res)
-            }
-            this.excelBox = false;
-            loading = false;
-            done();
-        },
-        uploadBefore(file, done, loading) {
-            done();
-            loading = true;
-        },
-        //撤销
-        revoke() {
-            this.$refs["form"].validate((valid, done) => {
-                console.log(valid, 'valid')
-                done();
-                if (valid) {
-                    const loading = this.$loading({
-                        lock: true,
-                        text: '加载中',
-                        spinner: 'el-icon-loading',
-                        background: 'rgba(255,255,255,0.7)'
-                    });
-                    revoke({
-                        ...this.form,
-                        bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
-                    }).then(res => {
-                        if (res.data.code === 601) {
-                            if (this.onLoad.id) {
-                                console.log(2);
-                                this.refresh(this.onLoad.id, true)
-                            }
-                            this.$message({
-                                type: "error",
-                                message: res.data.msg
-                            });
-                            return true
-                        }
-                        this.$message.success("撤销成功");
-                        this.refresh(res.data.data.id)
-                        loading.close();
-                    }).finally(() => {
-                        loading.close();
-                    });
-                }
-            })
-        },
-        //编辑
-        confirmEditing() {
-            this.isButton = false
-            if (this.form.statusName == '待入库' || this.form.statusName == '已撤销') {
-                this.isEdit = false
-                this.isrowAdd = false
-                this.$set(this.optionForm, 'disabled', false)
-                this.$set(this.optionContacts, 'disabled', false)
-                this.optionForm.column.forEach(item => {
-                    if (item.prop == 'remarks' || item.prop == 'createTime' || item.prop == 'stockClerkId' || item.prop == 'storageId') {
-                        this.$set(item, 'disabled', false)
-                    } else {
-                        this.$set(item, 'disabled', true)
-
-                    }
-                })
-                this.optionContacts.column.forEach(item => {
-                    if (item.prop == 'remarks' || item.prop == 'dot' || item.prop == 'sendNum') {
-                        this.$set(item, 'disabled', false)
-                    } else {
-                        this.$set(item, 'disabled', true)
-                    }
-                })
-                if (this.form.billno.substring(0, 4) == 'TKSH') {
-                    // this.isEdit = true
-                    this.isEdits = true
-                    this.isrowAdd = true
-                    this.optionContacts.column.forEach(item => {
-                        if (item.prop == 'remarks' || item.prop == 'sendNum' || item.prop == 'price' || item.prop == 'dot') {
-                            this.$set(item, 'disabled', false)
-                        } else {
-                            this.$set(item, 'disabled', true)
-                        }
-                    })
-                }
-            } else if (this.form.statusName == '已入库') {
-                this.$set(this.optionForm, 'disabled', false)
-                this.$set(this.optionContactsBack, 'disabled', false)
-                this.optionForm.column.forEach(item => {
-                    if (item.prop == 'remarks') {
-                        this.$set(item, 'disabled', false)
-                    } else {
-                        this.$set(item, 'disabled', true)
-
-                    }
-                })
-                this.optionContactsBack.column.forEach(item => {
-                    if (item.prop == 'remarks') {
-                        this.$set(item, 'disabled', false)
-                    } else {
-                        this.$set(item, 'disabled', true)
-                    }
-                })
-            }
-            console.log(this.form.shipItemsList[0].goodsId);
-            goodsDetail({ id: this.form.shipItemsList[0].goodsId, stock: this.form.storageId ? this.form.storageId : '' }).then(res => {
-                if (res.data.data.whether == 0) {
-                    this.findObject(this.optionContacts.column, "dot").disabled = true
-                } else {
-                    this.findObject(this.optionContacts.column, "dot").disabled = false
-                    dotList({
-                        storageId: this.form.storageId,
-                        goodsId: this.formContacts.goodsId
-                    }).then(res => {
-                        console.log('567');
-                        this.findObject(this.optionContacts.column, "dot").dicData = res.data.data
-                    })
-                }
-            })
-        },
-        complete() {
-            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.customerName = this.form.$customerId
-                    submit({
-                        ...this.form,
-                        bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
-                    }).then(res => {
-                        if (res.data.code === 601) {
-                            if (this.onLoad.id) {
-                                console.log(2);
-                                this.refresh(this.onLoad.id, true)
-                            }
-                            this.$message({
-                                type: "error",
-                                message: res.data.msg
-                            });
-                            return true
-                        }
-                        warehousingComplete({
-                            ...this.form,
-                            bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
-                        }).then(res => {
-                            this.refresh(res.data.data.id)
-                            this.$set(this.optionForm, 'disabled', true)
-                            this.$set(this.optionContactsBack, 'disabled', true)
-                            this.isEdit = true
-                            this.$message.success("入库完成");
-                            loading.close();
-                        }).finally(() => {
-                            loading.close();
-                        });
-                    }).catch(() => {
-                        loading.close();
-                    });
+    uploadBefore(file, done, loading) {
+      done();
+      loading = true;
+    },
+    derivation2() {
+      window.open(`/api/blade-sales-part/ship/exportReservoirArea?id=${this.form.id}&${this.website.tokenHeader}=${getToken()}`);
+    },
+    uploadAfter2(res, done, loading, column) {
+      this.refresh(this.form.id);
+      this.excelBox2 = false;
+      loading = false;
+      done();
+    },
+    uploadBefore2(file, done, loading) {
+      done();
+      loading = true;
+    },
+    //撤销
+    revoke() {
+      this.$refs["form"].validate((valid, done) => {
+        console.log(valid, "valid");
+        done();
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "加载中",
+            spinner: "el-icon-loading",
+            background: "rgba(255,255,255,0.7)"
+          });
+          revoke({
+            ...this.form,
+            bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
+          })
+            .then(res => {
+              if (res.data.code === 601) {
+                if (this.onLoad.id) {
+                  console.log(2);
+                  this.refresh(this.onLoad.id, true);
                 }
+                this.$message({
+                  type: "error",
+                  message: res.data.msg
+                });
+                return true;
+              }
+              this.$message.success("撤销成功");
+              this.refresh(res.data.data.id);
+              loading.close();
             })
-        },
-        //修改提交触发
-        editCustomer() {
-            if (this.form.shipItemsList.length == 0) {
-                return this.$message.warning('请明细不能为空')
-            }
-            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.customerName = this.form.$customerId
-                    this.form.shipItemsList.map(item => {
-                        item.$cellEdit = false
-                    })
-                    submit({
-                        ...this.form,
-                        bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD",
-                        filesList: this.filesList
-                    }).then(res => {
-                        if (res.data.code === 601) {
-                            if (this.onLoad.id) {
-                                console.log(2);
-                                this.refresh(this.onLoad.id, true)
-                            }
-                            this.$message({
-                                type: "error",
-                                message: res.data.msg
-                            });
-                            return true
-                        }
-                        this.$message.success("保存成功");
-                        this.refresh(res.data.data.id);
-                        loading.close();
-                    }).finally(() => {
-                        loading.close();
-                    });
-                } else {
-                    return false;
-                }
+            .finally(() => {
+              loading.close();
             });
-        },
-        refresh(id, type) {
-            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 => {
-                    this.form = res.data.data
-                    this.filesList = res.data.data.filesList
-                    loading.close();
-                }).catch(() => {
-                    loading.close();
-                })
-            } else {
-                getDetails({ id: this.detailData.id }).then(res => {
-                    this.form = res.data.data
-                    this.filesList = res.data.data.filesList
-                    loading.close();
-                }).catch(() => {
-                    loading.close();
-                })
-            }
-        },
-        // 获取业务对象
-        corpsDescListAllfun(corpType) {
-            corpsDescListAll({ corpType:corpType,enableOrNot:1, }).then(res => {
-                this.optionForm.column[0].dicData = res.data.data
-            })
-        },
-        //编辑
-        rowEdit(row, index) {
-            if (row.$cellEdit) {
-                this.$set(row, '$cellEdit', false)
+        }
+      });
+    },
+    //编辑
+    confirmEditing() {
+      this.isButton = false;
+      if (this.form.statusName == "待入库" || this.form.statusName == "已撤销") {
+        this.isEdit = false;
+        this.isrowAdd = false;
+        this.$set(this.optionForm, "disabled", false);
+        this.$set(this.optionContacts, "disabled", false);
+        this.optionForm.column.forEach(item => {
+          if (item.prop == "remarks" || item.prop == "createTime" || item.prop == "stockClerkId") {
+            this.$set(item, "disabled", false);
+          } else {
+            this.$set(item, "disabled", true);
+          }
+        });
+        this.optionContacts.column.forEach(item => {
+          if (item.prop == "remarks" || item.prop == "dot" || item.prop == "sendNum") {
+            this.$set(item, "disabled", false);
+          } else {
+            this.$set(item, "disabled", true);
+          }
+        });
+        if (this.form.billno.substring(0, 4) == "TKSH") {
+          // this.isEdit = true
+          this.isEdits = true;
+          this.isrowAdd = true;
+          this.optionContacts.column.forEach(item => {
+            if (item.prop == "remarks" || item.prop == "sendNum" || item.prop == "price" || item.prop == "dot") {
+              this.$set(item, "disabled", false);
             } else {
-                this.$set(row, '$cellEdit', true)
+              this.$set(item, "disabled", true);
             }
-            // this.confirmEditing()
-            dotList({
-                storageId: this.form.storageId,
-                goodsId: row.goodsId
-            }).then(res => {
-                this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data
-                // console.log(this.dicData)
-            })
-            console.log(this.optionContacts, 802)
-            // this.$refs.formContacts.rowEdit(row, index)
-        },
-        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("操作成功!");
+          });
+        }
+      } else if (this.form.statusName == "已入库") {
+        this.$set(this.optionForm, "disabled", false);
+        this.$set(this.optionContactsBack, "disabled", false);
+        this.optionForm.column.forEach(item => {
+          if (item.prop == "remarks") {
+            this.$set(item, "disabled", false);
+          } else {
+            this.$set(item, "disabled", true);
+          }
+        });
+        this.optionContactsBack.column.forEach(item => {
+          if (item.prop == "remarks") {
+            this.$set(item, "disabled", false);
+          } else {
+            this.$set(item, "disabled", true);
+          }
+        });
+      }
+      console.log(this.form.shipItemsList[0].goodsId);
+      goodsDetail({ id: this.form.shipItemsList[0].goodsId, stock: this.form.storageId ? this.form.storageId : "" }).then(res => {
+        if (res.data.data.whether == 0) {
+          this.findObject(this.optionContacts.column, "dot").disabled = true;
+        } else {
+          this.findObject(this.optionContacts.column, "dot").disabled = false;
+          dotList({
+            storageId: this.form.storageId,
+            goodsId: this.formContacts.goodsId
+          }).then(res => {
+            console.log("567");
+            this.findObject(this.optionContacts.column, "dot").dicData = res.data.data;
+          });
+        }
+      });
+    },
+    complete() {
+      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.customerName = this.form.$customerId;
+          submit({
+            ...this.form,
+            bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
+          })
+            .then(res => {
+              if (res.data.code === 601) {
+                if (this.onLoad.id) {
+                  console.log(2);
+                  this.refresh(this.onLoad.id, true);
                 }
-            }
-            );
-        },
-        // 明细信息多选
-        selectionContacts(list) {
-            this.selectionMultilist = list
-        },
-        // 一键删除
-        batchDelete() {
-            if (this.selectionMultilist.length == 0) {
-                return this.$message.warning('请选择要删除的数据')
-            }
-            this.$confirm("确定将选择数据删除?", {
-                confirmButtonText: "确定",
-                cancelButtonText: "取消",
-                type: "warning"
-            }).then(() => {
-                let multiList = this.selectionMultilist
-                let arr = this.form.shipItemsList
-                // 获取有id 的数据
-                const itemsWithId = multiList.filter(item => item.hasOwnProperty('id'));
-                let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
-                // 把选中的删除掉
-                multiList.forEach((item) => {
-                    for (let index in arr) {
-                        if (JSON.stringify(item) == JSON.stringify(arr[index])) {
-                            arr.splice(Number(index), 1)
-                        }
-                    }
+                this.$message({
+                  type: "error",
+                  message: res.data.msg
+                });
+                return true;
+              }
+              warehousingComplete({
+                ...this.form,
+                bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD"
+              })
+                .then(res => {
+                  this.refresh(res.data.data.id);
+                  this.$set(this.optionForm, "disabled", true);
+                  this.$set(this.optionContactsBack, "disabled", true);
+                  this.isEdit = true;
+                  this.$message.success("入库完成");
+                  loading.close();
                 })
-                // 有id 的处理
-                if (itemsWithId.length != 0) {
-                    removeItem(arrIds.join(',')).then(res => {
-                        this.$message.success("操作成功!");
-                    });
-                }
-            })
-        },
-        rowSave(form, done, loading) {
-            console.log(form)
-            done(form)
-        },
-        // 更新数据后确定触发该事件
-        rowUpdate(form, index, done, loading) {
-            console.log(form)
-            done(form);
-        },
-        handlePrint() {
-            this.switchDialog = !this.switchDialog;
-        },
-        onClose(val) {
-            this.switchDialog = val;
-        },
-        //自定义列保存
-        async saveColumnTwo(ref, option, optionBack, code) {
-            /**
-             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
-             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
-             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
-             */
-            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
-            isProcurement({ "param": "whether.model" }).then(res => {
-                if (res.data.data == 1) {
-                    this.findObject(this.optionContacts.column, "pattern").label = '规格型号1'
-                }
+                .finally(() => {
+                  loading.close();
+                });
             })
-            if (inSave) {
-                this.$message.success("保存成功");
-                //关闭窗口b
-                this.$refs[ref].$refs.dialogColumn.columnBox = false;
-            }
-        },
-        //自定义列重置
-        async resetColumnTwo(ref, option, optionBack, code) {
-            this[option] = this[optionBack];
-            isProcurement({ "param": "whether.model" }).then(res => {
-                if (res.data.data == 1) {
-                    this.findObject(this.optionContacts.column, "pattern").label = '规格型号1'
+            .catch(() => {
+              loading.close();
+            });
+        }
+      });
+    },
+    //修改提交触发
+    editCustomer() {
+      if (this.form.shipItemsList.length == 0) {
+        return this.$message.warning("请明细不能为空");
+      }
+      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.customerName = this.form.$customerId;
+          this.form.shipItemsList.map(item => {
+            item.$cellEdit = false;
+          });
+          submit({
+            ...this.form,
+            bizTypeName: this.form.id ? this.form.bizTypeName : "SHGD",
+            filesList: this.filesList
+          })
+            .then(res => {
+              if (res.data.code === 601) {
+                if (this.onLoad.id) {
+                  console.log(2);
+                  this.refresh(this.onLoad.id, true);
                 }
+                this.$message({
+                  type: "error",
+                  message: res.data.msg
+                });
+                return true;
+              }
+              this.$message.success("保存成功");
+              this.refresh(res.data.data.id);
+              loading.close();
             })
-            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
-            if (inSave) {
-                this.$message.success("重置成功");
-                this.$refs[ref].$refs.dialogColumn.columnBox = false;
+            .finally(() => {
+              loading.close();
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    refresh(id, type) {
+      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 => {
+            this.form = res.data.data;
+            this.filesList = res.data.data.filesList;
+            loading.close();
+          })
+          .catch(() => {
+            loading.close();
+          });
+      } else {
+        getDetails({ id: this.detailData.id })
+          .then(res => {
+            this.form = res.data.data;
+            this.filesList = res.data.data.filesList;
+            loading.close();
+          })
+          .catch(() => {
+            loading.close();
+          });
+      }
+    },
+    // 获取业务对象
+    corpsDescListAllfun(corpType) {
+      corpsDescListAll({ corpType: corpType, enableOrNot: 1 }).then(res => {
+        this.optionForm.column[0].dicData = res.data.data;
+      });
+    },
+    //编辑
+    rowEdit(row, index) {
+      if (row.$cellEdit) {
+        this.$set(row, "$cellEdit", false);
+      } else {
+        this.$set(row, "$cellEdit", true);
+      }
+      // this.confirmEditing()
+      dotList({
+        storageId: this.form.storageId,
+        goodsId: row.goodsId
+      }).then(res => {
+        this.findObject(this.optionContactsBack.column, "dot").dicData = res.data.data;
+        // console.log(this.dicData)
+      });
+      console.log(this.optionContacts, 802);
+      // this.$refs.formContacts.rowEdit(row, index)
+    },
+    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("操作成功!");
+        }
+      });
+    },
+    // 明细信息多选
+    selectionContacts(list) {
+      this.selectionMultilist = list;
+    },
+    // 一键删除
+    batchDelete() {
+      if (this.selectionMultilist.length == 0) {
+        return this.$message.warning("请选择要删除的数据");
+      }
+      this.$confirm("确定将选择数据删除?", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "warning"
+      }).then(() => {
+        let multiList = this.selectionMultilist;
+        let arr = this.form.shipItemsList;
+        // 获取有id 的数据
+        const itemsWithId = multiList.filter(item => item.hasOwnProperty("id"));
+        let arrIds = itemsWithId.map(item => item.id); // 获取id 数据
+        // 把选中的删除掉
+        multiList.forEach(item => {
+          for (let index in arr) {
+            if (JSON.stringify(item) == JSON.stringify(arr[index])) {
+              arr.splice(Number(index), 1);
             }
-        },
-        backToList(type) {
-            this.$emit("backToList", type);
+          }
+        });
+        // 有id 的处理
+        if (itemsWithId.length != 0) {
+          removeItem(arrIds.join(",")).then(res => {
+            this.$message.success("操作成功!");
+          });
+        }
+      });
+    },
+    rowSave(form, done, loading) {
+      console.log(form);
+      done(form);
+    },
+    // 更新数据后确定触发该事件
+    rowUpdate(form, index, done, loading) {
+      console.log(form);
+      done(form);
+    },
+    handlePrint() {
+      this.switchDialog = !this.switchDialog;
+    },
+    onClose(val) {
+      this.switchDialog = val;
+    },
+    //自定义列保存
+    async saveColumnTwo(ref, option, optionBack, code) {
+      /**
+       * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
+       * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
+       * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
+       */
+      const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
+      isProcurement({ param: "whether.model" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
+        }
+      });
+      isProcurement({ param: "reservoir.area" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
+        }
+        this.reservoirArea = res.data.data;
+      });
+      if (inSave) {
+        this.$message.success("保存成功");
+        //关闭窗口b
+        this.$refs[ref].$refs.dialogColumn.columnBox = false;
+      }
+    },
+    //自定义列重置
+    async resetColumnTwo(ref, option, optionBack, code) {
+      this[option] = this[optionBack];
+      isProcurement({ param: "whether.model" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.optionContacts.column, "pattern").label = "规格型号1";
         }
+      });
+      isProcurement({ param: "reservoir.area" }).then(res => {
+        if (res.data.data == 1) {
+          this.findObject(this.optionContacts.column, "reservoirAreaName").hide = false;
+        }
+        this.reservoirArea = res.data.data;
+      });
+      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);
     }
-}
+  }
+};
 </script>
 
 <style lang="scss" scoped>
 ::v-deep .el-form-item {
-    margin-bottom: 8px !important;
+  margin-bottom: 8px !important;
 }
 </style>

+ 19 - 6
src/views/tirePartsMall/salesManagement/saleOrder/detailsPage.vue

@@ -832,7 +832,7 @@ export default {
             prop: "storageId",
             type: "select",
             disabled: false,
-            placeholder: "仓库为空即为异地销售",
+            placeholder: "请选择 仓库",
             props: {
               label: "cname",
               value: "id"
@@ -1437,7 +1437,8 @@ export default {
             prop: "createTime"
           }
         ]
-      }
+      },
+      reservoirArea: 0
     };
   },
   components: { SearchQuery, reportDialog, check, checkSchedule, dicSelect },
@@ -1647,6 +1648,9 @@ export default {
     isProcurement({ param: "number.decimal" }).then(res => {
       this.numberDecimal = res.data.data ? Number(res.data.data) : 0;
     });
+    isProcurement({ param: "reservoir.area" }).then(res => {
+      this.reservoirArea = res.data.data;
+    });
   },
 
   watch: {
@@ -1722,9 +1726,12 @@ export default {
   methods: {
     viewInventory() {
       this.inventoryData = [];
-      inventoryList({ cname: this.selectionMultilist[0].goodsName, current: 1, size: 50 }).then(res => [
-        (this.inventoryData = res.data.data.records)
-      ]);
+      inventoryList({
+        cname: this.selectionMultilist[0].goodsName,
+        current: 1,
+        size: 50,
+        storageId: this.reservoirArea == 1 ? this.form.storageId : null
+      }).then(res => [(this.inventoryData = res.data.data.records)]);
     },
     viewInventory2() {
       inventoryList({ cname: this.selectionMultilist[0].goodsName }).then(res => [
@@ -2120,7 +2127,7 @@ export default {
       dotList({
         storageId: this.form.storageId,
         goodsId: goodsId,
-        whether:1,
+        whether: 1
       }).then(res => {
         this.picihaolist = res.data.data;
       });
@@ -3317,6 +3324,12 @@ export default {
         this.$message.error("请选择客户");
         return;
       }
+      if (this.reservoirArea == 1) {
+        if (!this.form.storageId) {
+          this.$message.error("请选择仓库");
+          return;
+        }
+      }
       this.findObject(
         this.optionContactsBack.column,
         "goodsId"