Преглед изворни кода

Merge branch 'master' of git.echepei.com:zhujiawei/Warehouse_management_ui

caojunjie пре 4 година
родитељ
комит
8836550e66

+ 5 - 0
src/views/basicdata/warehouse/index.vue

@@ -172,6 +172,11 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="库容" prop="fTotalgross">
+              <el-input v-model="form.fTotalgross" placeholder="请输入库容" />
+            </el-form-item>
+          </el-col>
         </el-row>
 
         <!--<el-form-item label="状态,默认 T ,正常T 停用F 下拉选择">

+ 116 - 314
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -22,7 +22,6 @@
           filterable
           remote
           clearable
-          style="width: 60%"
           :remote-method="userRemoteMethod"
           placeholder="请选择制单人"
         >
@@ -40,6 +39,7 @@
           type="daterange"
           value-format="yyyy-MM-dd"
           clearable
+          style="width: 80%"
           range-separator="至"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
@@ -51,7 +51,7 @@
           v-model="queryParams.fTrademodeid"
           placeholder="请选择贸易方式"
           clearable
-          style="width: 250px"
+          style="width: 80%"
           @keyup.enter.native="handleQuery"
         >
           <el-option
@@ -68,7 +68,7 @@
           filterable
           remote
           clearable
-          style="width: 250px"
+          style="width: 80%"
           @keyup.enter.native="handleQuery"
           :remote-method="corpsRemoteMethod"
           placeholder="请选择货权方"
@@ -85,6 +85,7 @@
         <el-input
           v-model="queryParams.fMblno"
           placeholder="请输入提单号"
+          style="width: 80%"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -98,7 +99,7 @@
           clearable
           :remote-method="fSbuRemoteMethod"
           @keyup.enter.native="handleQuery"
-          style="width: 250px"
+          style="width: 80%"
           placeholder="请选择经营单位"
         >
           <el-option
@@ -134,7 +135,7 @@
           :disabled="browseStatus"
           remote
           clearable
-          style="width: 250px"
+          style="width: 80%"
           :remote-method="warehouseRemoteMethod"
           @keyup.enter.native="handleQuery"
           placeholder="请选择仓库"
@@ -219,7 +220,8 @@
       <el-table-column :show-overflow-tooltip="true" label="货权方" align="center" prop="fCorpid" />
       <el-table-column label="转货权方" align="center" prop="fTocorpid" />
       <el-table-column label="提单号" align="center" prop="fMblno" />
-      <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" />
+      <!-- <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" /> -->
+      <el-table-column :show-overflow-tooltip="true" label="唛头" align="center" prop="fMarks" />
       <el-table-column
         label="货转日期"
         align="center"
@@ -303,7 +305,7 @@
                 filterable
                 remote
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择货权方"
               >
@@ -323,7 +325,7 @@
                 filterable
                 remote
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请选择新货权方"
               >
@@ -341,7 +343,7 @@
               <el-input
                 disabled
                 v-model="form.createBy"
-                style="width: 250px"
+                style="width: 80%"
                 placeholder="制单人"
               />
             </el-form-item>
@@ -352,7 +354,7 @@
                 v-model="form.fDeptid"
                 filterable
                 disabled
-                style="width: 250px"
+                style="width: 80%"
                 remote
               >
                 <el-option
@@ -368,7 +370,7 @@
             <el-form-item label="货转日期" prop="fBsdate">
               <el-date-picker
                 v-model="form.fBsdate"
-                style="width: 250px"
+                style="width: 80%"
                 type="date"
                 :disabled="browseStatus"
                 value-format="timestamp"
@@ -381,7 +383,7 @@
             <el-form-item label="仓储计费日期" prop="fChargedate">
               <el-date-picker
                 v-model="form.fChargedate"
-                style="width: 250px"
+                style="width: 80%"
                 type="date"
                 :disabled="browseStatus"
                 value-format="timestamp"
@@ -399,7 +401,7 @@
                 placeholder="请选择结算方式"
                 clearable
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
               >
                 <el-option
                   v-for="(dict,index) in fStltypeOptions"
@@ -417,7 +419,7 @@
                 placeholder="请选择计费单位"
                 clearable
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
               >
                 <el-option
                   v-for="(dict,index) in fFeetunitOptions"
@@ -435,7 +437,7 @@
                 placeholder="请选择贸易方式"
                 clearable
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
               >
                 <el-option
                   v-for="(dict,index) in fTrademodeidOptions"
@@ -454,7 +456,7 @@
               <el-input
                 v-model="form.fMblno"
                 :disabled="browseStatus"
-                style="width: 250px"
+                style="width: 80%"
                 placeholder="手工输入"
               />
             </el-form-item>
@@ -463,7 +465,7 @@
             <el-form-item label="原始入库单号" prop="fOriginalbillno">
               <el-input
                 v-model="form.fOriginalbillno"
-                style="width: 250px"
+                style="width: 80%"
                 :disabled="browseStatus"
                 placeholder="原始入库单号"
               />
@@ -476,6 +478,7 @@
                 type="daterange"
                 value-format="yyyy-MM-dd"
                 range-separator="至"
+                style="width: 80%"
                 :disabled="browseStatus"
                 start-placeholder="开始日期"
                 end-placeholder="结束日期">
@@ -491,7 +494,7 @@
                 filterable
                 :disabled="browseStatus"
                 remote
-                style="width: 250px"
+                style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
                 placeholder="请选择仓库"
               >
@@ -504,11 +507,27 @@
               </el-select>
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+              <el-form-item label="唛头" prop="fMarks">
+                <el-input
+                  v-model="form.fMarks"
+                  style="width: 80%"
+                  :disabled="browseStatus"
+                  placeholder="唛头"
+                />
+              </el-form-item>
+            </el-col>
         </el-row>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button type="primary" @click="submitForm(6)">提交审核</el-button>
       </el-form>
       <div class="dialogTableTitle flex a-center jlr">
         <h2>库存明细</h2>
-        <el-button :disabled="browseStatus" @click.prevent="addRelevant()">显示库存</el-button>
+        <el-button :disabled="browseStatus" @click.prevent="addRelevant()">新增</el-button>
+        <el-button :disabled="dataListSelection.length <= 0" @click.prevent="creditClick()"
+          >入库确认
+        </el-button>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
         :data="dataList"
@@ -517,8 +536,10 @@
         border
         stripe
         :summary-method="getSummaries"
+        @selection-change="Selectinventory"
         show-summary
       >
+      <el-table-column type="selection" width="55" align="center" />
         <el-table-column label="序号" type="index" width="80">
         </el-table-column>
         <el-table-column
@@ -695,8 +716,9 @@
       <div class="dialogTableTitle flex a-center jlr">
         <h2>附件上传</h2>
         <el-button :disabled="browseStatus" @click.prevent="addRelevt()"
-          >添加
+          >新增
         </el-button>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
         :data="relevantAttachments"
@@ -760,7 +782,7 @@
           prop="fUrl"
           header-align="center"
           align="center"
-          width="250PX"
+          width="80%"
           label="上传附件"
         >
           <template slot-scope="scope">
@@ -788,8 +810,9 @@
       <div class="dialogTableTitle flex a-center jlr">
         <h2>收款信息</h2>
         <el-button :disabled="browseStatus" @click.prevent="addCollection()"
-          >添加
+          >新增
         </el-button>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
         :data="warehouseDrList"
@@ -1012,8 +1035,9 @@
       <div class="dialogTableTitle flex a-center jlr">
         <h2>付款信息</h2>
         <el-button :disabled="browseStatus" @click.prevent="addpayment()"
-          >添加
+          >新增
         </el-button>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
         :data="warehouseCrList"
@@ -1237,22 +1261,8 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button
-          type="danger"
-          size="mini"
-          prop="打印"
-          @click="showEditDialog_ss"
-          >收货单
-        </el-button>
-        <el-button
-          type="danger"
-          size="mini"
-          prop="打印"
-          @click="showEditDialog_s"
-          >入库单
-        </el-button>
-        <el-button type="primary" @click="submitForm(2)">暂 存</el-button>
-        <el-button type="primary" @click="submitForm(6)">提 交</el-button>
+        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button type="primary" @click="submitForm(6)">提交审核</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
       <!-- 选择库存总账数据 -->
@@ -1325,270 +1335,6 @@
           <el-button @click="whgenlegVisible = false">取 消</el-button>
         </div>
       </el-dialog>
-      <el-dialog
-        title="入库页面"
-        :modal="false"
-        style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
-        :visible.sync="editDialogVisible_s"
-        width="70%"
-      >
-        <table
-          id="print_area"
-          class="biaoge zzss"
-          border="1"
-          style="border-collapse: collapse; border: none"
-        >
-          <tr>
-            <td
-              width="100"
-              colspan="7"
-              class="zzss"
-              style="font-size: 28px; font-weight: bold; border: none"
-            >
-              青岛大木进进仓单
-            </td>
-          </tr>
-          <tr>
-            <td
-              width="100"
-              colspan="7"
-              class="zzss"
-              style="font-size: 28px; font-weight: bold; border: none"
-            >
-              &nbsp;
-            </td>
-          </tr>
-          <tr>
-            <td width="450" colspan="2" class="zzss">货权方:某某有限公司</td>
-            <td width="450" colspan="2" class="zzss">仓库:某某3号大仓</td>
-            <td width="450" colspan="3" class="zzss">
-              地址:青岛市市北区郑州路1344号
-            </td>
-          </tr>
-          <tr>
-            <td width="200" colspan="2" class="zzss">保管方:某某有限公司</td>
-            <td width="200" colspan="2" class="zzss">联系人:张三</td>
-            <td width="200" colspan="3" class="zzss">
-              电话:0532-561651561-546
-            </td>
-          </tr>
-          <tr>
-            <td width="100" border="1">提单号</td>
-            <td width="100">品名</td>
-            <td width="100">箱型</td>
-            <td width="100">品牌</td>
-            <td width="100">件数</td>
-            <td width="100">重量</td>
-            <td width="100">包装规格</td>
-          </tr>
-          <tr>
-            <td width="100">56165654555</td>
-            <td width="100">某某商品</td>
-            <td width="100">20GP</td>
-            <td width="100">某某</td>
-            <td width="100">包</td>
-            <td width="100">吨</td>
-            <td width="100">50kg</td>
-          </tr>
-          <tr>
-            <td width="100">序号</td>
-            <td width="100">入货日期</td>
-            <td width="100">箱量(20GP)</td>
-            <td width="100">重量</td>
-            <td width="100">件数</td>
-            <td width="100">入库重量</td>
-            <td width="100">入库件数</td>
-          </tr>
-          <tr>
-            <td width="100">1</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">2</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">3</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">4</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">5</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">6</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">7</td>
-            <td width="100">2020-11-20</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100" colspan="2">合计:</td>
-            <td width="100">10</td>
-            <td width="100">100</td>
-            <td width="100">10000</td>
-            <td width="100">20</td>
-            <td width="100">3000</td>
-          </tr>
-          <tr>
-            <td width="100">备注:</td>
-            <td width="100" colspan="6"></td>
-          </tr>
-          <tr>
-            <td width="100" colspan="7" class="zzss">
-              本进仓单经仓管员签字并经保管方盖章后即专项作为货物所有人的货权证明,本单据不得转让。
-            </td>
-          </tr>
-          <tr style="border: none">
-            <td width="100" colspan="2" class="zzss" style="border: none">
-              开单员:
-            </td>
-            <td width="100" colspan="3" class="zzss" style="border: none"></td>
-            <td width="100" colspan="2" class="zzss" style="border: none">
-              仓管员:张三
-            </td>
-          </tr>
-          <tr style="border: none">
-            <td width="100" colspan="2" class="zzss" style="border: none">
-              开单时间:
-            </td>
-            <td width="100" colspan="3" class="zzss" style="border: none"></td>
-            <td width="100" colspan="2" class="zzss" style="border: none">
-              (盖章)
-            </td>
-          </tr>
-        </table>
-        <button @click="printSomething">打印</button>
-      </el-dialog>
-      <el-dialog
-        title="收货单打印"
-        style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
-        :visible.sync="editDialogVisible_ss"
-        width="70%"
-        :modal="false"
-      >
-        <table
-          id="print_area"
-          class="biaoge zzss"
-          border="1"
-          style="border-collapse: collapse; border: none"
-        >
-          <tr>
-            <td
-              width="1400"
-              colspan="6"
-              class="zzss"
-              style="font-size: 28px; font-weight: bold; border: none"
-            >
-              大木国际物流(青岛)有限公司收货单
-            </td>
-          </tr>
-          <tr>
-            <td
-              width="900"
-              colspan="4"
-              class="zzss"
-              style="font-size: 28px; font-weight: bold"
-            >
-              &nbsp;
-            </td>
-            <td
-              width="500"
-              colspan="2"
-              style="padding-bottom: 0px; font-weight: bold; border: none"
-              class="zzss"
-            >
-              出库日期:2020-11-20
-            </td>
-          </tr>
-          <tr>
-            <td width="200">车号</td>
-            <td width="200">苏HFN751</td>
-            <td width="200">货物品名</td>
-            <td width="200" colspan="4" class="zzss">某某商品名</td>
-          </tr>
-          <tr>
-            <td width="1400" colspan="6">&nbsp;</td>
-          </tr>
-          <tr>
-            <td>备注:</td>
-            <td colspan="5"></td>
-          </tr>
-          <tr>
-            <td>收费</td>
-            <td>装箱费</td>
-            <td>100元</td>
-            <td colspan="4">办单费:5元,过磅费自理</td>
-          </tr>
-          <tr>
-            <td>司机签字:</td>
-            <td></td>
-            <td>电话</td>
-            <td>15896154516</td>
-            <td colspan="2" rowspan="2">
-              确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
-            </td>
-          </tr>
-          <tr>
-            <td>制表:</td>
-            <td>张三</td>
-            <td>机械/人工:</td>
-            <td></td>
-          </tr>
-          <tr>
-            <td colspan="6" class="zzss">&nbsp;</td>
-          </tr>
-          <tr>
-            <td width="280" class="zzss"></td>
-            <td width="280" class="zzss"></td>
-            <td width="280" class="zzss"></td>
-            <td width="280" class="zzss"></td>
-            <td width="290" class="zzss">地址:淮河东路96号</td>
-            <td width="290" class="zzss">电话:18685818919</td>
-          </tr>
-        </table>
-        <button @click="printSomething">打印</button>
-      </el-dialog>
     </el-dialog>
   </div>
 </template>
@@ -1596,6 +1342,7 @@
 <script>
 import print from "print-js";
 import {
+  addWhgenleg,
   listGoodsTransfer,
   getGoodsTransfer,
   addGoodsTransfer,
@@ -1645,6 +1392,7 @@ export default {
       dataList: [],
       warehouseCrList: [],
       warehouseDrList: [],
+      Printinglist: [],
       relevantAttachments: [],
       // 非单个禁用
       single: true,
@@ -1670,6 +1418,8 @@ export default {
       userOptions: [],
       // 操作员
       goodsOptions: [],
+      // 库存明细入账数组
+      dataListSelection: [],
       // 制单部门
       deptOptions: [],
       // 仓库(仓库数据)
@@ -1765,40 +1515,40 @@ export default {
       // 表单校验
       rules: {
         fDeptid: [
-          { required: true, message: "制单部门不能为空", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
-        fMblno: [{ required: true, message: "请输入提单号", trigger: "blur" }],
+        fMblno: [{ required: true, message: " ", trigger: "blur" }],
         fBsdeptid: [
-          { required: true, message: "业务所属部门不能为空", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
         fCorpid: [
           {
             required: true,
-            message: "请选择货权方",
+            message: " ",
             trigger: "blur",
           },
         ],
         fBsdate: [
-          { required: true, message: "请选择业务日期", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
         fTrademodeid: [
-          { required: true, message: "请选择贸易方式", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
         fSbu: [
-          { required: true, message: "请选择经营单位", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
         fStorekeeper: {
           required: true,
-          message: "请输入仓管员",
+          message: " ",
           trigger: "blur",
         },
         fWarehouseid: [
-          { required: true, message: "请选择仓库", trigger: "blur" },
+          { required: true, message: " ", trigger: "blur" },
         ],
         fbillingway: [
           {
             required: true,
-            message: "请选择结算方式",
+            message: " ",
             trigger: "blur",
           },
         ],
@@ -1806,7 +1556,7 @@ export default {
           {
             required: true,
             message:
-              "请选择新货转货权方",
+              " ",
             trigger: "blur",
           },
         ],
@@ -1963,6 +1713,7 @@ export default {
           this.userVal = response.user;
           this.$set(this.form, "fDeptid", this.userVal.deptId);
           this.$set(this.form, "createBy", this.userVal.userName);
+          this.$set(this.form, "fTrademodeid", "1");
           // this.$set(this.relevantAttachments, "opUserName", this.userVal.userName);
           this.$set(this.form, "createTime", Date.parse(new Date()));
         }
@@ -1977,6 +1728,7 @@ export default {
       this.loading = true;
       listGoodsTransfer(this.queryParams).then((response) => {
         this.goodsTransferList = response.rows
+        console.log(response.rows)
         this.total = response.total
         this.loading = false
       });
@@ -2203,6 +1955,35 @@ export default {
    return sums
 
     },
+        // 入账
+    creditClick () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          let formData = new window.FormData();
+          formData.append("warehouseBills", JSON.stringify(this.form))
+          formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection))
+          formData.append("whgenleg", JSON.stringify(this.relevantAttachments))
+          addWhgenleg(formData).then((response) => {
+            this.creditStatus = true
+            this.msgSuccess("入账成功");
+            for (let li in this.dataListSelection) {
+              for (let i in this.dataList) {
+                let fQty = this.dataList[i].fQty === this.dataListSelection[li].fQty;
+                let fBsdate = this.dataList[i].fBsdate === this.dataListSelection[li].fBsdate;
+                let fGoodsid = this.dataList[i].fGoodsid === this.dataListSelection[li].fGoodsid;
+                let fcntrtype = this.dataList[i].fcntrtype === this.dataListSelection[li].fcntrtype;
+                let fNetweight = this.dataList[i].fNetweight === this.dataListSelection[li].fNetweight;
+                let fGrossweight = this.dataList[i].fGrossweight === this.dataListSelection[li].fGrossweight;
+                if (fBsdate && fGoodsid && fcntrtype && fGrossweight && fNetweight && fQty) {
+                  this.$set(this.dataList[i], 'fBillstatus', '7')
+                }
+              }
+            }
+          })
+        }
+      })
+      console.log('有东西')
+    },
     // 付款合计
     warehouseDrSummaries (param) {
         const {columns, data} = param
@@ -2247,6 +2028,24 @@ export default {
         }
       }
     },
+     // 库存明细多选
+    Selectinventory(selection) {
+      console.log(selection);
+      this.Printinglist = selection;
+      this.dataListSelection = selection;
+      if (this.Printinglist.length > 0) {
+          this.fTruckno = selection[0].fTruckno;
+          this.fBsdate =  new Date(selection[0].fBsdate) 
+          this.fCntrtype = selection[0].fCntrtype;
+          this.fGoodsids = selection[0].fGoodsids;
+      }
+      
+    },
+     // 库存明细多选框结果
+    dataListChange (row) {
+      console.log(JSON.stringify(row))
+      this.dataListSelection = row
+    },
     /** 提交按钮 */
     submitForm(status) {
       this.$refs["form"].validate((valid) => {
@@ -2457,4 +2256,7 @@ export default {
 .upload-demo {
   margin-left: 50px;
 }
+.el-form-item {
+  margin-bottom: 5px;
+}
 </style>

+ 45 - 29
src/views/warehouseBusiness/inStock/index.vue

@@ -11,6 +11,7 @@
         <el-input
           v-model="queryParams.fBillno"
           placeholder="请输入业务编号"
+          style="width: 80%"
           clearable
           size="small"
           @keyup.enter.native="handleQuery"
@@ -40,6 +41,7 @@
           type="daterange"
           value-format="yyyy-MM-dd"
           clearable
+          style="width: 60%"
           range-separator="至"
           start-placeholder="开始日期"
           end-placeholder="结束日期"
@@ -87,6 +89,7 @@
           v-model="queryParams.fMblno"
           placeholder="请输入提单号"
           clearable
+          style="width: 80%"
           size="small"
           @keyup.enter.native="handleQuery"
         />
@@ -116,6 +119,7 @@
           filterable
           remote
           clearable
+          style="width: 80%"
           :remote-method="goodsRemoteMethod"
           @keyup.enter.native="handleQuery"
           placeholder="请选择货物名称"
@@ -148,6 +152,16 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="唛头" prop="fMarks">
+        <el-input
+          v-model="queryParams.fMarks"
+          placeholder="请输入唛头"
+          clearable
+          style="width: 80%"
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button
           type="cyan"
@@ -231,7 +245,7 @@
       <el-table-column type="index" label="行号" align="center" />
       <el-table-column :show-overflow-tooltip="true" label="货权方" align="center" prop="fCorpid" />
       <el-table-column label="提单号" align="center" prop="fMblno" />
-      <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" />
+      <el-table-column :show-overflow-tooltip="true" label="唛头" align="center" prop="fMarks" />
       <el-table-column
         label="入库日期"
         align="center"
@@ -371,7 +385,6 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-
           <el-col :span="8">
             <el-form-item label="仓管员" prop="fStorekeeper">
               <el-select
@@ -484,12 +497,6 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="质押银行" prop="fBankcorpid">
-              <!-- <el-input
-                v-model="form.fBankcorpid"
-                laceholder="质押银行"
-                :disabled="browseStatus"
-                style="width: 80%"
-              /> -->
               <el-select
           v-model="queryParams.fBankcorpid"
           filterable
@@ -497,11 +504,11 @@
           clearable
           style="width: 80%"
           @keyup.enter.native="handleQuery"
-          :remote-method="corpsRemoteMethod"
-          placeholder="请输入"
+          :remote-method="corpsRemoteMethodd"
+          placeholder="请输入模糊查找"
         >
           <el-option
-            v-for="(dict, index) in fMblnoOptions"
+            v-for="(dict, index) in Pledgebank"
             :key="index.fId"
             :label="dict.fName"
             :value="dict.fId"
@@ -528,7 +535,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-              <el-form-item label="唛头" prop="fbarks">
+              <el-form-item label="唛头" prop="fMarks">
                 <el-input
                   v-model="form.fMarks"
                   style="width: 80%"
@@ -554,7 +561,7 @@
           @click="
             detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
           "
-          >展开</el-button
+          >{{detailsHidden?"隐藏":"展开"}}</el-button
         >
         <el-button
           type="danger"
@@ -566,7 +573,7 @@
           type="danger"
           prop="打印"
           @click="showEditDialog_s"
-        >库单
+        >库单
         </el-button>
         <el-button
           type="danger"
@@ -740,9 +747,9 @@
         <el-button :disabled="dataListSelection.length <= 0" @click.prevent="creditClick()"
           >入库确认
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRoww(warehouseDrList)"
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRoww(warehouseDrList)"
           >删除
-        </el-button>
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
@@ -987,7 +994,6 @@
         >
           <template slot-scope="scope">
             <el-input
-              oninput="value=value.replace(/[^\d.]/g,'')"
               v-model="scope.row.fPackagespecs"
               placeholder="包装规格"
               :disabled="browseStatus"
@@ -1069,14 +1075,14 @@
           align="center"
           label="状态"
         >
-          <template slot-scope="scope">
+          <!-- <template slot-scope="scope">
             <el-input
               v-model="scope.row.fstatus"
               placeholder="状态"
               :disabled="browseStatus"
               show-word-limit
             />
-          </template>
+          </template> -->
         </el-table-column>
         <el-table-column
           header-align="center"
@@ -1190,9 +1196,9 @@
         <el-button :disabled="browseStatus" @click.prevent="addCollection()"
           >新增
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
-        </el-button>
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
         <el-button type="primary">仓储费协议</el-button>
         <el-button type="primary">作业费协议</el-button>
@@ -1422,9 +1428,9 @@
         <el-button :disabled="browseStatus" @click.prevent="addpayment()"
           >新增
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseCrList)"
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseCrList)"
           >删除
-        </el-button>
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
         <el-button type="primary">仓储费协议</el-button>
         <el-button type="primary">作业费协议</el-button>
@@ -1654,21 +1660,18 @@
       <div slot="footer" class="dialog-footer">
         <el-button
           type="danger"
-          size="mini"
           prop="打印"
           @click="showEditDialog_ss"
           >收货单
         </el-button>
         <el-button
           type="danger"
-          size="mini"
           prop="打印"
           @click="showEditDialog_s"
           >入库单
         </el-button>
         <el-button
           type="danger"
-          size="mini"
           prop="打印"
           @click="showEditDialog_sss"
           >作业单
@@ -1980,6 +1983,7 @@
 <script>
 import print from "print-js";
 import {
+  addWhgenleg,
   listWarehousebills,
   getWarehousebills,
   delWarehousebills,
@@ -2044,6 +2048,7 @@ export default {
       dataList: [],
       warehouseCrList: [],
       warehouseDrList: [],
+      Pledgebank: [],
       relevantAttachments: [],
       // 非单个禁用
       single: true,
@@ -2224,6 +2229,7 @@ export default {
       this.fBillstatusOptions = response.data;
     });
   },
+  
   methods: {
     // 上传成功返回数据
     showFile(row) {
@@ -2522,6 +2528,7 @@ export default {
       this.reset();
       this.queryUser();
       this.open = true;
+      this.detailsHidden = false;
       this.dataList = [];
       this.warehouseCrList = [];
       this.warehouseDrList = [];
@@ -2533,6 +2540,7 @@ export default {
       console.log(status);
       this.browseStatus = status;
       this.reset();
+      this.detailsHidden = false;
       const fId = row.fId || this.ids;
       getWarehousebills(fId).then((response) => {
         console.log(response)
@@ -2589,7 +2597,7 @@ export default {
         this.userOptions = response.data.sysUser;
         this.$set(this.form, "fBsdate", Date.parse(this.form.fBsdate));
         this.open = true;
-        this.title = "修改仓入库)";
+        this.title = "修改仓入库";
       });
     },
     // 库存明细多选框结果
@@ -2727,9 +2735,7 @@ export default {
       }
     },
     changefCorpid(row) {
-      console.log(row)
        this.$set(row, "fSbu", row.fCorpid);
-       
     },
     // 变更计价单位
     changeFeeUnit(row) {
@@ -2989,6 +2995,16 @@ export default {
         this.KHblnoOptions = response.rows;
       });
     },
+    /* 远程模糊查询质押银行 */
+    corpsRemoteMethodd(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 5 };
+      listCorps(queryParams).then((response) => {
+        this.Pledgebank = response.rows;
+      });
+    },
     /* 远程模糊查询商品 */
     goodsRemoteMethod(name) {
       if (name == null || name === "") {

+ 119 - 17
src/views/warehouseBusiness/outStock/index.vue

@@ -147,6 +147,16 @@
           ></el-option>
         </el-select>
       </el-form-item>
+      <el-form-item label="唛头" prop="fMarks">
+        <el-input
+          v-model="queryParams.fMarks"
+          placeholder="请输入唛头"
+          clearable
+          size="small"
+          style="width: 80%"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item>
         <el-button
           type="cyan"
@@ -230,7 +240,7 @@
       <el-table-column type="index" label="行号" align="center" />
       <el-table-column :show-overflow-tooltip="true" label="货权方" align="center" prop="fCorpid" />
       <el-table-column label="提单号" align="center" prop="fMblno" />
-      <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" />
+      <el-table-column :show-overflow-tooltip="true" label="唛头" align="center" prop="fMarks" />
       <el-table-column
         label="出库日期"
         align="center"
@@ -321,6 +331,7 @@
                 filterable
                 remote
                 :disabled="browseStatus"
+                @change="changefCorpid(form)"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -491,12 +502,23 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="质押银行" prop="fbankcorpid">
-              <el-input
-                v-model="form.fBankcorpid"
-                :disabled="browseStatus"
-                laceholder="质押银行"
-                style="width: 80%"
-              />
+              <el-select
+          v-model="queryParams.fBankcorpid"
+          filterable
+          remote
+          clearable
+          style="width: 80%"
+          @keyup.enter.native="handleQuery"
+          :remote-method="corpsRemoteMethodd"
+          placeholder="请输入模糊查找"
+        >
+          <el-option
+            v-for="(dict, index) in Pledgebank"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -518,7 +540,7 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="唛头" prop="fbarks">
+            <el-form-item label="唛头" prop="fMarks">
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
@@ -544,7 +566,7 @@
           @click="
             detailsHidden ? (detailsHidden = false) : (detailsHidden = true)
           "
-          >展开</el-button
+          >{{detailsHidden?"隐藏":"展开"}}</el-button
           
         >
         <el-button
@@ -636,7 +658,7 @@
                 placeholder="请选择经营单位"
               >
                 <el-option
-                  v-for="(dict,index) in fSbuOptions"
+                  v-for="(dict,index) in fMblnoOptions"
                   :key="index.fId"
                   :label="dict.fName"
                   :value="dict.fId"
@@ -728,9 +750,12 @@
         <el-button :disabled="browseStatus" @click.prevent="addRelevant()"
           >新增
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
-          >删除
+        <el-button :disabled="dataListSelection.length <= 0" @click.prevent="creditClick()"
+          >入库确认
         </el-button>
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
+          >删除
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
@@ -740,6 +765,7 @@
         border
         stripe
         :summary-method="getSummaries"
+        @selection-change="Selectinventory"
         show-summary
       >
         <el-table-column type="selection" width="55" align="center" />
@@ -1134,9 +1160,9 @@
         <el-button :disabled="browseStatus" @click.prevent="addCollection()"
         >新增
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
-        </el-button>
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
@@ -1369,9 +1395,9 @@
         <el-button :disabled="browseStatus" @click.prevent="addpayment()"
         >新增
         </el-button>
-        <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
+        <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
-        </el-button>
+        </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
       </div>
       <el-table
@@ -1674,6 +1700,13 @@
             label="库区"
           >
           </el-table-column>
+          <el-table-column
+            prop="fMarks"
+            header-align="center"
+            align="center"
+            label="唛头"
+          >
+          </el-table-column>
         </el-table>
         <pagination
           v-show="whgenlegTotal>0"
@@ -2050,6 +2083,7 @@
 <script>
   import print from "print-js";
   import {
+    addWhgenleg,
     listWarehousebills,
     getWarehousebills,
     delWarehousebills,
@@ -2135,6 +2169,7 @@
         // 货权方(客户数据)
         // 客户名称
         KHblnoOptions: [],
+        Pledgebank: [],
         fSbuOptions: [],
         // 操作员
         userOptions: [],
@@ -2144,6 +2179,8 @@
         deptOptions: [],
         // 仓库(仓库数据)
         warehouseOptions: [],
+         // 库存明细入账数组
+        dataListSelection: [],
         kqhouseOptions: [],
         // 贸易方式(数据字典),对应t_trademodels 字典
         fTrademodeidOptions: [],
@@ -2344,6 +2381,7 @@
           this.$message({ message: '请维护货权方、仓库、贸易方式', type: 'warning' })
           return false
         }
+        
         this.whgenlegList = []
         this.dialogWhgenlegList = []
         this.whgenlegTotal = 0
@@ -2452,6 +2490,7 @@
 
         listWhgenleg(this.whgenlegParams).then(response => {
           this.whgenlegList = response.rows
+          console.log(this.whgenlegList)
           this.whgenlegTotal = response.total
         })
       },
@@ -2575,6 +2614,7 @@
         this.reset();
         this.queryUser();
         this.open = true;
+        this.detailsHidden = false;
         this.dataList = [];
         this.warehouseCrList = [];
         this.warehouseDrList = [];
@@ -2585,6 +2625,7 @@
       handleUpdate(row, status) {
         this.browseStatus = status
         this.reset();
+        this.detailsHidden = false;
         const fId = row.fId || this.ids;
         getWarehousebills(fId).then((response) => {
           if (response.data.warehousebills) {
@@ -2680,6 +2721,10 @@
         console.log(selection)
 
       },
+      changefCorpid(row) {
+      console.log(row)
+       this.$set(row, "fSbu", row.fCorpid);  
+    },
       // 合计
       getSummaries (param) {
       console.log(param)
@@ -2761,6 +2806,11 @@
    return sums
 
     },
+     // 库存明细多选框结果
+    dataListChange (row) {
+      console.log(JSON.stringify(row))
+      this.dataListSelection = row
+    },
      // 变更计价单位
     changeFeeUnit (row) {
       console.log(this.fCntqty)
@@ -2777,6 +2827,36 @@
         this.$set(row, 'fAmount', parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2))
       }
     },
+    // 入账
+    creditClick () {
+      this.$refs["form"].validate((valid) => {
+        if (valid) {
+          let formData = new window.FormData();
+          formData.append("warehouseBills", JSON.stringify(this.form))
+          formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection))
+          formData.append("whgenleg", JSON.stringify(this.relevantAttachments))
+          addWhgenleg(formData).then((response) => {
+            console.log(response)
+            this.creditStatus = true
+            this.msgSuccess("入账成功");
+            for (let li in this.dataListSelection) {
+              for (let i in this.dataList) {
+                let fQty = this.dataList[i].fQty === this.dataListSelection[li].fQty;
+                let fBsdate = this.dataList[i].fBsdate === this.dataListSelection[li].fBsdate;
+                let fGoodsid = this.dataList[i].fGoodsid === this.dataListSelection[li].fGoodsid;
+                let fcntrtype = this.dataList[i].fcntrtype === this.dataListSelection[li].fcntrtype;
+                let fNetweight = this.dataList[i].fNetweight === this.dataListSelection[li].fNetweight;
+                let fGrossweight = this.dataList[i].fGrossweight === this.dataListSelection[li].fGrossweight;
+                if (fBsdate && fGoodsid && fcntrtype && fGrossweight && fNetweight && fQty) {
+                  this.$set(this.dataList[i], 'fBillstatus', '7')
+                }
+              }
+            }
+          })
+        }
+      })
+      console.log('有东西')
+    },
     // 付款信息计价单位合计
     getwarehouseCrList(param) {
       console.log(param);
@@ -2799,6 +2879,19 @@
       return sums;
 
     },
+    // 库存明细多选
+    Selectinventory(selection) {
+      console.log(selection);
+      this.Printinglist = selection;
+      this.dataListSelection = selection;
+      if (this.Printinglist.length > 0) {
+          this.fTruckno = selection[0].fTruckno;
+          this.fBsdate =  new Date(selection[0].fBsdate) 
+          this.fCntrtype = selection[0].fCntrtype;
+          this.fGoodsids = selection[0].fGoodsids;
+      }
+      
+    },
     // 计价单位选择
     changefFeeunitid(row) {
        console.log(row)
@@ -3039,13 +3132,22 @@
         this.$message.error('请输入仓库!')
         return false
       }
-
       let queryParams = { pageNum: 1, pageSize: 10,  fWarehouseid:this.form.fWarehouseid , fName: name };
       listArea(queryParams).then((response) => {
         console.log(response);
         this.kqhouseOptions = response.rows;
       });
     },
+    /* 远程模糊查询质押银行 */
+    corpsRemoteMethodd(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 5 };
+      listCorps(queryParams).then((response) => {
+        this.Pledgebank = response.rows;
+      });
+    },
       /* 远程模糊查询操作用户 */
       userRemoteMethod(name) {
         if (name == null || name === "") {