Browse Source

入库协议

tong 4 years ago
parent
commit
9cd023e005

+ 1 - 1
src/components/Uploadfile/index.vue

@@ -1,6 +1,6 @@
 <template>
   <div style="display: flex; justify-content:center;">
-    <button style="height: 20px"><a :href=File>查看</a></button>
+    <button style="height: 20px"><a target="_blank"  :href=File>查看</a></button>
     <el-upload
       class="upload-demo"
       :action="uploadImgUrl"

+ 134 - 7
src/views/warehouseBusiness/inStock/index.vue

@@ -1130,6 +1130,7 @@
           prop="fName"
           header-align="center"
           align="center"
+          width="250px"
           label="附件名称"
         >
           <template slot-scope="scope">
@@ -1145,6 +1146,7 @@
           prop="createBy"
           header-align="center"
           align="center"
+          width="250px"
           label="上传人"
         >
           <template slot-scope="scope">
@@ -1177,7 +1179,7 @@
           prop="fUrl"
           header-align="center"
           align="center"
-          width="80%"
+          width="300px"
           label="上传附件"
         >
           <template slot-scope="scope">
@@ -1211,8 +1213,8 @@
           >删除
         </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
-        <el-button type="warning">仓储费协议</el-button>
-        <el-button type="danger">作业费协议</el-button>
+        <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
+        <el-button @click.prevent="addAgreement()" type="danger">作业费协议</el-button>
       </div>
       <el-table
         :data="warehouseDrList"
@@ -1443,7 +1445,7 @@
           >删除
         </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
-        <el-button type="warning">仓储费协议</el-button>
+        <!-- <el-button type="warning">仓储费协议</el-button> -->
         <el-button type="danger">作业费协议</el-button>
       </div>
       <el-table
@@ -1691,6 +1693,80 @@
         <el-button type="primary" @click="submitForm(6)">请核</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
+      <!-- 选择库存总账数据 -->
+      <el-dialog
+        title="仓储费协议"
+        :modal="false"
+        style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
+        :visible.sync="warehousingagreement"
+        width="70%"
+      >
+        <el-table
+          :data="whgenlegList"
+          ref="table"
+          tooltip-effect="dark"
+          width="100%"
+          border
+          stripe
+          @selection-change="whgenlegSelectionChange"
+        >
+          <el-table-column type="selection" width="55"> </el-table-column>
+          <el-table-column
+            prop="fMblno"
+            header-align="center"
+            align="center"
+            label="提单号"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="createTime"
+            header-align="center"
+            align="center"
+            width="180px"
+            label="入库日期"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="fGoodsid"
+            header-align="center"
+            align="center"
+            label="品名"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="fQtyblc"
+            header-align="center"
+            align="center"
+            label="结余数量"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="fWarehouseLocationid"
+            header-align="center"
+            align="center"
+            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"
+          :total="whgenlegTotal"
+          :page.sync="whgenlegParams.pageNum"
+          :limit.sync="whgenlegParams.pageSize"
+          @pagination="getWhgenlegList"
+        />
+        <div slot="footer" class="dialog-footer">
+          <el-button type="primary" @click="whgenlegData">导入</el-button>
+          <el-button @click="warehousingagreement = false">取 消</el-button>
+        </div>
+      </el-dialog>
       <el-dialog
         title="入库页面"
         :modal="false"
@@ -1955,7 +2031,7 @@
           <tr>
             <td>收费</td>
             <td>装箱费</td>
-            <td>100元</td>
+            <td>元</td>
             <td colspan="4">办单费:5元,过磅费自理</td>
           </tr>
           <tr>
@@ -2025,6 +2101,7 @@ export default {
       // 修改查看状态
       browseStatus: false,
       detailsHidden: false,
+      warehousingagreement: false,
       fTruckno: '',
       fBsdate: '',
       fCntrtype: '',
@@ -2081,6 +2158,9 @@ export default {
       // 货权方(客户数据)
       // 客户名称
       KHblnoOptions: [],
+      // 仓储费协议
+      whgenlegList: [],
+      whgenlegTotal: 0,
        // 库存明细入账数组
       dataListSelection: [],
       fSbuOptions: [],
@@ -2161,6 +2241,14 @@ export default {
         fCntrtype: null,
         fCntqty: null,
       },
+         // 库存总账参数
+      whgenlegParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fMblno: null,
+        fCorpid: null,
+        fWarehouseid: null,
+      },
       // 表单参数
       form: {},
       // 表单校验
@@ -2271,6 +2359,14 @@ export default {
         createTime: Date.parse(new Date()),
       });
     },
+    // 新增仓储协议
+    addAgreement () {
+    this.whgenlegList = [];
+      this.dialogWhgenlegList = [];
+      this.whgenlegTotal = 0;
+      this.warehousingagreement = true;
+      this.getWhgenlegList();
+    },
     // 新增list
     addRelevant() {
       let time = null;
@@ -2297,15 +2393,25 @@ export default {
         remark: null,
       });
     },
+    
     // 收货单打印界面
     showEditDialog_s() {
       if(this.Printinglist.length>0) {
+      for(let aorp in this.Printinglist){
+          var date = new Date(this.Printinglist[aorp].fBsdate)
+          var Y = date.getFullYear() + '-'
+          var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+          var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
+          this.$set(this.Printinglist[aorp], 'fBsdate', Y + M + D)
+     }
+          
       this.editDialogVisible_s = true;
             for(let corp in this.fMblnoOptions){
               if(this.form.fCorpid === this.fMblnoOptions[corp].fId) {
                 this.$set(this.form, "fCorpid", this.fMblnoOptions[corp].fName);
               }
             }
+            
             for(let sorp in this.warehouseOptions){
               console.log(this.form.fWarehouseid)
               if(this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
@@ -2325,7 +2431,11 @@ export default {
       }
     },
     showEditDialog_sss() {
+       if(this.Printinglist.length>0) {
       this.editDialogVisible_sss = true;
+      }else {
+        this.$message.error("请选择需要打印的明细!");
+      }
     },
     // 收款信息
     addCollection() {
@@ -2410,6 +2520,14 @@ export default {
         this.loading = false;
       });
     },
+     // 查询仓储费信息
+    getWhgenlegList() {
+     
+    },
+    // 导入仓储费协议
+    whgenlegData() {
+
+    },
     // 贸易方式(数据字典),对���t_trademodels 字典翻译
     fTrademodeidFormat(row, column) {
       return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
@@ -2533,9 +2651,14 @@ export default {
       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.fCntrtype = selection[0].fCntrtype;
           this.fGoodsids = selection[0].fGoodsids;
+          var date = new Date(selection[0].fBsdate)
+          var Y = date.getFullYear() + '-'
+          var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+          var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
+          this.fBsdate = Y + M + D;
+         
       }
       
     },
@@ -2647,6 +2770,10 @@ export default {
       console.log(JSON.stringify(row))
       this.dataListSelection = row
     },
+     // 库存总账多选框
+    whgenlegSelectionChange(selection) {
+      this.dialogWhgenlegList = selection;
+    },
     // 合计
     getSummaries(param) {
       console.log(param);

+ 129 - 126
src/views/warehouseBusiness/outStock/index.vue

@@ -1165,6 +1165,8 @@
           >删除
         </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button type="warning">仓储费协议</el-button>
+        <el-button type="danger">作业费协议</el-button>
       </div>
       <el-table
         :data="warehouseDrList"
@@ -1400,6 +1402,8 @@
           >删除
         </el-button> -->
         <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button type="warning">仓储费协议</el-button>
+        <el-button type="danger">作业费协议</el-button>
       </div>
       <el-table
         :data="warehouseCrList"
@@ -1730,7 +1734,7 @@
               class="zzss"
               style="font-size: 28px; font-weight: bold; border: none"
             >
-              青岛大木进仓单
+              青岛大木进仓单
             </td>
           </tr>
           <tr>
@@ -1744,17 +1748,17 @@
             </td>
           </tr>
           <tr>
-            <td width="450" colspan="2" class="zzss">货权方:某某有限公司</td>
-            <td width="450" colspan="2" class="zzss">仓库:某某3号大仓</td>
+            <td width="450" colspan="2" class="zzss">货权方:{{form.fCorpid}}</td>
+            <td width="450" colspan="2" class="zzss">仓库:{{form.fWarehouseid}}</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="2" class="zzss">保管方:大木有限公司</td>
+            <td width="200" colspan="2" class="zzss">联系人:{{form.fContacts}}</td>
             <td width="200" colspan="3" class="zzss">
-              电话:0532-561651561-546
+              电话:{{form.fTel}}
             </td>
           </tr>
           <tr>
@@ -1767,13 +1771,13 @@
             <td width="100">包装规格</td>
           </tr>
           <tr>
-            <td width="100">56165654555</td>
-            <td width="100">某某商品</td>
-            <td width="100">20GP</td>
+            <td width="100">{{form.fMblno}}</td>
+            <td width="100">{{fGoodsids}}</td>
+            <td width="100">{{fCntrtype}}</td>
             <td width="100">某某</td>
             <td width="100">包</td>
             <td width="100">吨</td>
-            <td width="100">50kg</td>
+            <td width="100"></td>
           </tr>
           <tr>
             <td width="100">序号</td>
@@ -1784,76 +1788,22 @@
             <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 v-for="(item,index) in Printinglist" :key="index">
+            <td width="100">{{index+1}}</td>
+            <td width="100">{{item.fBsdate}}</td>
+            <td width="100">{{item.fCntqty}}</td>
+            <td width="100">{{item.fGrossweight}}</td>
+            <td width="100">{{item.fPlanqty}}</td>
+            <td width="100">{{item.fNetweight}}</td>
+            <td width="100">{{item.fQty}}</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>
+            <td width="100">{{fCntqty}}</td>
+            <td width="100">{{fGrossweight}}</td>
+            <td width="100">{{fPlanqty}}</td>
+            <td width="100">{{fNetweight}}</td>
+            <td width="100">{{fQty}}</td>
           </tr>
           <tr>
             <td width="100">备注:</td>
@@ -1896,26 +1846,29 @@
           id="print_area"
           class="biaoge zzss"
           border="1"
-          style="border-collapse: collapse; border: none"
+          style="border-collapse: collapse; border: none;margin-top;100px;"
         >
           <tr>
             <td
               width="1400"
               colspan="6"
               class="zzss"
-              style="font-size: 28px; font-weight: bold; border: none"
+              style="font-size: 26px; font-weight: bold; border: none"
             >
               大木国际物流(青岛)有限公司收货单
             </td>
           </tr>
+          <!-- <div v-for="{{}}" :key="index"> -->
           <tr>
+            <td width="400">车号:</td>
+            <td width="400">{{fTruckno}}</td>
             <td
-              width="900"
-              colspan="4"
+              width="500"
+              colspan="2"
+              style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
-              style="font-size: 28px; font-weight: bold"
             >
-              &nbsp;
+              日期:
             </td>
             <td
               width="500"
@@ -1923,58 +1876,52 @@
               style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
             >
-              出库日期:2020-11-20
+              {{fBsdate}}
             </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 v-for="(item,index) in Printinglist" :key="index">
+            <td width="250">货物品名:</td>
+            <td width="250">{{item.fGoodsids}}</td>
+            <td width="250">白色聚吕</td>
+            <!-- <td width="200" colspan="2">件数: 161件</td> -->
+            <!-- <td width="200"></td> -->
+            <td width="200" colspan="4" class="zzss">件数: {{item.fQty}}件</td>
           </tr>
-          <tr>
+          <!-- <tr>
             <td width="1400" colspan="6">&nbsp;</td>
-          </tr>
-          <tr>
+          </tr> -->
+          <tr v-for="(item,index) in Printinglist" :key="index">
             <td>备注:</td>
-            <td colspan="5"></td>
+            <td colspan="5">{{item.remark}}</td>
           </tr>
           <tr>
-            <td>收费</td>
-            <td>装箱费</td>
-            <td>100元</td>
-            <td colspan="4">办单费:5元,过磅费自理</td>
-          </tr>
-          <tr>
-            <td>司机签字:</td>
+            <td>司机签字:</td>
             <td></td>
-            <td>电话</td>
-            <td>15896154516</td>
-            <td colspan="2" rowspan="2">
-              确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
-            </td>
+            <td colspan="2">司机电话:</td>
+            <td colspan="2">{{form.fTel}}</td>
           </tr>
           <tr>
-            <td>制表:</td>
-            <td>张三</td>
-            <td>机械/人工:</td>
-            <td></td>
+            <td>制单人:</td>
+            <td>{{form.createBy}}</td>
+            <td colspan="2">收货人:</td>
+            <td colspan="2">{{form.fContacts}}</td>
           </tr>
-          <tr>
+          <!-- <tr>
             <td colspan="6" class="zzss">&nbsp;</td>
-          </tr>
+          </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>
+            <td width="290" class="zzss">电话:{{form.fTel}}</td>
           </tr>
+          <!-- </div> -->
         </table>
         <button @click="printSomething">打印</button>
       </el-dialog>
-      <el-dialog
+       <el-dialog
         title="收货单打印"
         style="box-shadow: 0 1px 3px rgba(0, 0, 0, 0) !important"
         :visible.sync="editDialogVisible_sss"
@@ -2012,14 +1959,14 @@
               style="padding-bottom: 0px; font-weight: bold; border: none"
               class="zzss"
             >
-              出库日期:2020-11-20
+              出库日期:{{fBsdate}}
             </td>
           </tr>
-          <tr>
+          <tr v-for="(item,index) in Printinglist" :key="index">
             <td width="200">车号</td>
-            <td width="200">苏HFN751</td>
+            <td width="200">{{item.fTruckno}}</td>
             <td width="200">货物品名</td>
-            <td width="200" colspan="4" class="zzss">某某商品名</td>
+            <td width="200" colspan="4" class="zzss">{{item.fGoodsids}}</td>
           </tr>
           <tr>
             <td width="1400" colspan="6">&nbsp;</td>
@@ -2031,23 +1978,23 @@
           <tr>
             <td>收费</td>
             <td>装箱费</td>
-            <td>100元</td>
+            <td>元</td>
             <td colspan="4">办单费:5元,过磅费自理</td>
           </tr>
           <tr>
             <td>司机签字:</td>
             <td></td>
             <td>电话</td>
-            <td>15896154516</td>
+            <td>{{form.fTel}}</td>
             <td colspan="2" rowspan="2">
               确认货物数量无误,包装于货物完好!<br />出库盖好篷布,如有违背责任自负<br />装卸工是否收小费
             </td>
           </tr>
           <tr>
             <td>制表:</td>
-            <td>张三</td>
+            <td>{{form.createBy}}</td>
             <td>机械/人工:</td>
-            <td></td>
+            <td>{{form.fContacts}}</td>
           </tr>
           <tr>
             <td colspan="6" class="zzss">&nbsp;</td>
@@ -2106,6 +2053,18 @@ export default {
       fFeeUnitids: "",
       browseStatus: false,
       detailsHidden: false,
+       fTruckno: '',
+      fBsdate: '',
+      fCntrtype: '',
+      fGoodsids: '',
+      fPlanqty: "",
+      fPlannetweight: "",
+      fCntqty: "",
+      fQty: "",
+      fGrossweight: "",
+      fGrossweight: '',
+      fPlanqty: '',
+      fPlanvolumn: "",
       fGrossweight: "",
       fNetweight: "",
       fid: '',
@@ -2128,6 +2087,7 @@ export default {
       dialogWhgenlegList: [],
       // 库存总账对话框
       whgenlegVisible: false,
+      warehousingagreement: false,
       // 新增用户对话框
       editDialogVisible_s: false,
       editDialogVisible_ss: false,
@@ -2136,6 +2096,7 @@ export default {
       dataList: [],
       warehouseCrList: [],
       warehouseDrList: [],
+      Printinglist: [],
       browseStatus: false,
       relevantAttachments: [],
       // 非单个禁用
@@ -2412,13 +2373,48 @@ export default {
     },
     // 收货单打印界面
     showEditDialog_s() {
+      if(this.Printinglist.length>0) {
+      for(let aorp in this.Printinglist){
+          var date = new Date(this.Printinglist[aorp].fBsdate)
+          var Y = date.getFullYear() + '-'
+          var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+          var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
+          this.$set(this.Printinglist[aorp], 'fBsdate', Y + M + D)
+     }
+          
       this.editDialogVisible_s = true;
+      console.log(this.fMblnoOptions)
+      console.log(this.form.fCorpid)
+            for(let corp in this.fMblnoOptions){
+              if(this.form.fCorpid === this.fMblnoOptions[corp].fId) {
+                this.$set(this.form, "fCorpid", this.fMblnoOptions[corp].fName);
+              }
+            }
+            
+            for(let sorp in this.warehouseOptions){
+              console.log(this.form.fWarehouseid)
+              if(this.form.fWarehouseid === this.warehouseOptions[sorp].fId) {
+                this.$set(this.form, "fWarehouseid", this.warehouseOptions[sorp].fName);
+              }
+            }
+      }else {
+        this.$message.error("请选择需要打印的明细!");
+      }
     },
     showEditDialog_ss() {
+      console.log(this.Printinglist)
+      if(this.Printinglist.length>0) {
       this.editDialogVisible_ss = true;
+      }else {
+        this.$message.error("请选择需要打印的明细!");
+      }
     },
     showEditDialog_sss() {
+      if(this.Printinglist.length>0) {
       this.editDialogVisible_sss = true;
+      }else {
+        this.$message.error("请选择需要打印的明细!");
+      }
     },
     // 收款信息
     addCollection() {
@@ -2806,9 +2802,11 @@ export default {
               }
               if (column.property === "fnetweight") {
                 this.form.fNetweight = prev + curr;
+                this.fNetweight = prev + curr;
               }
               if (column.property === "fqty") {
                 this.form.fQty = prev + curr;
+                this.fQty = prev + curr;
               }
               if (column.property === "fCntqty") {
                 this.fCntqty = prev + curr;
@@ -2969,14 +2967,19 @@ export default {
     },
     // 库存明细多选
     Selectinventory(selection) {
-      console.log(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;
+          this.fTruckno = selection[0].fTruckno;
+           this.fCntrtype = selection[0].fCntrtype;
+          this.fGoodsids = selection[0].fGoodsids;
+          var date = new Date(selection[0].fBsdate)
+          var Y = date.getFullYear() + '-'
+          var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
+          var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' '
+          this.fBsdate = Y + M + D;
+         
       }
     },
     // 计价单位选择