Browse Source

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

tong 4 years ago
parent
commit
f4cb26378a

+ 8 - 0
src/api/basicdata/warehouse.js

@@ -64,3 +64,11 @@ export function exportWarehouse(query) {
     params: query
   })
 }
+
+// 删除仓库
+export function delCusCon(fId) {
+  return request({
+    url: '/basicdata/area/' + fId,
+    method: 'delete'
+  })
+}

+ 26 - 40
src/views/basicdata/corps/index.vue

@@ -196,11 +196,6 @@
 
         <el-row>
           <el-col :span="8">
-            <el-form-item label="名称" prop="fName">
-              <el-input v-model="form.fName" style="width: 250px" placeholder="请输入名称" />
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
             <el-form-item label="简称" prop="fCname">
               <el-input v-model="form.fCname" style="width: 250px" placeholder="请输入简称" />
             </el-form-item>
@@ -210,14 +205,14 @@
               <el-input v-model="form.fEname" style="width: 250px" placeholder="请输入英文名称" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
           <el-col :span="8">
             <el-form-item label="电话" prop="fTel">
               <el-input v-model="form.fTel" style="width: 250px" placeholder="请输入电话" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
           <el-col :span="8">
             <el-form-item label="传真" prop="fFax">
               <el-input v-model="form.fFax" style="width: 250px" placeholder="请输入传真" />
@@ -228,14 +223,14 @@
               <el-input v-model="form.fEmail" style="width: 250px" placeholder="请输入邮箱" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
           <el-col :span="8">
             <el-form-item label="联系人" prop="fManage">
               <el-input v-model="form.fManage" style="width: 250px" placeholder="请输入联系人" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
           <el-col :span="8">
             <el-form-item label="地址" prop="fAddr">
               <el-input v-model="form.fAddr" style="width: 250px" placeholder="请输入地址" />
@@ -246,15 +241,15 @@
               <el-input v-model="form.fEaddr" style="width: 250px" placeholder="请输入英文地址" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
-
           <el-col :span="8">
             <el-form-item label="规模" prop="fScale">
               <el-input v-model="form.fScale" style="width: 250px" placeholder="请输入规模" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
+
           <el-col :span="8">
             <el-form-item label="省" prop="fProvince">
               <el-input v-model="form.fProvince" style="width: 250px" placeholder="请输入省" />
@@ -265,15 +260,8 @@
               <el-input v-model="form.fCity" style="width: 250px" placeholder="请输入市" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
-
-        </el-row>
-
-        <el-row>
           <el-col :span="8">
-            <el-form-item label="结算表票结、月结" prop="fStltypeid">
+            <el-form-item label="结算方式" prop="fStltypeid">
               <el-select v-model="form.fStltypeid" style="width: 250px" placeholder="请选择结算表票结、月结">
                 <el-option
                   v-for="dict in fStltypeidOptions"
@@ -284,6 +272,9 @@
               </el-select>
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
           <el-col :span="8">
             <el-form-item label="结费天数" prop="fStldays">
               <el-input v-model="form.fStldays" style="width: 250px" placeholder="请输入结费天数" />
@@ -294,15 +285,15 @@
               <el-input v-model="form.fContractno" style="width: 250px" placeholder="请输入合同号" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
-
           <el-col :span="8">
             <el-form-item label="税号" prop="fTax">
               <el-input v-model="form.fTax" style="width: 250px" placeholder="请输入税号" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
+
           <el-col :span="8">
             <el-form-item label="合同起" prop="fContractb">
               <el-date-picker clearable size="small" style="width: 250px"
@@ -323,14 +314,14 @@
               </el-date-picker>
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
           <el-col :span="8">
             <el-form-item label="开票电话" prop="fInvtel">
               <el-input v-model="form.fInvtel" style="width: 250px" placeholder="请输入开票电话" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
           <el-col :span="8">
             <el-form-item label="开票地址" prop="fInvaddr">
               <el-input v-model="form.fInvaddr" style="width: 250px" placeholder="请输入开票地址" />
@@ -341,15 +332,14 @@
               <el-input v-model="form.fBankno" style="width: 250px" placeholder="请输入本位币账号" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
-
           <el-col :span="8">
             <el-form-item label="本位币银行" prop="fBankname">
               <el-input v-model="form.fBankname" style="width: 250px" placeholder="请输入本位币银行" />
             </el-form-item>
           </el-col>
+        </el-row>
+
+        <el-row>
            <el-col :span="8">
             <el-form-item label="外币账号" prop="fUbankno">
               <el-input v-model="form.fUbankno" style="width: 250px" placeholder="请输入外币账号" />
@@ -360,10 +350,7 @@
               <el-input v-model="form.fUbankname" style="width: 250px" placeholder="请输入外币银行" />
             </el-form-item>
           </el-col>
-        </el-row>
-
-        <el-row>
-          <el-col :span="12">
+          <el-col :span="8">
             <el-form-item label="状态">
               <!--<el-radio-group v-model="form.fStatus">
                 <el-radio label="1">请选择字典生成</el-radio>
@@ -377,9 +364,8 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
-          </el-col>
         </el-row>
+
         <el-form-item label="备注" prop="remark">
           <el-input v-model="form.remark" style="width: 400px" placeholder="请输入备注" />
         </el-form-item>

+ 2 - 3
src/views/basicdata/warehouse/index.vue

@@ -238,7 +238,7 @@
                 size="mini"
                 type="text"
                 icon="el-icon-delete"
-                @click.native.prevent="deleteRow(scope.$index,scope.row.tId, contactList)"
+                @click.native.prevent="deleteRow(scope.$index,scope.row.fId, contactList)"
                 v-hasPermi="['basicdata:contact:edit']"
               >删除</el-button>
             </template>
@@ -255,7 +255,7 @@
 </template>
 
 <script>
-import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse,changeWareStatus, exportWarehouse } from "../../../api/basicdata/warehouse";
+import { listWarehouse, getWarehouse, delWarehouse, addWarehouse, updateWarehouse,changeWareStatus, exportWarehouse,delCusCon } from "../../../api/basicdata/warehouse";
 
 export default {
   name: "Warehouse",
@@ -330,7 +330,6 @@ export default {
           cancelButtonText: "取消",
           type: "warning"
         }).then(function() {
-          alert(index);
           return delCusCon(index);
         }).then(() => {
           this.getList();

+ 3 - 4
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -2007,7 +2007,6 @@ export default {
           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) {
@@ -2022,10 +2021,10 @@ export default {
                 }
               }
             }
+            this.$refs.table.clearSelection();
           })
         }
       })
-      console.log('有东西')
     },
     // 付款合计
     warehouseDrSummaries (param) {
@@ -2206,8 +2205,8 @@ export default {
       }
       // 净重 fPlannetweight
       // 毛重 fPlangrossweight
-      let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fQtyblc)).toFixed(6)
-      let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fQtyblc)).toFixed(6)
+      let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(6)
+      let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(6)
       this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(6))
       this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(6))
     },

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

@@ -267,8 +267,31 @@
       <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
       <el-table-column label="入库毛重" align="center" prop="fGrossweight" />
       <el-table-column label="净重" align="center" prop="fNetweight" />
-      <el-table-column width="150" label="费用状态" align="center" prop="fBillstatus" />
-      <el-table-column width="150" label="入库状态" align="center" prop="fItemsStatus" />
+      <el-table-column
+        width="100"
+        label="入库状态"
+        align="center"
+        prop="fItemsStatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === '1'">未入账</span>
+          <span v-if="scope.row.fItemsStatus === '2'">部分入账</span>
+          <span v-if="scope.row.fItemsStatus === '6'">全部入账</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        width="100"
+        label="费用状态"
+        align="center"
+        prop="fBillstatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fBillstatus === '1'">录入</span>
+          <span v-if="scope.row.fBillstatus === '2'">录入</span>
+          <span v-if="scope.row.fBillstatus === '3'">驳回</span>
+          <span v-if="scope.row.fBillstatus === '4'">请核</span>
+          <span v-if="scope.row.fBillstatus === '5'">审核中</span>
+          <span v-if="scope.row.fBillstatus === '6'">全部入账</span>
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
@@ -288,6 +311,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
+            v-if="scope.row.fBillstatus === '1' || scope.row.fBillstatus === '2' || scope.row.fBillstatus === '3'"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
             >修改
@@ -296,7 +320,7 @@
             size="mini"
             type="text"
             icon="el-icon-delete"
-            v-if="scope.row.fBillstatus !== '6'"
+            v-if="scope.row.fBillstatus !== '6' && scope.row.fItemsStatus === '1'"
             @click="handleDelete(scope.row)"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
             >删除
@@ -328,7 +352,7 @@
                 filterable
                 remote
                 @change="changefCorpid(form)"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -348,7 +372,7 @@
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -364,7 +388,7 @@
             <el-form-item label="提单号" prop="fMblno">
               <el-input
                 v-model="form.fMblno"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
                 placeholder="手工输入"
               />
@@ -378,7 +402,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 @change="changefBsdate"
                 value-format="timestamp"
                 placeholder="业务日期"
@@ -392,7 +416,7 @@
                 v-model="form.fStorekeeper"
                 filterable
                 remote
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="userRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -411,7 +435,7 @@
               <el-select
                 v-model="form.fWarehouseid"
                 filterable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 remote
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
@@ -445,7 +469,7 @@
                 v-model="form.fIfdamage"
                 placeholder="请选择是否破损"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -463,7 +487,7 @@
                 v-model="form.fIfweigh"
                 placeholder="请选择是否过磅"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -484,7 +508,7 @@
                 v-model="form.fIfpledge"
                 placeholder="请选择是否过磅"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -499,22 +523,23 @@
           <el-col :span="8">
             <el-form-item label="质押银行" prop="fBankcorpid">
               <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>
+                v-model="queryParams.fBankcorpid"
+                filterable
+                remote
+                clearable
+                style="width: 80%"
+                :disabled="browseStatus || formBrowseStatus"
+                @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">
@@ -523,7 +548,7 @@
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
                 clearable
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
               >
                 <el-option
@@ -540,11 +565,11 @@
                 <el-input
                   v-model="form.fMarks"
                   style="width: 80%"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   placeholder="唛头"
                 />
               </el-form-item>
-              
+
             </el-col>
             <el-col :span="15">
               <el-form-item label="备注" prop="fMarks">
@@ -552,15 +577,15 @@
               style="width: 100%"
               v-model="form.remark"
               type="textarea"
-              :disabled="browseStatus"
+              :disabled="browseStatus || formBrowseStatus"
               placeholder="请输入内容"
             />
               </el-form-item>
-              
+
             </el-col>
-            
+
         </el-row>
- 
+
         <div v-if="detailsHidden">
           <el-row style="margin-top: 30px">
             <el-col :span="8">
@@ -568,7 +593,7 @@
                 <el-input
                   v-model="form.fContacts"
                   style="width: 80%"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   placeholder="仓库联系人"
                 />
               </el-form-item>
@@ -577,7 +602,7 @@
               <el-form-item label="仓库电话" prop="fTel">
                 <el-input
                   v-model="form.fTel"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   style="width: 80%"
                   placeholder="请输仓库入电话"
                 />
@@ -588,7 +613,7 @@
                 <el-input
                   v-model="form.fVslvoy"
                   style="width: 80%"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   placeholder="船名航次"
                 />
               </el-form-item>
@@ -601,7 +626,7 @@
                   v-model="form.fEta"
                   style="width: 80%"
                   type="date"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   value-format="timestamp"
                   placeholder="到港日期"
                 >
@@ -613,7 +638,7 @@
                 <el-input
                   v-model="form.fCustomno"
                   style="width: 80%"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   laceholder="报关单号"
                 />
               </el-form-item>
@@ -625,7 +650,7 @@
                   v-model="form.fSbu"
                   filterable
                   remote
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   :remote-method="fSbuRemoteMethod"
                   style="width: 80%"
                   placeholder="请选择经营单位"
@@ -656,7 +681,7 @@
                 <el-select
                   v-model="form.fTrademodeid"
                   placeholder="请选择贸易方式"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   clearable
                   style="width: 80%"
                 >
@@ -728,7 +753,7 @@
         <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRoww(warehouseDrList)"
           >删除
         </el-button> -->
-        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button :disabled="browseStatus" type="primary" @click="submitForm(2)">保 存</el-button>
                <!--点击展开-->
         <el-button style="margin-left:19%;"
           @click="
@@ -754,8 +779,8 @@
           @click="showEditDialog_sss"
           >作业单
         </el-button>
-        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
-        <el-button type="primary" @click="submitForm(6)">请核</el-button>
+        <el-button :disabled="browseStatus" type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button :disabled="browseStatus" type="primary" @click="submitForm(6)">请核</el-button>
       </div>
       <el-table
         :data="dataList"
@@ -1008,7 +1033,7 @@
             />
           </template>
         </el-table-column>
-        
+
         <el-table-column
           prop="fCntrno"
           header-align="center"
@@ -1183,7 +1208,7 @@
           label="上传附件"
         >
           <template slot-scope="scope">
-            <uploadFile @input="showFile" v-model="scope.row.fUrl" />
+            <uploadFile :disabled="browseStatus" @input="showFile" v-model="scope.row.fUrl" />
           </template>
         </el-table-column>
         <el-table-column
@@ -1689,8 +1714,8 @@
           @click="showEditDialog_sss"
           >作业单
         </el-button>
-        <el-button type="primary" @click="submitForm(2)">保 存</el-button>
-        <el-button type="primary" @click="submitForm(6)">请核</el-button>
+        <el-button :disabled="browseStatus" type="primary" @click="submitForm(2)">保 存</el-button>
+        <el-button :disabled="browseStatus" type="primary" @click="submitForm(6)">请核</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
       <!-- 选择库存总账数据 -->
@@ -1841,7 +1866,7 @@
             <td width="100">入库重量</td>
             <td width="100">入库件数</td>
           </tr>
-          <tr v-for="(item,index) in Printinglist" :key="index">
+          <tr v-for="(item,index) in dataListSelection" :key="index">
             <td width="100">{{index+1}}</td>
             <td width="100">{{item.fBsdate}}</td>
             <td width="100">{{item.fCntqty}}</td>
@@ -1932,7 +1957,7 @@
               {{fBsdate}}
             </td>
           </tr>
-          <tr v-for="(item,index) in Printinglist" :key="index">
+          <tr v-for="(item,index) in dataListSelection" :key="index">
             <td width="250">货物品名:</td>
             <td width="250">{{item.fGoodsids}}</td>
             <td width="250">白色聚吕</td>
@@ -1943,7 +1968,7 @@
           <!-- <tr>
             <td width="1400" colspan="6">&nbsp;</td>
           </tr> -->
-          <tr v-for="(item,index) in Printinglist" :key="index">
+          <tr v-for="(item,index) in dataListSelection" :key="index">
             <td>备注:</td>
             <td colspan="5">{{item.remark}}</td>
           </tr>
@@ -2015,7 +2040,7 @@
               出库日期:{{fBsdate}}
             </td>
           </tr>
-          <tr v-for="(item,index) in Printinglist" :key="index">
+          <tr v-for="(item,index) in dataListSelection" :key="index">
             <td width="200">车号</td>
             <td width="200">{{item.fTruckno}}</td>
             <td width="200">货物品名</td>
@@ -2102,6 +2127,7 @@ export default {
       browseStatus: false,
       detailsHidden: false,
       warehousingagreement: false,
+      formBrowseStatus: false,
       fTruckno: '',
       fBsdate: '',
       fCntrtype: '',
@@ -2112,7 +2138,7 @@ export default {
       fFeeUnitid: "",
       fFeeUnitids: "",
       fGrossweight: "",
-      fid:"",
+      fid:null,
       fCntqty: "",
       fNetweight: "",
       fQty: "",
@@ -2121,7 +2147,6 @@ export default {
       loading: true,
       // 选中数组
       ids: [],
-      Printinglist: [],
       Collectionoptionss: [],
       userVal: {
         userName: null,
@@ -2250,7 +2275,9 @@ export default {
         fWarehouseid: null,
       },
       // 表单参数
-      form: {},
+      form: {
+        fItemsStatus: null
+      },
       // 表单校验
       rules: {
         fDeptid: [
@@ -2266,7 +2293,7 @@ export default {
              message: " ",
             trigger: "blur",
           },
-        ], 
+        ],
         fMarks: [
           { required: true, message: " ", trigger: "blur" },
         ],
@@ -2332,7 +2359,7 @@ export default {
       this.fBillstatusOptions = response.data;
     });
   },
-  
+
   methods: {
     // 上传成功返回数据
     showFile(row) {
@@ -2421,10 +2448,10 @@ export default {
       }else {
         this.$message.error("请选择需要打印的明细!");
       }
-      
+
     },
     showEditDialog_ss() {
-      if(this.Printinglist.length>0) {
+      if(this.dataListSelection.length>0) {
       this.editDialogVisible_ss = true;
       }else {
         this.$message.error("请选择需要打印的明细!");
@@ -2473,7 +2500,6 @@ export default {
         console.log(response)
         if (response.user !== null) {
           this.userVal = response.user;
-          console.log(this.userVal)
           this.$set(this.form, "fDeptid", this.userVal.deptId);
           this.$set(this.form, "createBy", this.userVal.userName);
           this.$set(this.form, "fIfdamage", "1");
@@ -2493,29 +2519,6 @@ export default {
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
         this.warehousebillsList = response.rows;
-        for (let li in this.warehousebillsList) {
-          if(this.warehousebillsList[li].fItemsStatus === '6') {
-              this.warehousebillsList[li].fItemsStatus = "全部入账"
-              // this.browseStatus = true;
-          } else if(this.warehousebillsList[li].fItemsStatus === '1') {
-            this.warehousebillsList[li].fItemsStatus = "录入"
-          } else {
-            this.warehousebillsList[li].fItemsStatus = "部分入账"
-          }
-          if (this.warehousebillsList[li].fBillstatus === '6') {
-              this.warehousebillsList[li].fBillstatus = "审核通过"
-          } else if(this.warehousebillsList[li].fBillstatus === '3') {
-            this.warehousebillsList[li].fBillstatus = "驳回"
-          }else if(this.warehousebillsList[li].fBillstatus === '4') {
-            this.warehousebillsList[li].fBillstatus = "请核"
-          }
-          else if(this.warehousebillsList[li].fBillstatus === '2') {
-            this.warehousebillsList[li].fBillstatus = "录入"
-          }else if(this.warehousebillsList[li].fBillstatus === '5') {
-            this.warehousebillsList[li].fBillstatus = "驳回"
-          }
-        }
-        console.log(response.rows);
         this.total = response.total;
         this.loading = false;
       });
@@ -2646,10 +2649,16 @@ export default {
     },
     // 库存明细多选
     Selectinventory(selection) {
-      console.log(selection);
-      this.Printinglist = selection;
-      this.dataListSelection = selection;
-      if (this.Printinglist.length > 0) {
+      this.dataListSelection = []
+      if (!selection || selection.length === 0) {
+        return false
+      } else {
+        for (let se in selection) {
+          if (!selection[se].fBillstatus || selection[se].fBillstatus !== '6') {
+            this.dataListSelection.push(selection[se]);
+          }
+        }
+        if (this.dataListSelection.length > 0) {
           this.fTruckno = selection[0].fTruckno;
            this.fCntrtype = selection[0].fCntrtype;
           this.fGoodsids = selection[0].fGoodsids;
@@ -2660,9 +2669,9 @@ export default {
           this.fBsdate = Y + M + D;
          
       }
-      
+      }
     },
-    
+
     // 收款选择
     Collectionoptions(selection) {
       console.log(selection)
@@ -2697,15 +2706,16 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row, status) {
-      console.log(status);
       this.browseStatus = status;
       this.reset();
       this.detailsHidden = false;
       const fId = row.fId || this.ids;
       getWarehousebills(fId).then((response) => {
-        console.log(response)
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
+          if (this.form.fItemsStatus !== '1') {
+            this.formBrowseStatus = true
+          }
         }
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
@@ -2728,18 +2738,12 @@ export default {
         this.$set(this.form, "fEta", Date.parse(this.form.fEta));
         this.$set(this.form, "createTime", Date.parse(this.form.createTime));
         this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
-
         for (let list in this.dataList) {
           this.$set(
             this.dataList[list],
             "fBsdate",
             Date.parse(this.dataList[list].fBsdate)
           );
-        //  if(this.dataList[list].fBillstatus === '6'){
-        //    this.$set(this.dataList[list], "fBillstatus", '已入账');
-        //  } else {
-        //    this.$set(this.dataList[list], "fBillstatus", '未入账');
-        //  }
         }
         this.goodsOptions = response.data.goodsList;
         this.kqhouseOptions = response.data.warehouseAreas;
@@ -2965,10 +2969,10 @@ export default {
           formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection))
           formData.append("whgenleg", JSON.stringify(this.relevantAttachments))
           addWhgenleg(formData).then((response) => {
-            console.log(response)
             this.fid = response.data;
-            this.creditStatus = true
+            this.formBrowseStatus = true
             this.msgSuccess("入账成功");
+            this.$refs.table.clearSelection();
             for (let li in this.dataListSelection) {
               for (let i in this.dataList) {
                 let fQty = this.dataList[i].fQty === this.dataListSelection[li].fQty;
@@ -2985,63 +2989,11 @@ export default {
           })
         }
       })
-      console.log('有东西')
     },
     /** 提交按钮 */
     submitForm(status) {
-      console.log(this.warehouseDrList);
       this.$refs["form"].validate((valid) => {
-        if (status === 2) {
-          console.log("@@");
-          console.log(this.form);
-          console.log(this.dataList);
-          console.log(this.warehouseCrList);
-          console.log(this.warehouseDrList);
-          
-          if (valid) {
-            this.form.fBillstatus = status;
-            this.form.fNetweight = this.fNetweight;
-            this.form.fPlangrossweight = this.fPlangrossweight;
-            this.form.fPlannetweight = this.fPlannetweight;
-            this.form.fPlanvolumn = this.fPlanvolumn;
-            this.form.fPlanqty = this.fPlanqty;
-            this.form.fGrossweight = this.fGrossweight;
-            this.form.fQty = this.fQty;
-            if(!this.form.fId) {
-               this.form.fId = this.fid;
-            }
-            
-             console.log(this.form)
-            let formData = new window.FormData();
-            // 附件数据
-            formData.append("tWarehouseBills", JSON.stringify(this.form));
-            // 库存明细
-            formData.append(
-              "tWarehousebillsitems",
-              JSON.stringify(this.dataList)
-            );
-            // 附件数据
-            formData.append(
-              "tWhgenleg",
-              JSON.stringify(this.relevantAttachments)
-            );
-            // 费用明细付款
-            formData.append(
-              "tWarehousebillsfeesCr",
-              JSON.stringify(this.warehouseCrList)
-            );
-            // 收款
-            formData.append(
-              "tWarehousebillsfeesDr",
-              JSON.stringify(this.warehouseDrList)
-            );
-            addWarehousebills(formData).then((response) => {
-              this.msgSuccess("提交成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        } else {
+        if (status !== 2) {
           if (this.dataList.length === 0) {
             this.$message.error("请新增库存明细!");
             return false;
@@ -3098,52 +3050,35 @@ export default {
               return false;
             }
           }
-          console.log(this.warehouseCrList);
-          if (valid) {
-            
-            this.form.fBillstatus = status;
-            this.form.fNetweight = this.fNetweight;
-            this.form.fPlangrossweight = this.fPlangrossweight;
-            this.form.fPlannetweight = this.fPlannetweight;
-            this.form.fPlanvolumn = this.fPlanvolumn;
-            this.form.fPlanqty = this.fPlanqty;
-            this.form.fGrossweight = this.fGrossweight;
-            this.form.fQty = this.fQty;
-            if(!this.form.fId) {
-               this.form.fId = this.fid;
-            }
-            console.log(this.form)
-            console.log(this.amt);
-            let formData = new window.FormData();
-            
-            // 附件数据
-            formData.append("tWarehouseBills", JSON.stringify(this.form));
-            // 库存明细
-            formData.append(
-              "tWarehousebillsitems",
-              JSON.stringify(this.dataList)
-            );
-            // 附件数据
-            formData.append(
-              "tWhgenleg",
-              JSON.stringify(this.relevantAttachments)
-            );
-            // 费用明细付款
-            formData.append(
-              "tWarehousebillsfeesCr",
-              JSON.stringify(this.warehouseCrList)
-            );
-            // 收款
-            formData.append(
-              "tWarehousebillsfeesDr",
-              JSON.stringify(this.warehouseDrList)
-            );
-            addWarehousebills(formData).then((response) => {
-              this.msgSuccess("提交成功");
-              this.open = false;
-              this.getList();
-            });
+        }
+        if (valid) {
+          this.form.fBillstatus = status;
+          this.form.fNetweight = this.fNetweight;
+          this.form.fPlangrossweight = this.fPlangrossweight;
+          this.form.fPlannetweight = this.fPlannetweight;
+          this.form.fPlanvolumn = this.fPlanvolumn;
+          this.form.fPlanqty = this.fPlanqty;
+          this.form.fGrossweight = this.fGrossweight;
+          this.form.fQty = this.fQty;
+          if(!this.form.fId) {
+            this.form.fId = this.fid;
           }
+          let formData = new window.FormData();
+          // 附件数据
+          formData.append("tWarehouseBills", JSON.stringify(this.form));
+          // 库存明细
+          formData.append("tWarehousebillsitems", JSON.stringify(this.dataList));
+          // 附件数据
+          formData.append("tWhgenleg",JSON.stringify(this.relevantAttachments));
+          // 费用明细付款
+          formData.append("tWarehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+          // 收款
+          formData.append("tWarehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+          addWarehousebills(formData).then((response) => {
+            this.msgSuccess("提交成功");
+            this.open = false;
+            this.getList();
+          });
         }
       });
     },
@@ -3183,7 +3118,7 @@ export default {
         });
     },
     deleteRow(index, rows) {
-      
+
       rows.splice(index, 1);
     },
     /* 远程模糊查询用户 */

+ 98 - 125
src/views/warehouseBusiness/outStock/index.vue

@@ -273,9 +273,31 @@
       <!-- <el-table-column label="货转客户名称" align="center" prop="fTocorpid" /> -->
       <el-table-column label="出库毛重" align="center" prop="fGrossweight" />
       <el-table-column label="净重" align="center" prop="fNetweight" />
-      <el-table-column width="150" label="费用状态" align="center" prop="fBillstatus" />
-      <el-table-column width="150" label="入库状态" align="center" prop="fItemsStatus" />
-
+      <el-table-column
+        width="100"
+        label="入库状态"
+        align="center"
+        prop="fItemsStatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fItemsStatus === '1'">未入账</span>
+          <span v-if="scope.row.fItemsStatus === '2'">部分入账</span>
+          <span v-if="scope.row.fItemsStatus === '6'">全部入账</span>
+        </template>
+      </el-table-column>
+      <el-table-column
+        width="100"
+        label="费用状态"
+        align="center"
+        prop="fBillstatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fBillstatus === '1'">录入</span>
+          <span v-if="scope.row.fBillstatus === '2'">录入</span>
+          <span v-if="scope.row.fBillstatus === '3'">驳回</span>
+          <span v-if="scope.row.fBillstatus === '4'">请核</span>
+          <span v-if="scope.row.fBillstatus === '5'">审核中</span>
+          <span v-if="scope.row.fBillstatus === '6'">全部入账</span>
+        </template>
+      </el-table-column>
       <el-table-column
         label="操作"
         align="center"
@@ -296,7 +318,7 @@
             size="mini"
             type="text"
             icon="el-icon-edit"
-            v-if="scope.row.fBillstatus !== '6'"
+            v-if="scope.row.fBillstatus === '1' || scope.row.fBillstatus === '2' || scope.row.fBillstatus === '3'"
             @click="handleUpdate(scope.row, false)"
             v-hasPermi="['warehouseBusiness:warehousebills:edit']"
             >修改
@@ -306,7 +328,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-if="scope.row.fBillstatus !== '6'"
+            v-if="scope.row.fBillstatus !== '6' && scope.row.fItemsStatus === '1'"
             v-hasPermi="['warehouseBusiness:warehousebills:remove']"
             >删除
           </el-button>
@@ -336,7 +358,7 @@
                 v-model="form.fCorpid"
                 filterable
                 remote
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 @change="changefCorpid(form)"
                 style="width: 80%"
                 :remote-method="corpsRemoteMethod"
@@ -356,7 +378,7 @@
               <el-select
                 v-model="form.fStltypeid"
                 placeholder="请选择结算方式"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 clearable
                 style="width: 80%"
               >
@@ -374,7 +396,7 @@
               <el-input
                 v-model="form.fMblno"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 placeholder="手工输入"
               />
             </el-form-item>
@@ -387,7 +409,7 @@
                 v-model="form.fBsdate"
                 style="width: 80%"
                 type="date"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 @change="changefBsdate"
                 value-format="timestamp"
                 placeholder="业务日期"
@@ -402,7 +424,7 @@
                 v-model="form.fStorekeeper"
                 filterable
                 remote
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="userRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -422,7 +444,7 @@
                 v-model="form.fWarehouseid"
                 filterable
                 remote
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 style="width: 80%"
                 :remote-method="warehouseRemoteMethod"
                 placeholder="请输入模糊查找"
@@ -454,7 +476,7 @@
               <el-select
                 v-model="form.fIfdamage"
                 placeholder="请选择是否破损"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 clearable
                 style="width: 80%"
               >
@@ -472,7 +494,7 @@
               <el-select
                 v-model="form.fIfweigh"
                 placeholder="请选择是否过磅"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 clearable
                 style="width: 80%"
               >
@@ -493,7 +515,7 @@
               <el-select
                 v-model="form.fIfpledge"
                 placeholder="请选择是否过磅"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 clearable
                 style="width: 80%"
               >
@@ -514,6 +536,7 @@
                 remote
                 clearable
                 style="width: 80%"
+                :disabled="browseStatus || formBrowseStatus"
                 @keyup.enter.native="handleQuery"
                 :remote-method="corpsRemoteMethodd"
                 placeholder="请输入模糊查找"
@@ -532,7 +555,7 @@
               <el-select
                 v-model="form.fFeetunit"
                 placeholder="请选择计费单位"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 clearable
                 style="width: 80%"
               >
@@ -550,7 +573,7 @@
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
-                :disabled="browseStatus"
+                :disabled="browseStatus || formBrowseStatus"
                 placeholder="唛头"
               />
             </el-form-item>
@@ -561,19 +584,20 @@
             <el-input
               style="width: 100%"
               v-model="form.remark"
-              :disabled="browseStatus"
+              :disabled="browseStatus || formBrowseStatus"
               type="textarea"
               placeholder="请输入内容"
             />
           </el-form-item>
         </el-row>
-       
+
         <div v-if="detailsHidden">
           <el-row style="margin-top: 30px">
             <el-col :span="8">
               <el-form-item label="仓库联系人" prop="fContacts">
                 <el-input
                   v-model="form.fContacts"
+                  :disabled="browseStatus || formBrowseStatus"
                   style="width: 80%"
                   placeholder="仓库联系人"
                 />
@@ -583,7 +607,7 @@
               <el-form-item label="仓库电话" prop="ftel">
                 <el-input
                   v-model="form.fTel"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   style="width: 80%"
                   placeholder="请输仓库入电话"
                 />
@@ -593,7 +617,7 @@
               <el-form-item label="船名航次" prop="fvslvoy">
                 <el-input
                   v-model="form.fVslvoy"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   style="width: 80%"
                   placeholder="船名航次"
                 />
@@ -607,7 +631,7 @@
                   v-model="form.fEta"
                   style="width: 80%"
                   type="date"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   value-format="timestamp"
                   placeholder="到港日期"
                 >
@@ -619,7 +643,7 @@
                 <el-input
                   v-model="form.fCustomno"
                   style="width: 80%"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   laceholder="报关单号"
                 />
               </el-form-item>
@@ -631,7 +655,7 @@
                   v-model="form.fSbu"
                   filterable
                   remote
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   :remote-method="fSbuRemoteMethod"
                   style="width: 80%"
                   placeholder="请选择经营单位"
@@ -662,7 +686,7 @@
                 <el-select
                   v-model="form.fTrademodeid"
                   placeholder="请选择贸易方式"
-                  :disabled="browseStatus"
+                  :disabled="browseStatus || formBrowseStatus"
                   clearable
                   style="width: 80%"
                 >
@@ -731,7 +755,7 @@
         <el-button
           :disabled="dataListSelection.length <= 0"
           @click.prevent="creditClick()"
-          >库确认
+          >库确认
         </el-button>
         <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
@@ -758,7 +782,7 @@
       </div>
       <el-table
         :data="dataList"
-        ref="table"
+        ref="tableList"
         tooltip-effect="dark"
         border
         stripe
@@ -811,7 +835,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fwarehouselocid"
+          prop="fWarehouselocids"
           header-align="center"
           width="150px"
           align="center"
@@ -819,7 +843,7 @@
         >
           <template slot-scope="scope">
             <el-select
-              v-model="scope.row.fWarehouselocid"
+              v-model="scope.row.fWarehouselocids"
               filterable
               remote
               disabled
@@ -837,7 +861,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fcntrtype"
+          prop="fCntrtype"
           header-align="center"
           align="center"
           width="140px"
@@ -871,7 +895,7 @@
           </template>
         </el-table-column>
         <el-table-column
-          prop="fQtyblc"
+          prop="fPlanqty"
           header-align="center"
           align="center"
           width="180px"
@@ -952,7 +976,7 @@
           header-align="center"
           width="180px"
           align="center"
-          label="包装规格"
+          label="*包装规格"
         >
           <template slot-scope="scope">
             <el-input
@@ -1039,12 +1063,8 @@
           label="状态"
         >
           <template slot-scope="scope">
-            <el-input
-              v-model="scope.row.fBillstatus"
-              placeholder="状态"
-              :disabled="browseStatus || scope.row.fBillstatus === '6'"
-              show-word-limit
-            />
+            <span v-if="scope.row.fBillstatus === '6'">已出库</span>
+            <span v-if="scope.row.fBillstatus !== '6'">未出库</span>
           </template>
         </el-table-column>
         <el-table-column
@@ -1057,6 +1077,7 @@
             <el-button
               @click.native.prevent="deleteRow(scope.$index, dataList)"
               size="small"
+              :disabled="browseStatus || scope.row.fBillstatus === '6'"
               >移除</el-button
             >
           </template>
@@ -2051,7 +2072,7 @@ export default {
     return {
       fFeeUnitid: "",
       fFeeUnitids: "",
-      browseStatus: false,
+      formBrowseStatus: false,
       detailsHidden: false,
        fTruckno: '',
       fBsdate: '',
@@ -2352,17 +2373,19 @@ export default {
           fMblno: this.dialogWhgenlegList[whgen].fMblno,
           fGoodsid: this.dialogWhgenlegList[whgen].fGoodsid,
           fCntrtype: null,
-          fQtyblc: this.dialogWhgenlegList[whgen].fQtyblc,
-          fNetweightblc: this.dialogWhgenlegList[whgen].fNetweightblc,
-          fGrossweightblc: this.dialogWhgenlegList[whgen].fGrossweightblc,
+          fPlanqty: this.dialogWhgenlegList[whgen].fQtyblc,
+          fPlannetweight: this.dialogWhgenlegList[whgen].fNetweightblc,
+          fPlangrossweight: this.dialogWhgenlegList[whgen].fGrossweightblc,
           fWarehouseLocationids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
           fGoodsids: this.dialogWhgenlegList[whgen].fGoodsids,
           fGrossweight: 0,
           fNetweight: 0,
           fQty: 0,
           fCntqty: 1,
+          fBillstatus: 1,
           fPackagespecs: null,
           fWarehouselocid: this.dialogWhgenlegList[whgen].fWarehouseLocationid,
+          fWarehouselocids: this.dialogWhgenlegList[whgen].fWarehouseLocationids,
           fCntrno: this.dialogWhgenlegList[whgen].fCntrno,
           fGoodsval: null,
           fTruckno: null,
@@ -2469,29 +2492,6 @@ export default {
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
         this.warehousebillsList = response.rows;
-        for (let li in this.warehousebillsList) {
-          if(this.warehousebillsList[li].fItemsStatus === '6') {
-              this.warehousebillsList[li].fItemsStatus = "全部入账"
-              // this.browseStatus = true;
-          } else if(this.warehousebillsList[li].fItemsStatus === '1') {
-            this.warehousebillsList[li].fItemsStatus = "录入"
-          } else {
-            this.warehousebillsList[li].fItemsStatus = "部分入账"
-          }
-          if (this.warehousebillsList[li].fBillstatus === '6') {
-              this.warehousebillsList[li].fBillstatus = "审核通过"
-          } else if(this.warehousebillsList[li].fBillstatus === '3') {
-            this.warehousebillsList[li].fBillstatus = "驳回"
-          }else if(this.warehousebillsList[li].fBillstatus === '4') {
-            this.warehousebillsList[li].fBillstatus = "请核"
-          }
-          else if(this.warehousebillsList[li].fBillstatus === '2') {
-            this.warehousebillsList[li].fBillstatus = "录入"
-          }else if(this.warehousebillsList[li].fBillstatus === '5') {
-            this.warehousebillsList[li].fBillstatus = "驳回"
-          }
-        }
-        console.log(response.rows);
         this.total = response.total;
         this.loading = false;
       });
@@ -2614,7 +2614,8 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map((item) => item.fId);
+      this.ids = selection;
+      // this.ids = selection.map((item) => item.fId);
       this.single = selection.length !== 1;
       this.multiple = !selection.length;
     },
@@ -2638,16 +2639,20 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row, status) {
       this.browseStatus = status;
-      console.log(this.dataList)
       this.reset();
       this.detailsHidden = false;
-      const fId = row.fId || this.ids;
-      getWarehousebills(fId).then((response) => {
+      let data = row || this.ids;
+      getWarehousebills(data.fId).then((response) => {
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           this.$set(this.form, "fEta", Date.parse(this.form.fEta));
           this.$set(this.form, "fStltypeid", this.form.fStltypeid + "");
           this.$set(this.form, "fTrademodeid", this.form.fTrademodeid + "");
+          if (this.form.fItemsStatus !== '1') {
+            this.formBrowseStatus = true
+          } else {
+            this.formBrowseStatus = false
+          }
         }
         if (response.data.corps) {
           this.fMblnoOptions = response.data.corps;
@@ -2666,21 +2671,8 @@ export default {
             if (!this.form.fMblno) {
               this.$set(this.form, "fMblno", this.dataList[list].fMblno);
             }
-            this.$set(
-              this.dataList[list],
-              "fGoodsids",
-              this.dataList[list].fGoodsid
-            );
-            this.$set(
-              this.dataList[list],
-              "fBsdate",
-              Date.parse(this.dataList[list].fBsdate)
-            );
-            if(this.dataList[list].fBillstatus === '6'){
-           this.$set(this.dataList[list], "fBillstatus", '已入账');
-         } else {
-           this.$set(this.dataList[list], "fBillstatus", '未入账');
-         }
+            this.$set(this.dataList[list], "fGoodsids", this.dataList[list].fGoodsid);
+            this.$set(this.dataList[list], "fBsdate", Date.parse(this.dataList[list].fBsdate));
           }
         }
         if (response.data.enclosures) {
@@ -2887,63 +2879,44 @@ export default {
               return false;
             }
             if (!this.dataListSelection[warehouseCr].fQty) {
-              this.$message.error("库件数");
+              this.$message.error("请维护出库件数");
               return false;
             }
             if (!this.dataListSelection[warehouseCr].fPackagespecs) {
-              this.$message.error("入库件数");
+              this.$message.error("请维护包装规格");
               return false;
             }
           }
         if (valid) {
           let formData = new window.FormData();
           formData.append("warehouseBills", JSON.stringify(this.form));
-          formData.append(
-            "warehousebillsitems",
-            JSON.stringify(this.dataListSelection)
-          );
+          formData.append("warehousebillsitems", JSON.stringify(this.dataListSelection));
           formData.append("whgenleg", JSON.stringify(this.relevantAttachments));
           addWhgenleg(formData).then((response) => {
-            console.log(response);
             this.fid = response.data;
-            console.log(response.data)
-            this.creditStatus = true;
-            this.msgSuccess("入账成功");
+            this.msgSuccess("出库成功");
+            this.formBrowseStatus = true
             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", "6");
+                let fQty = this.dataList[i].fQty === this.dataListSelection[li].fQty;
+                let fMblno = this.dataList[i].fMblno === this.dataListSelection[li].fMblno;
+                let fBillstatus = this.dataList[i].fBillstatus === this.dataListSelection[li].fBillstatus;
+                let fPackagespecs = this.dataList[i].fPackagespecs === this.dataListSelection[li].fPackagespecs;
+                let fWarehouselocid = this.dataList[i].fWarehouselocid === this.dataListSelection[li].fWarehouselocid;
+                let fGoodsid = this.dataList[i].fGoodsid === this.dataListSelection[li].fGoodsid;
+                let fNetweight = this.dataList[i].fNetweight === this.dataListSelection[li].fNetweight;
+                let fGrossweight = this.dataList[i].fGrossweight === this.dataListSelection[li].fGrossweight;
+                alert(fQty + fMblno + fBillstatus + fPackagespecs + fWarehouselocid + fGoodsid + fNetweight + fGrossweight)
+                if (fMblno && fGoodsid && fBillstatus && fPackagespecs && fWarehouselocid && fGrossweight && fNetweight && fQty) {
+                  this.$set(this.dataList[i], 'fBillstatus', '6');
                 }
               }
             }
+            this.$refs.tableList.clearSelection();
           });
         }
       });
-      console.log("有东西");
+      console.log("有东西:" + JSON.stringify(this.dataList));
     },
     // 付款信息计价单位合计
     getwarehouseCrList(param) {
@@ -3151,7 +3124,7 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const fIds = row.fId || this.ids;
+      const fIds = row.fId || this.ids.fId;
       this.$confirm(
         '是否确认删除仓库主(出入库)编号为"' + fIds + '"的数据项?',
         "警告",
@@ -3191,10 +3164,10 @@ export default {
         this.$set(row, 'fGrossweight', 0)
         return false
       }
-      // 净重 fNetweightblc
-      // 毛重 fGrossweightblc
-      let netweight = parseFloat(Number(row.fNetweightblc) / Number(row.fQtyblc)).toFixed(6)
-      let grossweigh = parseFloat(Number(row.fGrossweightblc) / Number(row.fQtyblc)).toFixed(6)
+      // 净重 fPlannetweight
+      // 毛重 fPlangrossweight
+      let netweight = parseFloat(Number(row.fPlannetweight) / Number(row.fPlanqty)).toFixed(6)
+      let grossweigh = parseFloat(Number(row.fPlangrossweight) / Number(row.fPlanqty)).toFixed(6)
       this.$set(row, 'fNetweight', parseFloat(Number(netweight) * Number(row.fQty)).toFixed(6))
       this.$set(row, 'fGrossweight', parseFloat(Number(grossweigh) * Number(row.fQty)).toFixed(6))
     },