浏览代码

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

caojunjie 4 年之前
父节点
当前提交
efc6fe0f32

+ 2 - 2
src/api/system/auditConfiguration.js

@@ -3,8 +3,8 @@ import request from '@/utils/request'
 export function addCharge(data) {
   return request({
     url: 'warehouse/pathsActs/auditPathslist',
-    method: 'post',
-    data: data
+    method: 'get',
+    params: data
 
   })
 }

+ 10 - 1
src/api/warehouseBusiness/warehouseInStock.js

@@ -17,7 +17,7 @@ export function getWarehousebills(fId) {
   })
 }
 
-// 新增仓库主(出入库)
+// 新增仓库主(出入库保存)
 export function addWarehousebills(data) {
   return request({
     url: '/warehouseBusiness/inStock/add',
@@ -25,6 +25,15 @@ export function addWarehousebills(data) {
     data: data
   })
 }
+// 新增仓库主(出入库提交)
+export function addWarehouse(data) {
+  return request({
+    url: '/warehouseBusiness/inStock/warehouseSubmission',
+    method: 'post',
+    data: data
+  })
+}
+
 
 // 撤销入库
 export function updateCredit(data) {

+ 39 - 39
src/views/finance/contrast/index.vue

@@ -384,7 +384,7 @@
           <el-button type="primary" size="small" @click="confirmReconciliation" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">确认对账</el-button>
           <el-button type="success" size="small" @click="backrRconciliation" v-if="queryParams.fBillstatus === '6'">撤销对账</el-button>
           <el-button type="info" size="small" @click="printing" :disabled="notChange">打印</el-button>
-          <el-button type="danger" size="small" :disabled="disappear" v-if="queryParams.fBillstatus === '6'">撤销审批</el-button>
+          <el-button type="danger" size="small" :disabled="disappear" v-if="queryParams.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
         </div>
 
         <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
@@ -438,11 +438,13 @@
       </el-table>
 
       <div slot="footer" class="dialog-footer">
-        <el-button v-if="approve = false" @click="addOrUpdateHand">审批</el-button>
-        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
+        <el-button v-if="approve === true" @click="addOrUpdateHand">审批</el-button>
+        <el-button type="info" v-show="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
         <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
+        <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
         <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
         <el-button @click="cancel">取 消</el-button>
+<!--        <el-button>取1消</el-button>-->
       </div>
 
       <!-- 添加或修改财务数据主对话框 -->
@@ -765,9 +767,10 @@ export default {
       disappear:false,
       addIndex:[],
       addOrUpdateVisible: false,
+      addOrUpdateVisib:false,
       contrastId:210,
       // 审批状态
-      approve:true,
+      approve:false,
       // 打印表
       printObject:[],
       //登陆人
@@ -893,10 +896,6 @@ export default {
         ]
       },
       feeListRules: {
-        // fCtrlcorpid: [
-        //   { required:true, message: '不能为空', trigger: 'blur'}
-        // ],
-
         fDc: [
           { required:true,message: '不能为空', trigger:'blur' }
         ],
@@ -909,15 +908,6 @@ export default {
         timeExamine: [
           { required: true, message: '审核日期不能为空', trigger: 'blur' }
         ]
-        // fBilltype: [
-        //   { required: true, message: "单据类型(对账单 收费 付费 付费申请 收费申请,发票申请 销项发票 进项发票)不能为空", trigger: "change" }
-        // ],
-        // fBillstatus: [
-        //   { required: true, message: "状态不能为空", trigger: "blur" }
-        // ]
-        // fDeptid: [
-        //   { required: true, message: "制单部门不能为空", trigger: "change" }
-        // ],
       }
     };
   },
@@ -927,20 +917,28 @@ export default {
   },
   created() {
     this.getList()
-    // this.register()
+    this.register()
   },
   methods: {
+    backApproval(){
+
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+    },
     getDataList(){
     this.addOrUpdateVisible = false
   },
-    // 审批
+    // 审批按钮
     addOrUpdateHand(){
       this.addOrUpdateVisib = true
       this.addOrUpdateVisible = false
       let id = '448'
       let actId = '110'
       this.$nextTick(() => {
-        this.$refs.ApprovalComments.init(id,actId)
+        console.log(this.queryParams.fId)
+        console.log(this.contrastId)
+        this.$refs.ApprovalComments.init(this.queryParams.fId,this.contrastId)
       })
     },
     // 查看审批流
@@ -1025,17 +1023,17 @@ export default {
       this.innerVisible = true
     },
     // 默认录入人
-    // register() {
-    //   queryUserVal().then((response)=>{
-    //     // this.Lander = response.user.userName
-    //     console.log(response)
-    //     this.Lander = response.user.userName
-    //     this.queryParams_s.createBy = response.user.userName
-    //   this.queryParams.createBy = response.user.userName
-    //   console.log(this.DzfeeList.createBy)
-    //   console.log(response.user.userName)
-    //   })
-    // },
+    register() {
+      queryUserVal().then((response)=>{
+        this.Lander = response.user.userName
+      //   console.log(response)
+      //   this.Lander = response.user.userName
+      //   this.queryParams_s.createBy = response.user.userName
+      // this.queryParams.createBy = response.user.userName
+      // console.log(this.DzfeeList.createBy)
+      // console.log(response.user.userName)
+      })
+    },
 
     getSummaries(param) {
         const { columns, data } = param;
@@ -1098,12 +1096,6 @@ export default {
     },
     /** 查询财务数据主列表 */
     getList() {
-      this.addIndex = this.$route.query.data
-      if(this.addIndex){
-        console.log(this.addIndex)
-        this.open = true
-      }
-      console.log(this.addIndex)
       this.loading = true;
        this.getDicts("approval_process").then(response => {
         // this.feeList = response.rows;
@@ -1291,6 +1283,11 @@ export default {
       // }
       // })
     },
+    // register(){
+    //   queryUserVal().then((response)=>{
+    //     this.Lander = response.user.userName
+    //   })
+    // },
     // 查看按钮
     check(row,res) {
       this.notChange = true
@@ -1302,12 +1299,15 @@ export default {
         this.fWbuOptions = response.data.feesList
         this.fMblnoOptions = response.data.corps
         this.open = true;
+        this.disappear = true
         this.title = "修改财务数据主";
+        console.log(this.Operator)
+        console.log(this.Lander)
         if (res == 1) {
           this.notChange = true
-          this.disappear = false
           console.log(this.notChange)
           if (this.Operator == this.Lander) {
+            this.disappear = false
             console.log(res)
             this.reset()
             this.pass = {
@@ -1357,7 +1357,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.notChange = true
+      this.notChange = false
       this.hide = false
       this.reset();
       this.pass={

+ 11 - 4
src/views/warehouseBusiness/agreement/index.vue

@@ -424,7 +424,14 @@ export default {
       loading: true,
       loading_s: false,
       browseStatus: false,
-      jFeetunitOptions:[],
+      // 计价单位
+      jFeetunitOptions: [
+        { dictLabel: "件数", dictValue: "1" },
+        { dictLabel: "毛重", dictValue: "2" },
+        { dictLabel: "净重", dictValue: "3" },
+        { dictLabel: "尺码", dictValue: "4" },
+        { dictLabel: "固定", dictValue: "5" },
+      ],
       goodsOptions:[],
       fTypeidOptions: [],
       // 选中数组
@@ -506,9 +513,9 @@ export default {
     this.getDicts("data_goods_category").then(response => {
       this.fTypeidOptions = response.data;
     });
-    this.getDicts("data_unitfees").then(response => {
-      this.jFeetunitOptions = response.data;
-    });
+    // this.getDicts("data_unitfees").then(response => {
+    //   this.jFeetunitOptions = response.data;
+    // });
   },
   methods: {
     // 仓储费状态修改

+ 32 - 27
src/views/warehouseBusiness/inStock/index.vue

@@ -463,7 +463,6 @@
             </el-form-item>
           </el-col>
         </el-row>
-
         <el-row>
           <el-col :span="8">
             <el-form-item label="计划件数" prop="fPlanqty">
@@ -471,7 +470,7 @@
                 v-model="form.fPlanqty"
                 style="width: 80%"
                 laceholder="计划件数"
-                oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
+                oninput='this.value=this.value.replace(/\D/g,"")' 
                 :disabled="browseStatus"
               />
             </el-form-item>
@@ -787,21 +786,12 @@
             >新行
           </el-button>
           <el-button
-            :disabled="dataListSelection.length <= 0"
-            @click.prevent="creditClick"
-            >入库确认
-          </el-button>
-          <el-button
-            :disabled="dataWithdrawList.length <= 0"
-            @click.prevent="withdrawClick"
-            >撤回入库</el-button
-          >
-          <el-button
             :disabled="browseStatus"
             type="primary"
             @click="submitForm(2)"
             >保 存</el-button
           >
+          
         </div>
         <div>
           <el-button
@@ -814,19 +804,29 @@
             >作业单
           </el-button>
           <el-button @click="discharge">卸货 </el-button>
+          <el-button
+            :disabled="dataListSelection.length <= 0"
+            @click.prevent="creditClick"
+            >入库确认
+          </el-button>
+          <el-button
+            :disabled="dataWithdrawList.length <= 0"
+            @click.prevent="withdrawClick"
+            >撤回入库</el-button
+          >
           <el-button type="success" prop="打印" @click="showEditDialog_ss"
             >收货单
           </el-button>
           <el-button type="warning" prop="打印" @click="showEditDialog_s"
             >入库单
           </el-button>
-
+<!-- 
           <el-button
             :disabled="browseStatus"
             type="primary"
             @click="submitForm(2)"
             >保 存</el-button
-          >
+          > -->
           <el-button
             :disabled="browseStatus"
             style="background-color: #008000; color: #fff"
@@ -2500,6 +2500,7 @@ import {
   getWarehousebills,
   delWarehousebills,
   addWarehousebills,
+  addWarehouse,
   updateWarehousebills,
   exportWarehousebills,
 } from "@/api/warehouseBusiness/warehouseInStock";
@@ -2733,7 +2734,6 @@ export default {
         fPlannetweight: [{ required: true, message: " ", trigger: "blur" }],
         fChargedate: [{ required: true, message: " ", trigger: "blur" }],
         fMarks: [{ required: true, message: " ", trigger: "blur" }],
-        fBillingway: [{ required: true, message: " ", trigger: "blur" }],
         fBsdate: [{ required: true, message: " ", trigger: "blur" }],
         fTrademodeid: [{ required: true, message: " ", trigger: "blur" }],
         fSbu: [{ required: true, message: " ", trigger: "blur" }],
@@ -3101,6 +3101,7 @@ export default {
         fAmount: null,
         fCurrency: "RMB",
         fExrate: "1",
+        fTaxrate: this.fTaxrate,
         fCxrate: null,
         fRate: null,
         remarks: null,
@@ -3116,6 +3117,7 @@ export default {
         fAmount: null,
         fCurrency: "RMB",
         fExrate: "1",
+        fTaxrate: this.fTaxrate,
         fCxrate: null,
         fRate: null,
         remarks: null
@@ -3476,6 +3478,7 @@ export default {
       const fId = row.fId || this.ids;
       this.dataList = [];
       getWarehousebills(fId).then((response) => {
+        console.log(response)
         if (response.data.warehousebills) {
           this.form = response.data.warehousebills;
           if(this.form.fBillstatus > 2) {
@@ -4086,6 +4089,7 @@ export default {
           }
         let formDatae = new window.FormData();
         // 附件数据
+        this.form.fBillingway = this.form.fFeetunit;
         formDatae.append("tWarehouseBills", JSON.stringify(this.form));
         console.log(this.form);
         // 库存明细
@@ -4185,14 +4189,14 @@ export default {
           if (!this.form.fId) {
             this.form.fId = this.fid;
           }
-        
-
         let formData = new window.FormData();
         // 附件数据
+        this.form.fBillingway = this.form.fFeetunit;
         formData.append("tWarehouseBills", JSON.stringify(this.form));
         console.log(this.form);
         // 库存明细
         formData.append("tWarehousebillsitems", JSON.stringify(this.dataList));
+        console.log(this.dataList)
         // 附件数据
         formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
         // 费用明细付款
@@ -4205,17 +4209,18 @@ export default {
           "tWarehousebillsfeesDr",
           JSON.stringify(this.warehouseDrList)
         );
-        addWarehousebills(formData).then((response) => {
+        addWarehouse(formData).then((response) => {
+          console.log(response)
           this.msgSuccess("提交成功");
-          this.dataList = response.data.warehousebillsitems;
-          for (let list in this.dataList) {
-            this.$set(
-              this.dataList[list],
-              "fBsdate",
-              Date.parse(this.dataList[list].fBsdate)
-            );
-          }
-          this.fid = response.data.warehouseBills.fId;
+          // this.dataList = response.data.warehousebillsitems;
+          // for (let list in this.dataList) {
+          //   this.$set(
+          //     this.dataList[list],
+          //     "fBsdate",
+          //     Date.parse(this.dataList[list].fBsdate)
+          //   );
+          // }
+          // this.fid = response.data.warehouseBills.fId;
           this.open = false;
           this.getList();
         });

+ 37 - 54
src/views/warehouseBusiness/outStock/index.vue

@@ -151,10 +151,10 @@
           ></el-option>
         </el-select>
       </el-form-item>
-      <el-form-item label="唛头" prop="fMarks">
+      <el-form-item label="品牌" prop="fMarks">
         <el-input
           v-model="queryParams.fMarks"
-          placeholder="请输入唛头"
+          placeholder="请输入品牌"
           clearable
           size="small"
           style="width: 80%"
@@ -249,7 +249,7 @@
         prop="fCorpid"
       />
       <el-table-column label="提单号" align="center" prop="fMblno" />
-      <el-table-column label="唛头" align="center" prop="fMarks" />
+      <el-table-column label="品牌" align="center" prop="fMarks" />
       <el-table-column
         label="出库日期"
         align="center"
@@ -574,12 +574,12 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="唛头" prop="fMarks">
+            <el-form-item label="品牌" prop="fMarks">
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
                 :disabled="browseStatus || formBrowseStatus"
-                placeholder="唛头"
+                placeholder="品牌"
               />
             </el-form-item>
           </el-col>
@@ -730,32 +730,33 @@
             @click.prevent="addRelevant(10)"
             >新行
           </el-button>
-          <el-button
-            :disabled="dataListSelection.length <= 0"
-            @click.prevent="creditClick"
-            >出库确认
-          </el-button>
-          <el-button
-            :disabled="dataWithdrawList.length <= 0"
-            @click.prevent="withdrawClick"
-            >撤回出库</el-button
-          >
           <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
         </el-button> -->
-          <el-button type="primary" @click="saveForm">保 存</el-button>
+          <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
         </div>
         <div style="display: flex">
           <el-button @click="detailsHidden ? (detailsHidden = false) : (detailsHidden = true)">{{ detailsHidden ? "隐藏" : "展开" }}</el-button>
           <el-button type="info" :disabled="printinglist.length <= 0" prop="打印" @click="printJobSheet">作业单</el-button>
           <el-button :disabled="printinglist.length <= 0" @click="discharge">装货</el-button>
+          <el-button
+            :disabled="dataListSelection.length <= 0 || browseStatus"
+            @click.prevent="creditClick"
+            >出库确认
+          </el-button>
+          <el-button
+            :disabled="dataWithdrawList.length <= 0 || browseStatus"
+            @click.prevent="withdrawClick"
+            >撤回出库</el-button
+          >
           <el-button type="warning" prop="打印" :disabled="printinglist.length <= 0" @click="showEditDialog_s"
             >出库单
           </el-button>
-          <el-button type="primary" @click="saveForm">保 存</el-button>
+          <!-- <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button> -->
           <el-button
             style="background-color: #008000; color: #fff"
             @click="submitForm(6)"
+            :disabled="browseStatus"
             >请核</el-button
           >
         </div>
@@ -804,7 +805,7 @@
           header-align="center"
           align="center"
           width="140px"
-          label="*唛头"
+          label="*品牌"
         >
         </el-table-column>
         <el-table-column
@@ -1226,10 +1227,12 @@
           <el-button :disabled="browseStatus" @click.prevent="addCollection()"
             >新行
           </el-button>
-          <el-button type="primary" @click="saveForm">保 存</el-button>
+          <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
           <!--暂时隐藏-->
 <!--          <el-button type="warning" @click.prevent="addStorages('Dr')">仓储费协议</el-button >-->
-          <el-button type="danger" @click.prevent="addAgreement('Dr')"
+          <el-button type="danger"
+                     :disabled="browseStatus"
+                     @click.prevent="addAgreement('Dr')"
             >作业费协议</el-button
           >
         </div>
@@ -1470,11 +1473,13 @@
           <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
           >删除
         </el-button> -->
-          <el-button type="primary" @click="saveForm">保 存</el-button>
+          <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
           <!--暂时隐藏-->
 <!--          <el-button type="warning" @click.prevent="addStorages('Cr')">仓储费协议</el-button>-->
-          <el-button type="danger" @click.prevent="addAgreement('Cr')"
-            >作业费协议</el-button
+          <el-button type="danger"
+                     :disabled="browseStatus"
+                     @click.prevent="addAgreement('Cr')"
+          >作业费协议</el-button
           >
         </div>
         <div style="font-size: 18px">付款信息</div>
@@ -1702,17 +1707,18 @@
         <!-- <el-button type="success" prop="打印" @click="showEditDialog_ss"
           >收货单
         </el-button> -->
-        <el-button type="warning" prop="打印" :disabled="printinglist.length <= 0" @click="showEditDialog_s"
+        <el-button type="warning" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="showEditDialog_s"
           >出库单
         </el-button>
-        <el-button :disabled="printinglist.length <= 0" @click="discharge">装货</el-button>
-        <el-button type="info" prop="打印" :disabled="printinglist.length <= 0" @click="printJobSheet"
+        <el-button :disabled="printinglist.length <= 0 || browseStatus" @click="discharge">装货</el-button>
+        <el-button type="info" prop="打印" :disabled="printinglist.length <= 0 || browseStatus" @click="printJobSheet"
           >作业单
         </el-button>
-        <el-button type="primary" @click="saveForm">保 存</el-button>
+        <el-button type="primary" :disabled="browseStatus" @click="saveForm">保 存</el-button>
         <el-button
           style="background-color: #008000; color: #fff"
           @click="submitForm"
+          :disabled="browseStatus"
           >请核</el-button
         >
         <el-button @click="cancel">取 消</el-button>
@@ -1775,7 +1781,7 @@
             prop="fMarks"
             header-align="center"
             align="center"
-            label="唛头"
+            label="品牌"
           >
           </el-table-column>
         </el-table>
@@ -1787,7 +1793,7 @@
           @pagination="getWhgenlegList"
         />
         <div slot="footer" class="dialog-footer">
-          <el-button type="primary" @click="whgenlegData">导入</el-button>
+          <el-button type="primary" @click="whgenlegData">导入库存总账</el-button>
           <el-button @click="whgenlegVisible = false">取 消</el-button>
         </div>
       </el-dialog>
@@ -3444,6 +3450,7 @@ export default {
               for (let li in this.dataList) {
                 if (this.dataList[li].fId === dataitem[ite].fId) {
                   this.$set(this.dataList[li], 'fBillstatus', dataitem[ite].fBillstatus)
+                  this.$set(this.dataList[li], 'fSerialNumber', dataitem[ite].fSerialNumber)
                 }
               }
             }
@@ -3617,24 +3624,6 @@ export default {
           this.$message.error('请新增库存明细!')
           return false
         }
-        // if (this.relevantAttachments.length === 0) {
-        //   this.$message.error("请新增附件上传!");
-        //   return false;
-        // }
-        if (this.warehouseDrList.length === 0) {
-          this.$message.error('请新增收款信息!')
-          return false
-        }
-        if (this.warehouseCrList.length === 0) {
-          this.$message.error('请新增付款信息!')
-          return false
-        }
-        for (let list in this.dataList) {
-          if (!this.dataList[list].fWarehouselocid) {
-            this.$message.error('请输入库区!')
-            return false
-          }
-        }
         for (let list in this.dataList) {
           if (this.dataList[list].fQty === 0) {
             this.$message.error('请输入出库件数!')
@@ -3648,17 +3637,11 @@ export default {
             this.$message.error('请输入出库毛重!')
             return false
           }
-          if (this.dataList[list].fBillstatus != 40) {
+          if (this.dataList[list].fBillstatus !== 40) {
             this.$message.error('请入账库存明细!')
             return false
           }
         }
-        // for (let list in this.relevantAttachments) {
-        //   if (this.relevantAttachments[list].fName === null) {
-        //     this.$message.error("请输入附件名称!");
-        //     return false;
-        //   }
-        // }
         for (let list in this.warehouseDrList) {
           if (!this.warehouseDrList[list].fCorpid) {
             this.$message.error('请选择客户名称')