Prechádzať zdrojové kódy

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

caojunjie 4 rokov pred
rodič
commit
3e20812faf

+ 53 - 0
src/api/reportManagement/payable.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询库存总账列表
+export function listpayable(query) {
+  return request({
+    url: '/warehouseBusiness/payable/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询库存总账详细
+export function getWhgenleg(fAccyear) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/' + fAccyear,
+    method: 'get'
+  })
+}
+
+// 新增库存总账
+export function addWhgenleg(data) {
+  return request({
+    url: '/warehouseBusiness/whgenleg',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改库存总账
+export function updateWhgenleg(data) {
+  return request({
+    url: '/warehouseBusiness/whgenleg',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除库存总账
+export function delWhgenleg(fAccyear) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/' + fAccyear,
+    method: 'delete'
+  })
+}
+
+// 导出库存总账
+export function exportWhgenleg(query) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/export',
+    method: 'get',
+    params: query
+  })
+}

+ 53 - 0
src/api/reportManagement/receivable.js

@@ -0,0 +1,53 @@
+import request from '@/utils/request'
+
+// 查询库存总账列表
+export function listWhgenleg(query) {
+  return request({
+    url: '/warehouseBusiness/receivable/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询库存总账详细
+export function getWhgenleg(fAccyear) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/' + fAccyear,
+    method: 'get'
+  })
+}
+
+// 新增库存总账
+export function addWhgenleg(data) {
+  return request({
+    url: '/warehouseBusiness/whgenleg',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改库存总账
+export function updateWhgenleg(data) {
+  return request({
+    url: '/warehouseBusiness/whgenleg',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除库存总账
+export function delWhgenleg(fAccyear) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/' + fAccyear,
+    method: 'delete'
+  })
+}
+
+// 导出库存总账
+export function exportWhgenleg(query) {
+  return request({
+    url: '/warehouseBusiness/whgenleg/export',
+    method: 'get',
+    params: query
+  })
+}

+ 27 - 0
src/api/warehouseBusiness/agreement.js

@@ -96,3 +96,30 @@ export function listAgreementitems(query) {
     params: query
   })
 }
+
+// 仓储费请核
+export function PleaseCheck(data) {
+  return request({
+    url: '/warehouseBusiness/agreementStorage/agreementStorageSubmission',
+    method: 'post',
+    data: data
+  })
+}
+
+// 撤销请核
+export function ReturnCheck(data) {
+  return request({
+    url: '/warehouseBusiness/agreementStorage/revoke',
+    method: 'post',
+    data: data
+  })
+}
+
+// 撤销审批
+export function revocation(data) {
+  return request({
+    url: '/warehouse/paths/revoke',
+    method: 'post',
+    data: data
+  })
+}

+ 67 - 26
src/views/finance/contrast/index.vue

@@ -133,7 +133,7 @@
       :data="contrastList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column width="50" align="center" type="selection" />
+      <el-table-column width="50" align="center" type="selection"/>
       <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
       <el-table-column label="行号" align="center" type="index"/>
       <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>
@@ -173,7 +173,6 @@
             icon="el-icon-view"
             @click="check(scope.row,0)"
             v-hasPermi="['finance:contrast:edit']"
-            v-if="scope.row.fBillstatus == 6"
           >查看</el-button
           >
           <el-button
@@ -492,7 +491,7 @@
             <el-date-picker
               v-model="TWareHouseFees.timeReconci"
               size="small"
-              style="width: 200px"
+              style="width: 250px"
               value-format="yyyy-MM-dd"
               type="daterange"
               start-placeholder="开始日期"
@@ -526,9 +525,9 @@
           >
             <el-table-column type="selection" width="55" align="center" />
             <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
-            <el-table-column label="行号" align="center" type="index" />
-            <el-table-column label="货权方" align="center" prop="fName" />
-            <el-table-column label="结算单位" align="center" prop="fFeesName" />
+            <el-table-column label="行号" align="center" type="index"/>
+            <el-table-column label="货权方" align="center" prop="fName" show-overflow-tooltip/>
+            <el-table-column label="结算单位" align="center" prop="fFeesName" show-overflow-tooltip/>
             <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> -->
             <el-table-column label="提单号" align="center" prop="fMblno" />
             <el-table-column label="品名" align="center" prop="fProductName" />
@@ -577,7 +576,7 @@
         </el-form>
         <div slot="footer" class="dialog-footer">
           <el-button type="primary" @click="confirmImport">确 定</el-button>
-          <el-button @click="innerVisible = false">取 消</el-button>
+          <el-button @click="signOut">取 消</el-button>
         </div>
       </el-dialog>
     </el-dialog>
@@ -723,7 +722,7 @@ export default {
         timeExamine:'',
         timeInterval:'',
         fDc:'D',
-        fReconciliation:'1',
+        fReconciliation:'0',
         timeReconci:'',
       },
       // 查询参数
@@ -767,27 +766,27 @@ export default {
       // 表单校验
       ruless:{
         fCtrlcorpid: [
-          { required: true, message: '货权方不能为空', trigger: 'blur' }
+          { required: true, message: ' ', trigger: 'blur' }
         ],
         fCorpid: [
-          { required: true, message: '结算单位不能为空', trigger: 'blur' }
+          { required: true, message: ' ', trigger: 'blur' }
         ],
         fAccbilldate: [
-          { required: true, message: '对账日期不能为空', trigger: 'blur' }
+          { required: true, message: ' ', trigger: 'blur' }
         ]
       },
       feeListRules: {
         fDc: [
-          { required:true,message: '不能为空', trigger:'blur' }
+          { required:true,message: ' ', trigger:'blur' }
         ],
         fToCorpid: [
-          { required:true,message:'不能为空', trigger:'blur'}
+          { required:true,message:' ', trigger:'blur'}
         ],
         fReconciliation: [
-          { required:true,message:'不能为空', trigger:'blur'}
+          { required:true,message:' ', trigger:'blur'}
         ],
         timeExamine: [
-          { required: true, message: '审核日期不能为空', trigger: 'blur' }
+          { required: true, message: ' ', trigger: 'blur' }
         ]
       }
     };
@@ -804,12 +803,17 @@ export default {
     this.Jump()
   },
   methods: {
+    //财务主取消
+    signOut(){
+      this.innerVisible = false
+      this.feeList = []
+    },
     // 审批跳转
     Jump(){
       this.approval = this.$route.query.data
       console.log(this.approval)
       if(this.approval){
-        this.closeButton = false
+        this.colseButton = false
         this.approval = JSON.parse(this.approval)
         this.hide = false
         this.notChange = true
@@ -837,6 +841,26 @@ export default {
         })
       }
     },
+    homepaGe(){
+      let view = {
+        fullPath: "/finance/contrast",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "Contrast",
+        params: Object,
+        path: "/finance/contrast",
+        query: Object,
+        title: "对账"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
     homePage() {
       this.open = false
       let view = {
@@ -844,11 +868,11 @@ export default {
         hash: "",
         matched: Array(2),
         meta: Object,
-        name: "contrast",
+        name: "Contrast",
         params: Object,
         path: "/finance/contrast",
         query: Object,
-        title: "收费"
+        title: "对账"
       }
       this.$router.push({ path: '/index' })
       this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
@@ -875,6 +899,8 @@ export default {
     },
     returnData(){
       this.addOrUpdateVisib = false
+      this.open = false
+      this.homepaGe()
     },
     getDataList(){
     this.addOrUpdateVisible = false
@@ -960,6 +986,19 @@ export default {
     reconciliation(){
       this.TWareHouseFees.fToCorpid = this.queryParams.fCorpid
       this.innerVisible = true
+      this.feeList = []
+      this.TWareHouseFees = {
+        fCorpid:'',
+          fToCorpid:'',
+          fMblno:'',
+          fStatementNo:'',
+          fFeeid :'',
+          timeExamine:'',
+          timeInterval:'',
+          fDc:'D',
+          fReconciliation:'0',
+          timeReconci:'',
+      }
     },
     // 默认录入人
     register() {
@@ -975,7 +1014,8 @@ export default {
     },
 
     getSummaries(param) {
-        const { columns, data } = param;
+
+      const { columns, data } = param;
       const sums = [];
       columns.forEach((column, index) => {
         const values = data.map(item => Number(item[column.property]));
@@ -988,15 +1028,16 @@ export default {
               return prev;
             }
           }, 0);
-            sums[0] = '合计';
-          } else {
-            sums[4] = '';
+          sums[0] = '合计';
+        } else {
+          sums[4] = '';
           // this.pass.fAmtdr = sums[9]
           // this.pass.fAmtcr = sums[10]
-          }
-        })
-        return sums;
-      },
+        }
+      })
+      return sums;
+      console.log(sums)
+    },
        // 金额筛选
        imgChangeI(row){
       if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)){

+ 462 - 0
src/views/reportManagement/generalLedgerCr/index.vue

@@ -0,0 +1,462 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="货权方" prop="fCorpid">
+        <el-select
+          v-model="queryParams.fCorpid"
+          filterable
+          remote
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+          :remote-method="corpsRemoteMethod"
+          placeholder="请选择货权方"
+        >
+          <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="提单号" prop="fMblno">
+        <el-input
+          v-model="queryParams.fMblno"
+          placeholder="请输入提单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="审核日期" prop="timeExamine">
+        <el-date-picker
+          v-model="queryParams.timeExamine"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          clearable
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @keyup.enter.native="handleQuery">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item label="结算单位" prop="fToCorpid">
+        <el-select
+          v-model="queryParams.fToCorpid"
+          placeholder="请选择结算单位"
+          filterable
+          remote
+          clearable
+          style="width: 200px"
+          @keyup.enter.native="handleQuery"
+          :remote-method="corpsRemoteMethod"
+        >
+          <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="货物名称" prop="fProductName">
+        <el-select
+          v-model="queryParams.fProductName"
+          filterable
+          remote
+          clearable
+          size="small"
+          :remote-method="goodsRemoteMethod"
+          @keyup.enter.native="handleQuery"
+          placeholder="请选择货物名称"
+        >
+          <el-option
+            v-for="(dict, index) in goodsOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="品牌" prop="fMarks">
+        <el-input
+          v-model="queryParams.fMarks"
+          placeholder="请输入品牌"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+      <el-form-item label="结算状态" prop="fReconciliation">
+        <el-select
+          v-model="queryParams.fReconciliation"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        >
+          <el-option label="未收" value="0"/>
+          <el-option label="全部" value="1"/>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="费用状态" prop="fBillstatus">
+        <el-select
+          v-model="queryParams.fBillstatus"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        >
+          <el-option label="录入" value="0"/>
+          <el-option label="审核通过" value="1"/>
+
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['warehouseBusiness:whgenleg:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="payableList">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column label="货权方" align="center" prop="fName" show-overflow-tooltip/>
+      <el-table-column label="结算单位" align="center" prop="fFeesName" show-overflow-tooltip/>
+      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="货物名称" align="center" prop="fProductName" show-overflow-tooltip/>
+      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="审核日期" align="center" prop="fReviewDate" width="120">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.fReviewDate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="应付金额" align="center" prop="fAmount" />
+      <el-table-column label="实付金额" align="center" prop="fStlamount" />
+
+
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改库存总账对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="原始入库业务编号" prop="fOriginalbillno">
+          <el-input v-model="form.fOriginalbillno" placeholder="请输入原始入库业务编号" />
+        </el-form-item>
+        <el-form-item label="上期件数" prop="fPreqty">
+          <el-input v-model="form.fPreqty" placeholder="请输入上期件数" />
+        </el-form-item>
+        <el-form-item label="上期毛重,单位为吨,保留6位小数" prop="fPregrossweight">
+          <el-input v-model="form.fPregrossweight" placeholder="请输入上期毛重,单位为吨,保留6位小数" />
+        </el-form-item>
+        <el-form-item label="上期净重," prop="fPrenetweight">
+          <el-input v-model="form.fPrenetweight" placeholder="请输入上期净重," />
+        </el-form-item>
+        <el-form-item label="入库件数" prop="fQtyd">
+          <el-input v-model="form.fQtyd" placeholder="请输入入库件数" />
+        </el-form-item>
+        <el-form-item label="入库尺码" prop="fVolumnd">
+          <el-input v-model="form.fVolumnd" placeholder="请输入入库尺码" />
+        </el-form-item>
+        <el-form-item label="入库毛重" prop="fGrossweightd">
+          <el-input v-model="form.fGrossweightd" placeholder="请输入入库毛重" />
+        </el-form-item>
+        <el-form-item label="入库净重" prop="fNetweightd">
+          <el-input v-model="form.fNetweightd" placeholder="请输入入库净重" />
+        </el-form-item>
+        <el-form-item label="出口尺码" prop="fVolumnc">
+          <el-input v-model="form.fVolumnc" placeholder="请输入出口尺码" />
+        </el-form-item>
+        <el-form-item label="出库件数" prop="fQtyc">
+          <el-input v-model="form.fQtyc" placeholder="请输入出库件数" />
+        </el-form-item>
+        <el-form-item label="结余件数" prop="fQtyblc">
+          <el-input v-model="form.fQtyblc" placeholder="请输入结余件数" />
+        </el-form-item>
+        <el-form-item label="出库毛重,单位为吨" prop="fGrossweightc">
+          <el-input v-model="form.fGrossweightc" placeholder="请输入出库毛重,单位为吨" />
+        </el-form-item>
+        <el-form-item label="出库净重" prop="fNetweightc">
+          <el-input v-model="form.fNetweightc" placeholder="请输入出库净重" />
+        </el-form-item>
+        <el-form-item label="结余毛重" prop="fGrossweightblc">
+          <el-input v-model="form.fGrossweightblc" placeholder="请输入结余毛重" />
+        </el-form-item>
+        <el-form-item label="结余净重" prop="fNetweightblc">
+          <el-input v-model="form.fNetweightblc" placeholder="请输入结余净重" />
+        </el-form-item>
+        <el-form-item label="箱号" prop="fCntrno">
+          <el-input v-model="form.fCntrno" placeholder="请输入箱号" />
+        </el-form-item>
+        <el-form-item label="状态,默认 T ,正常T 停用F 下拉选择">
+          <el-radio-group v-model="form.fStatus">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="删除状态" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
+        </el-form-item>
+        <el-form-item label="唛头" prop="fMarks">
+          <el-input v-model="form.fMarks" placeholder="请输入唛头" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listpayable, addWhgenleg, updateWhgenleg, exportWhgenleg } from "@/api/reportManagement/payable";
+import {listWarehouse} from "@/api/basicdata/warehouse";
+import {listArea} from "@/api/basicdata/area";
+import {listGoods} from "@/api/basicdata/goods";
+import {listCorps} from "@/api/basicdata/corps";
+
+export default {
+  name: "",
+  components: {
+  },
+  data() {
+    return {
+      payableList:[],
+      // 货权方(客户数据)
+      fMblnoOptions: [],
+      // 贸易方式(数据字典),对应t_trademodels 字典
+      fTrademodeidOptions: [],
+      // 货物
+      goodsOptions: [],
+      // 仓库(仓库数据)
+      warehouseOptions: [],
+      kqhouseOptions: [],
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 库存总账表格数据
+      receivableList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fCorpid: null,
+        fMblno: null,
+        timeExamine: null,
+        fToCorpid: null,
+        fProductName: null,
+        fMarks: null,
+        fReconciliation: null,
+        fBillstatus: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        fMarks: [
+          { required: true, message: "唛头不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("data_trademodes").then((response) => {
+      this.fTrademodeidOptions = response.data;
+    });
+  },
+  methods: {
+    // 贸易方式(数据字典),对���t_trademodels 字典翻译
+    fTrademodeidFormat(row, column) {
+      return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
+    },
+    /* 远程模糊查询仓库 */
+    warehouseRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listWarehouse(queryParams).then((response) => {
+        this.warehouseOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询库区 */
+    kqhouseRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      if (!this.queryParams.fWarehouseid) {
+        this.$message.error("请输入仓库!");
+        return false;
+      }
+
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        fWarehouseid: this.queryParams.fWarehouseid,
+        fName: name,
+      };
+      listArea(queryParams).then((response) => {
+        this.kqhouseOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询商品 */
+    goodsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listGoods(queryParams).then((response) => {
+        this.goodsOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询用户 */
+    corpsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listCorps(queryParams).then((response) => {
+        this.fMblnoOptions = response.rows;
+        this.KHblnoOptions = response.rows;
+      });
+    },
+    /** 查询库存总账列表 */
+    getList() {
+      this.loading = true;
+      this.getDicts('approval_process').then((response) => {
+        this.options = response.data
+      })
+      listpayable(this.queryParams).then(response => {
+        this.payableList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        fAccyear: null,
+        fId: null,
+        fAccmonth: null,
+        fCorpid: null,
+        fMblno: null,
+        fOriginalbillno: null,
+        fWarehouseLocationid: null,
+        fGoodsid: null,
+        fTrademodeid: null,
+        fPreqty: null,
+        fPregrossweight: null,
+        fPrenetweight: null,
+        fQtyd: null,
+        fVolumnd: null,
+        fGrossweightd: null,
+        fNetweightd: null,
+        fVolumnc: null,
+        fQtyc: null,
+        fQtyblc: null,
+        fGrossweightc: null,
+        fNetweightc: null,
+        fGrossweightblc: null,
+        fNetweightblc: null,
+        fCntrno: null,
+        fStatus: "0",
+        delFlag: null,
+        createBy: null,
+        fMarks: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加库存总账";
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.fAccyear != null) {
+            updateWhgenleg(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addWhgenleg(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有库存总账数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportWhgenleg(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 461 - 0
src/views/reportManagement/generalLedgerDr/index.vue

@@ -0,0 +1,461 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="货权方" prop="fCorpid">
+        <el-select
+          v-model="queryParams.fCorpid"
+          filterable
+          remote
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+          :remote-method="corpsRemoteMethod"
+          placeholder="请选择货权方"
+        >
+          <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="提单号" prop="fMblno">
+        <el-input
+          v-model="queryParams.fMblno"
+          placeholder="请输入提单号"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="审核日期" prop="timeExamine">
+        <el-date-picker
+          v-model="queryParams.timeExamine"
+          type="daterange"
+          value-format="yyyy-MM-dd"
+          clearable
+          range-separator="至"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          @keyup.enter.native="handleQuery">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item label="结算单位" prop="fToCorpid">
+        <el-select
+          v-model="queryParams.fToCorpid"
+          placeholder="请选择结算单位"
+          filterable
+          remote
+          clearable
+          style="width: 200px"
+          @keyup.enter.native="handleQuery"
+          :remote-method="corpsRemoteMethod"
+        >
+          <el-option
+            v-for="(dict, index) in fMblnoOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="货物名称" prop="fProductName">
+        <el-select
+          v-model="queryParams.fProductName"
+          filterable
+          remote
+          clearable
+          size="small"
+          :remote-method="goodsRemoteMethod"
+          @keyup.enter.native="handleQuery"
+          placeholder="请选择货物名称"
+        >
+          <el-option
+            v-for="(dict, index) in goodsOptions"
+            :key="index.fId"
+            :label="dict.fName"
+            :value="dict.fId"
+          ></el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="品牌" prop="fMarks">
+        <el-input
+          v-model="queryParams.fMarks"
+          placeholder="请输入品牌"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+      <el-form-item label="结算状态" prop="fReconciliation">
+        <el-select
+          v-model="queryParams.fReconciliation"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        >
+          <el-option label="未收" value="0"/>
+          <el-option label="全部" value="1"/>
+        </el-select>
+      </el-form-item>
+
+      <el-form-item label="费用状态" prop="fBillstatus">
+        <el-select
+          v-model="queryParams.fBillstatus"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        >
+          <el-option label="录入" value="0"/>
+          <el-option label="审核通过" value="1"/>
+
+        </el-select>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['warehouseBusiness:whgenleg:export']"
+        >导出</el-button>
+      </el-col>
+	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="receivableList">
+      <!-- <el-table-column type="selection" width="55" align="center" /> -->
+      <el-table-column type="index" label="行号" align="center" />
+      <el-table-column label="货权方" align="center" prop="fName" show-overflow-tooltip/>
+      <el-table-column label="结算单位" align="center" prop="fFeesName" show-overflow-tooltip/>
+      <el-table-column label="提单号" align="center" prop="fMblno" show-overflow-tooltip/>
+      <el-table-column label="货物名称" align="center" prop="fProductName" show-overflow-tooltip/>
+      <el-table-column label="品牌" align="center" prop="fMarks" />
+      <el-table-column label="审核日期" align="center" prop="fReviewDate" width="120">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.fReviewDate, "{y}-{m}-{d}") }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="应收金额" align="center" prop="fAmount" />
+      <el-table-column label="实收金额" align="center" prop="fStlamount" />
+
+
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改库存总账对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="原始入库业务编号" prop="fOriginalbillno">
+          <el-input v-model="form.fOriginalbillno" placeholder="请输入原始入库业务编号" />
+        </el-form-item>
+        <el-form-item label="上期件数" prop="fPreqty">
+          <el-input v-model="form.fPreqty" placeholder="请输入上期件数" />
+        </el-form-item>
+        <el-form-item label="上期毛重,单位为吨,保留6位小数" prop="fPregrossweight">
+          <el-input v-model="form.fPregrossweight" placeholder="请输入上期毛重,单位为吨,保留6位小数" />
+        </el-form-item>
+        <el-form-item label="上期净重," prop="fPrenetweight">
+          <el-input v-model="form.fPrenetweight" placeholder="请输入上期净重," />
+        </el-form-item>
+        <el-form-item label="入库件数" prop="fQtyd">
+          <el-input v-model="form.fQtyd" placeholder="请输入入库件数" />
+        </el-form-item>
+        <el-form-item label="入库尺码" prop="fVolumnd">
+          <el-input v-model="form.fVolumnd" placeholder="请输入入库尺码" />
+        </el-form-item>
+        <el-form-item label="入库毛重" prop="fGrossweightd">
+          <el-input v-model="form.fGrossweightd" placeholder="请输入入库毛重" />
+        </el-form-item>
+        <el-form-item label="入库净重" prop="fNetweightd">
+          <el-input v-model="form.fNetweightd" placeholder="请输入入库净重" />
+        </el-form-item>
+        <el-form-item label="出口尺码" prop="fVolumnc">
+          <el-input v-model="form.fVolumnc" placeholder="请输入出口尺码" />
+        </el-form-item>
+        <el-form-item label="出库件数" prop="fQtyc">
+          <el-input v-model="form.fQtyc" placeholder="请输入出库件数" />
+        </el-form-item>
+        <el-form-item label="结余件数" prop="fQtyblc">
+          <el-input v-model="form.fQtyblc" placeholder="请输入结余件数" />
+        </el-form-item>
+        <el-form-item label="出库毛重,单位为吨" prop="fGrossweightc">
+          <el-input v-model="form.fGrossweightc" placeholder="请输入出库毛重,单位为吨" />
+        </el-form-item>
+        <el-form-item label="出库净重" prop="fNetweightc">
+          <el-input v-model="form.fNetweightc" placeholder="请输入出库净重" />
+        </el-form-item>
+        <el-form-item label="结余毛重" prop="fGrossweightblc">
+          <el-input v-model="form.fGrossweightblc" placeholder="请输入结余毛重" />
+        </el-form-item>
+        <el-form-item label="结余净重" prop="fNetweightblc">
+          <el-input v-model="form.fNetweightblc" placeholder="请输入结余净重" />
+        </el-form-item>
+        <el-form-item label="箱号" prop="fCntrno">
+          <el-input v-model="form.fCntrno" placeholder="请输入箱号" />
+        </el-form-item>
+        <el-form-item label="状态,默认 T ,正常T 停用F 下拉选择">
+          <el-radio-group v-model="form.fStatus">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="删除状态" prop="delFlag">
+          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
+        </el-form-item>
+        <el-form-item label="唛头" prop="fMarks">
+          <el-input v-model="form.fMarks" placeholder="请输入唛头" />
+        </el-form-item>
+        <el-form-item label="备注" prop="remark">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listWhgenleg, getWhgenleg, delWhgenleg, addWhgenleg, updateWhgenleg, exportWhgenleg } from "@/api/reportManagement/receivable";
+import {listWarehouse} from "@/api/basicdata/warehouse";
+import {listArea} from "@/api/basicdata/area";
+import {listGoods} from "@/api/basicdata/goods";
+import {listCorps} from "@/api/basicdata/corps";
+
+export default {
+  name: "Whgenleg",
+  components: {
+  },
+  data() {
+    return {
+      // 货权方(客户数据)
+      fMblnoOptions: [],
+      // 贸易方式(数据字典),对应t_trademodels 字典
+      fTrademodeidOptions: [],
+      // 货物
+      goodsOptions: [],
+      // 仓库(仓库数据)
+      warehouseOptions: [],
+      kqhouseOptions: [],
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 库存总账表格数据
+      receivableList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        fCorpid: null,
+        fMblno: null,
+        timeExamine: null,
+        fToCorpid: null,
+        fProductName: null,
+        fMarks: null,
+        fReconciliation: null,
+        fBillstatus: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        fMarks: [
+          { required: true, message: "唛头不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+    this.getDicts("data_trademodes").then((response) => {
+      this.fTrademodeidOptions = response.data;
+    });
+  },
+  methods: {
+    // 贸易方式(数据字典),对���t_trademodels 字典翻译
+    fTrademodeidFormat(row, column) {
+      return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
+    },
+    /* 远程模糊查询仓库 */
+    warehouseRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listWarehouse(queryParams).then((response) => {
+        this.warehouseOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询库区 */
+    kqhouseRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      if (!this.queryParams.fWarehouseid) {
+        this.$message.error("请输入仓库!");
+        return false;
+      }
+
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10,
+        fWarehouseid: this.queryParams.fWarehouseid,
+        fName: name,
+      };
+      listArea(queryParams).then((response) => {
+        this.kqhouseOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询商品 */
+    goodsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listGoods(queryParams).then((response) => {
+        this.goodsOptions = response.rows;
+      });
+    },
+    /* 远程模糊查询用户 */
+    corpsRemoteMethod(name) {
+      if (name == null || name === "") {
+        return false;
+      }
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      listCorps(queryParams).then((response) => {
+        this.fMblnoOptions = response.rows;
+        this.KHblnoOptions = response.rows;
+      });
+    },
+    /** 查询库存总账列表 */
+    getList() {
+      this.loading = true;
+      this.getDicts('approval_process').then((response) => {
+        this.options = response.data
+      })
+      listWhgenleg(this.queryParams).then(response => {
+        this.receivableList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        fAccyear: null,
+        fId: null,
+        fAccmonth: null,
+        fCorpid: null,
+        fMblno: null,
+        fOriginalbillno: null,
+        fWarehouseLocationid: null,
+        fGoodsid: null,
+        fTrademodeid: null,
+        fPreqty: null,
+        fPregrossweight: null,
+        fPrenetweight: null,
+        fQtyd: null,
+        fVolumnd: null,
+        fGrossweightd: null,
+        fNetweightd: null,
+        fVolumnc: null,
+        fQtyc: null,
+        fQtyblc: null,
+        fGrossweightc: null,
+        fNetweightc: null,
+        fGrossweightblc: null,
+        fNetweightblc: null,
+        fCntrno: null,
+        fStatus: "0",
+        delFlag: null,
+        createBy: null,
+        fMarks: null,
+        createTime: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加库存总账";
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.fAccyear != null) {
+            updateWhgenleg(this.form).then(response => {
+              this.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addWhgenleg(this.form).then(response => {
+              this.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$confirm('是否确认导出所有库存总账数据项?', "警告", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(function() {
+          return exportWhgenleg(queryParams);
+        }).then(response => {
+          this.download(response.msg);
+        })
+    }
+  }
+};
+</script>

+ 3 - 0
src/views/system/auditConfiguration/index.vue

@@ -40,6 +40,7 @@
           <span v-if="scope.row.actId === 120">出库</span>
           <span v-if="scope.row.actId === 130">货转</span>
           <span v-if="scope.row.actId === 140">调拨</span>
+          <span v-if="scope.row.actId === 150">计算仓储费</span>
           <span v-if="scope.row.actId === 210">对账</span>
           <span v-if="scope.row.actId === 220">收费</span>
           <span v-if="scope.row.actId === 230">付费</span>
@@ -116,6 +117,8 @@ export default {
       },{
         name: '调拨', actId: 140
       },{
+        name: '计算仓储费', actId: 150
+      },{
         name: '对账', actId: 210
       },{
         name: '收费', actId: 220

+ 2 - 2
src/views/system/toConfigure/auditPaths-add-or-update.vue

@@ -71,7 +71,7 @@
         align="center"
         label="审核人">
         <template slot-scope="scope">
-          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'"
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'"
                      filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
             <el-option
               v-for="item in optionsUsers"
@@ -80,7 +80,7 @@
               :value="item.userId">
             </el-option>
           </el-select>
-          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'F'"
+          <el-select v-model="scope.row.auditUserId" v-if="scope.row.iffixAuditUser === 'T'"
                      filterable multiple collapse-tags placeholder="审核人" style="width: 100%">
             <el-option
               v-for="item in optionsUsers_s"

+ 403 - 107
src/views/warehouseBusiness/agreement/index.vue

@@ -29,25 +29,25 @@
           ></el-option>
         </el-select>
       </el-form-item>
-<!--      <el-form-item label="货物品名" prop="fGoodsid">-->
-<!--        <el-select-->
-<!--          v-model="queryParams.fGoodsid"-->
-<!--          filterable-->
-<!--          remote-->
-<!--          clearable-->
-<!--          style="width: 200px"-->
-<!--          :remote-method="goodsRemoteMethod"-->
-<!--          @keyup.enter.native="handleQuery"-->
-<!--          placeholder="请输入货物品名"-->
-<!--        >-->
-<!--          <el-option-->
-<!--            v-for="(dict, index) in goodsOptions"-->
-<!--            :key="index.fId"-->
-<!--            :label="dict.fName"-->
-<!--            :value="dict.fId"-->
-<!--          ></el-option>-->
-<!--        </el-select>-->
-<!--      </el-form-item>-->
+      <!--      <el-form-item label="货物品名" prop="fGoodsid">-->
+      <!--        <el-select-->
+      <!--          v-model="queryParams.fGoodsid"-->
+      <!--          filterable-->
+      <!--          remote-->
+      <!--          clearable-->
+      <!--          style="width: 200px"-->
+      <!--          :remote-method="goodsRemoteMethod"-->
+      <!--          @keyup.enter.native="handleQuery"-->
+      <!--          placeholder="请输入货物品名"-->
+      <!--        >-->
+      <!--          <el-option-->
+      <!--            v-for="(dict, index) in goodsOptions"-->
+      <!--            :key="index.fId"-->
+      <!--            :label="dict.fName"-->
+      <!--            :value="dict.fId"-->
+      <!--          ></el-option>-->
+      <!--        </el-select>-->
+      <!--      </el-form-item>-->
       <el-form-item label="制单部门" prop="fDeptid">
         <el-input
           v-model="queryParams.fDeptid"
@@ -109,6 +109,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['warehouseBusiness:agreement:edit']"
+          v-if="form.fBillstatus === '2' || form.fBillstatus === '3'"
         >修改
         </el-button>
       </el-col>
@@ -140,7 +141,7 @@
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="合同编号" align="center" prop="fContractno"/>
       <el-table-column label="客户名称" align="center" prop="fCorpid"/>
-<!--      <el-table-column label="货物品名" align="center" prop="fGoodsid"/>-->
+      <!--      <el-table-column label="货物品名" align="center" prop="fGoodsid"/>-->
       <el-table-column label="有效期起" align="center" prop="fBegindate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.fBegindate, '{y}-{m}-{d}') }}</span>
@@ -152,21 +153,50 @@
         </template>
       </el-table-column>
       <!--      <el-table-column label="状态" align="center" prop="fId" />-->
-      <el-table-column label="状态" align="center" prop="fBillstatus">
+      <el-table-column label="是否启用" align="center" prop="fStatus">
         <template slot-scope="scope">
           <el-switch
-            v-model="scope.row.fBillstatus"
+            v-model="scope.row.fStatus"
             active-value="0"
             inactive-value="1"
             @change="handleStatusChange(scope.row)"
           ></el-switch>
         </template>
       </el-table-column>
+      <el-table-column label="状态" align="center" prop="fBillstatus">
+        <template slot-scope="scope">
+          <span v-if="scope.row.fBillstatus == '1'">保存</span>
+          <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
+          <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
+          <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
+          <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
+          <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
+        </template>
+      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
+            icon="el-icon-view"
+            @click="check(scope.row,0)"
+            v-if="scope.row.fBillstatus == 6"
+            v-hasPermi="['warehouseBusiness:agreement:edit']"
+          >查看
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-view"
+            @click="check(scope.row,1)"
+            v-hasPermi="['finance:contrast:edit']"
+            v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
+          >审批进度
+          </el-button>
+
+          <el-button
+            size="mini"
+            type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['warehouseBusiness:agreement:edit']"
@@ -201,12 +231,15 @@
     />
 
     <!-- 添加或修改仓储费对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body :before-close="handleClose" :close-on-click-modal="false">
+    <el-dialog :title="title" :visible.sync="open" width="65%" append-to-body :before-close="handleClose"
+               :close-on-click-modal="false" :show-close="false"
+    >
       <el-form ref="form" :model="form" :rules="rules" label-width="80px"
                style="display: flex;flex-wrap: wrap;"
       >
         <el-form-item label="客户名称" prop="fCorpid">
           <el-select
+            :disabled="notChange"
             v-model="form.fCorpid"
             filterable
             remote
@@ -232,6 +265,7 @@
           <el-date-picker clearable size="small" style="width: 200px"
                           v-model="form.fBegindate"
                           type="date"
+                          :disabled="notChange"
                           value-format="yyyy-MM-dd"
                           placeholder="选择有效期起"
           >
@@ -240,6 +274,7 @@
         <el-form-item label="有效期至" prop="fEnddate">
           <el-date-picker clearable size="small" style="width: 200px"
                           v-model="form.fEnddate"
+                          :disabled="notChange"
                           type="date"
                           value-format="yyyy-MM-dd"
                           placeholder="选择有效期至"
@@ -247,11 +282,11 @@
           </el-date-picker>
         </el-form-item>
         <el-form-item label="合同编号" prop="fContractno">
-          <el-input v-model="form.fContractno" placeholder="请输入合同编号" style="width: 200px"/>
+          <el-input v-model="form.fContractno" :disabled="notChange" placeholder="请输入合同编号" style="width: 200px"/>
         </el-form-item>
 
         <el-form-item label="商品类别" prop="tPackages">
-          <el-select v-model="form.tPackages" placeholder="请选择商品类别">
+          <el-select v-model="form.tPackages" :disabled="notChange" placeholder="请选择商品类别">
             <el-option
               v-for="dict in fTypeidOptions"
               :key="dict.dictValue"
@@ -262,13 +297,15 @@
           </el-select>
         </el-form-item>
       </el-form>
-      <el-button type="primary">请 核</el-button>
+      <el-button type="primary" @click="submit" :disabled="notChange" v-if="form.fBillstatus < 4">请 核</el-button>
+      <el-button type="success" @click="BackSubmit" v-if="form.fBillstatus === '6'">撤销请核</el-button>
+
       <div class="dialogTableTitle flex a-center jlr">
         <h2>标题</h2>
-        <el-button @click="getList_s()">新增</el-button>
+        <el-button @click="getList_s()" :disabled="notChange">新增</el-button>
       </div>
       <el-table v-loading="loading_s" :data="agreementitemsList" @selection-change="handleSelectionChange">
-<!--        <el-table-column type="selection" width="55" align="center"/>-->
+        <!--        <el-table-column type="selection" width="55" align="center"/>-->
         <el-table-column label="行号" align="center" type="index"/>
 
         <el-table-column
@@ -303,6 +340,7 @@
               placeholder="请输入开始天数"
               clearable
               size="small"
+              :disabled="notChange"
             />
           </template>
         </el-table-column>
@@ -313,6 +351,7 @@
               placeholder="请输入结束天数"
               clearable
               size="small"
+              :disabled="notChange"
             />
           </template>
         </el-table-column>
@@ -323,6 +362,7 @@
             placeholder="请输入单价"
             clearable
             size="small"
+            :disabled="notChange"
           />
         </el-table-column>
         <el-table-column label="录入人" align="center">
@@ -385,8 +425,14 @@
         </el-table-column>
       </el-table>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</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 v-if="approve === true" @click="goApproval">审批</el-button>
+        <el-button type="danger" :disabled="disappear" @click="approvalRevocation" v-if="form.fBillstatus === '4'">撤销审批</el-button>
+        <el-button type="info" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
+        <el-button type="primary" @click="submitForm" :disabled="notChange">确 定</el-button>
+        <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
+        <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
       </div>
     </el-dialog>
   </div>
@@ -395,6 +441,9 @@
 <script>
 import moment from 'moment'
 import {
+  revocation,
+  ReturnCheck,
+  PleaseCheck,
   listAgreements,
   getAgreement,
   delAgreement,
@@ -403,7 +452,7 @@ import {
   updateAgreement_s,
   exportAgreement,
   listAgreementitems,
-  queryUserVal,
+  queryUserVal
 } from '@/api/warehouseBusiness/agreement'
 import { listCorps } from '@/api/basicdata/corps'
 import { listGoods } from '@/api/basicdata/goods'
@@ -411,32 +460,46 @@ import { delWarehousebills } from '@/api/warehouseBusiness/warehouseInStock'
 import { listGoodsTransfer } from '@/api/warehouseBusiness/goodsTransfer'
 import { listFees } from '@/api/basicdata/fees'
 import { changeUserStatus } from '@/api/system/user'
+import AddOrUpdate from '@/views/viewApproval'
+import ApprovalComments from '@/views/startApproval'
+import Global from '@/layout/components/global'
 // import { listUser, queryUserVal } from '@/api/system/user'
 
 export default {
   name: 'Agreement',
-  components: {},
+  components: {
+    AddOrUpdate,
+    ApprovalComments
+  },
   data() {
     return {
+      cancelButton:true,
+      // 审批状态
+      approve:false,
+      addOrUpdateVisible: false,
+      addOrUpdateVisib:false,
+      disappear: false,
+      notChange: false,
       dataList: '',
-      value_s:[],
+      value_s: [],
       // 遮罩层
       loading: true,
       loading_s: false,
       browseStatus: false,
       // 计价单位
       jFeetunitOptions: [
-        { dictLabel: "件数", dictValue: "1" },
-        { dictLabel: "毛重", dictValue: "2" },
-        { dictLabel: "净重", dictValue: "3" },
-        { dictLabel: "尺码", dictValue: "4" },
-        { dictLabel: "固定", dictValue: "5" },
+        { dictLabel: '件数', dictValue: '1' },
+        { dictLabel: '毛重', dictValue: '2' },
+        { dictLabel: '净重', dictValue: '3' },
+        { dictLabel: '尺码', dictValue: '4' },
+        { dictLabel: '固定', dictValue: '5' }
       ],
-      goodsOptions:[],
+      agreementId: 310,
+      goodsOptions: [],
       fTypeidOptions: [],
       // 选中数组
       ids: [],
-      deptName:'',
+      deptName: '',
       // 客户(客户数据)
       fMblnoOptions: [],
       fFeeunitidOptions: [],
@@ -453,7 +516,7 @@ export default {
       agreementList: [],
       // 弹出层标题
       title: '',
-      add:'',
+      add: '',
       // 是否显示弹出层
       open: false,
       // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典
@@ -464,6 +527,8 @@ export default {
       fTrademodeidOptions: [],
       // 仓储费明细表表格数据
       agreementitemsList: [],
+      // 操作人
+      Operator: '',
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -480,7 +545,8 @@ export default {
         fFreedays: null,
         fBegindate: null,
         fEnddate: null,
-        fBillstatus: null
+        fBillstatus: null,
+        fStatus: null
       },
       // 表单参数
       form: {},
@@ -510,30 +576,258 @@ export default {
     this.getDicts('data_trademodes').then(response => {
       this.fTrademodeidOptions = response.data
     })
-    this.getDicts("data_goods_category").then(response => {
-      this.fTypeidOptions = response.data;
-    });
+    this.getDicts('data_goods_category').then(response => {
+      this.fTypeidOptions = response.data
+    })
     // this.getDicts("data_unitfees").then(response => {
     //   this.jFeetunitOptions = response.data;
     // });
   },
+  activated(){
+    this.Jump()
+  },
   methods: {
+    homepaGe(){
+      let view = {
+        fullPath: "/agreement/agreementStorage",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "AgreementStorage",
+        params: Object,
+        path: "/agreement/agreementStorage",
+        query: Object,
+        title: "仓储费协议"
+      }
+      this.$router.push({ path: '/index'})
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
+    homePage() {
+      this.open = false
+      let view = {
+        fullPath: "/agreement/agreementStorage",
+        hash: "",
+        matched: Array(2),
+        meta: Object,
+        name: "AgreementStorage",
+        params: Object,
+        path: "/agreement/agreementStorage",
+        query: Object,
+        title: "仓储费协议"
+      }
+      this.$router.push({ path: '/index' })
+      this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
+        console.log(visitedViews)
+        if (this.isActive(view)) {
+          this.toLastView(visitedViews, view)
+        }
+      })
+      Global.$emit("removeCache", "closeSelectedTag", view);
+    },
+    Jump(){
+      this.approval = this.$route.query.data
+      if(this.approval) {
+
+        this.approval = JSON.parse(this.approval)
+        this.hide = false
+        this.open = true
+        this.notChange = true
+        this.approve = true
+        this.disappear = true
+        this.cancelButton = false
+        this.reset()
+        getAgreement(this.approval.billId).then(response => {
+          console.log(response)
+          this.deptName = response.data.dept.deptName
+          this.form = response.data.tWarehouseAgreement
+          this.fMblnoOptions = response.data.corps
+          this.agreementitemsList = response.data.tWarehouseAgreementitems
+          for (let item in this.agreementitemsList) {
+            this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+            // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+          }
+          // console.log(response.data.feesList)
+          this.fWbuOptions = response.data.feesList
+          // this.add = row
+          console.log(JSON.stringify(this.agreementitemsList))
+          this.open = true
+          this.browseStatus = true
+        })
+      }
+    },
+    goApproval(){
+      this.addOrUpdateVisib = true
+      console.log(this.approval)
+      this.$nextTick(() => {
+        this.$refs.ApprovalComments.init(this.form.fId,this.agreementId)
+      })
+    },
+    returnData(){
+      this.addOrUpdateVisib = false
+      this.open = false
+      this.homepaGe()
+
+    },
+    getDataList(){
+      this.addOrUpdateVisible = false
+    },
+    // 查看审批流
+    addOrUpdateHandle() {
+      this.addOrUpdateVisible = true
+      this.addOrUpdateVisib = false
+      let id = '448'
+      let actId = '110'
+      console.log(this.form.fId)
+      this.$nextTick(() => {
+        this.$refs.addOrUpdate.init(this.form.fId, this.agreementId)
+      })
+    },
+    register() {
+      queryUserVal().then((response) => {
+        this.Lander = response.user.userName
+      })
+    },
+    // 查看按钮
+    check(row, res) {
+      this.notChange = true
+      this.browseStatus = true
+      getAgreement(row.fId).then(response => {
+        console.log(response)
+        this.Operator = response.data.corps.createBy
+        console.log(response.data.corps.createBy)
+        console.log(response)
+        this.deptName = response.data.dept.deptName
+        this.form = response.data.tWarehouseAgreement
+        this.fMblnoOptions = response.data.corps
+        this.agreementitemsList = response.data.tWarehouseAgreementitems
+        for (let item in this.agreementitemsList) {
+          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        }
+        // console.log(response.data.feesList)
+        this.fWbuOptions = response.data.feesList
+        this.add = row
+        console.log(JSON.stringify(this.agreementitemsList))
+        this.open = true
+        this.disappear = true
+        this.title = '修改仓储费'
+        if (res == 1) {
+          this.notChange = true
+          if (this.Operator == this.Lander) {
+            this.disappear = false
+            this.reset()
+            const fId = row.fId || this.ids
+            // getAgreement(row.fId).then(response => {
+            //   console.log(response)
+            //   this.deptName = response.data.dept.deptName
+            //   this.form = response.data.tWarehouseAgreement
+            //   this.fMblnoOptions = response.data.corps
+            //   this.agreementitemsList = response.data.tWarehouseAgreementitems
+            //   for (let item in this.agreementitemsList) {
+            //     this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+            //     // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+            //   }
+            //   // console.log(response.data.feesList)
+            //   this.fWbuOptions = response.data.feesList
+            //   this.add = row
+            //   console.log(JSON.stringify(this.agreementitemsList))
+            //   this.open = true
+            // })
+          }else {
+            this.notChange = true
+          }
+        }else{
+          this.notChange = true
+          this.reset()
+        }
+      })
+      const fId = row.fId || this.ids
+      getAgreement(row.fId).then(response => {
+        console.log(response)
+        this.deptName = response.data.dept.deptName
+        this.form = response.data.tWarehouseAgreement
+        this.fMblnoOptions = response.data.corps
+        this.agreementitemsList = response.data.tWarehouseAgreementitems
+        for (let item in this.agreementitemsList) {
+          this.$set(this.agreementitemsList[item], 'fFeeunitid', this.agreementitemsList[item].fFeeunitid + '')
+          // this.fWRemoteMethod(this.agreementitemsList[item].fFeeid)
+        }
+        // console.log(response.data.feesList)
+        this.fWbuOptions = response.data.feesList
+        this.add = row
+        console.log(JSON.stringify(this.agreementitemsList))
+        this.open = true
+      })
+    },
+    //撤销审批
+    approvalRevocation() {
+      let data = {
+        id: this.form.fId,
+        actId: this.agreementId,
+        billId: this.form.fId
+      }
+      console.log(this.queryParams)
+      revocation(data).then(data => {
+        console.log(data)
+        if (data.code === 200) {
+          this.$message.success('撤销成功')
+          this.open = false
+          this.getList()
+        }
+      })
+    },
+    // 撤销请核
+    BackSubmit() {
+      console.log(this.form)
+      this.form.fBillstatus = '1'
+      let formDate = new window.FormData()
+      formDate.append('agreement', JSON.stringify(this.form))
+      formDate.append('agreementitems', JSON.stringify(this.agreementitemsList))
+      console.log(formDate)
+      ReturnCheck(formDate).then(response => {
+        this.open = false
+        this.msgSuccess('操作成功')
+        this.getList()
+      })
+    },
+    // 请核按钮
+    submit() {
+      if (this.agreementitemsList.length !== 0) {
+        this.form.fBillstatus = '4'
+        let formData = new window.FormData()
+        // 附件数据
+        formData.append('agreement', JSON.stringify(this.form))
+        formData.append('agreementitems', JSON.stringify(this.agreementitemsList))
+        PleaseCheck(formData).then(response => {
+          this.msgSuccess('请核成功')
+          this.open = false
+          this.getList()
+        })
+      } else {
+        this.$message.error('仓储费协议明细为空,无法操作')
+      }
+    },
     // 仓储费状态修改
     handleStatusChange(row) {
-      let text = row.fBillstatus === "0" ? "启用" : "停用";
-      this.$confirm('确认要"' + text + '""' + row.fCorpid + '"用户吗?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+      let text = row.fBillstatus === '0' ? '启用' : '停用'
+      this.$confirm('确认要"' + text + '""' + row.fCorpid + '"用户吗?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       }).then(function() {
-        return updateAgreement_s(row.fId, row.fBillstatus);
+        return updateAgreement_s(row.fId, row.fBillstatus)
       }).then(() => {
-        this.msgSuccess(text + "成功");
+        this.msgSuccess(text + '成功')
       }).catch(function() {
-        row.fBillstatus = row.fBillstatus === "0" ? "1" : "0";
-      });
+        row.fBillstatus = row.fBillstatus === '0' ? '1' : '0'
+      })
     },
-    test_s(){
+    test_s() {
       console.log(this.agreementitemsList)
     },
     /** 创建仓储费明细表列表 */
@@ -542,21 +836,21 @@ export default {
       queryUserVal().then((response) => {
         this.agreementitemsList.push({
           //行号
-          fLineno:'',
+          fLineno: '',
           //计价单位
-          fFeeunitid:'',
+          fFeeunitid: '',
           //费用名称
-          fFeeid:'',
+          fFeeid: '',
           //开始天数
-          fFromdays:'',
+          fFromdays: '',
           //结束天数
-          fEndays:'',
+          fEndays: '',
           //单价
           fPrice: '',
           //录入人
-          createBy:response.user.userName,
+          createBy: response.user.userName,
           //创建时间
-          createTime:moment(Date.parse(new Date())).format("YYYY-MM-DD HH:mm:ss")
+          createTime: moment(Date.parse(new Date())).format('YYYY-MM-DD HH:mm:ss')
         })
         // this.$set("deptName", response.dept.deptName);
         this.deptName = response.dept.deptName
@@ -566,8 +860,7 @@ export default {
         // this.$set(this.agreementitemsList, "createBy", response.user.userName);
         //格式化时间戳
         // this.$set(this.agreementitemsList, "createTime", moment(Date.parse(new Date())).format("YYYY-MM-DD HH:mm:ss"));
-      });
-
+      })
 
       listAgreementitems(this.queryParams).then(response => {
         console.log(response)
@@ -575,17 +868,17 @@ export default {
     },
     /* 远程模糊查询商品 */
     goodsRemoteMethod(name) {
-      if (name == null || name === "") {
-        return false;
+      if (name == null || name === '') {
+        return false
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name }
       listGoods(queryParams).then((response) => {
-        this.goodsOptions = response.rows;
-      });
+        this.goodsOptions = response.rows
+      })
     },
     // 计价单位
     fFeeunitidFormat(row, column) {
-      return this.selectDictLabel(this.fFeeunitidOptions, row.fFeeunitid);
+      return this.selectDictLabel(this.fFeeunitidOptions, row.fFeeunitid)
     },
     /** 查询仓储费列表 */
     getList() {
@@ -600,14 +893,14 @@ export default {
 // 远程模糊查询费用名称
     fWRemoteMethod(name) {
       this.fWbuOptions = []
-      if (name == null || name === "") {
-        return false;
+      if (name == null || name === '') {
+        return false
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name };
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name }
       listFees(queryParams).then((response) => {
         console.log(this.fWbuOptions)
         this.fWbuOptions = response.rows
-      });
+      })
     },
     // 结算方式,也可以从表t_stltypes中下拉选择,存储id,显示name字典翻译
     fStltypeidFormat(row, column) {
@@ -627,7 +920,7 @@ export default {
       this.agreementitemsList = []
       this.reset()
     },
-    handleClose(){
+    handleClose() {
       this.open = false
       this.agreementitemsList = []
       this.reset()
@@ -665,22 +958,22 @@ export default {
     },
     // 变更计价单位
     changeFeeUnit(row) {
-      console.log(this.fCntqty);
-      console.log(row);
+      console.log(this.fCntqty)
+      console.log(row)
       if (!row.fFeeUnitid) {
-        return false;
+        return false
       }
-      if (row.fFeeUnitid === "0") {
-        this.$set(row, "fQty", this.fCntqty);
-      } else if (row.fFeeUnitid === "1") {
-        this.$set(row, "fQty", this.fGrossweight);
+      if (row.fFeeUnitid === '0') {
+        this.$set(row, 'fQty', this.fCntqty)
+      } else if (row.fFeeUnitid === '1') {
+        this.$set(row, 'fQty', this.fGrossweight)
       }
       if (row.fUnitprice) {
         this.$set(
           row,
-          "fAmount",
+          'fAmount',
           parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
-        );
+        )
       }
     },
     /** 重置按钮操作 */
@@ -698,6 +991,7 @@ export default {
     handleAdd() {
       this.reset()
       this.open = true
+      this.notChange = false
       this.title = '添加仓储费'
       queryUserVal().then((response) => {
         // this.$set("deptName", response.dept.deptName);
@@ -708,11 +1002,13 @@ export default {
         // this.$set(this.agreementitemsList, "createBy", response.user.userName);
         //格式化时间戳
         // this.$set(this.agreementitemsList, "createTime", moment(Date.parse(new Date())).format("YYYY-MM-DD HH:mm:ss"));
-      });
+      })
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset()
+      this.notChange = false
+      this.browseStatus = false
       const fId = row.fId || this.ids
       getAgreement(fId).then(response => {
         console.log(response)
@@ -734,14 +1030,14 @@ export default {
     },
     /** 远程模糊查询用户 */
     corpsRemoteMethod(name) {
-      if (name == null || name === "") {
-        return false;
+      if (name == null || name === '') {
+        return false
       }
-      let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
+      let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 }
       listCorps(queryParams).then((response) => {
-        this.fMblnoOptions = response.rows;
-        this.KHblnoOptions = response.rows;
-      });
+        this.fMblnoOptions = response.rows
+        this.KHblnoOptions = response.rows
+      })
     },
     /** 提交按钮 */
     submitForm() {
@@ -750,10 +1046,10 @@ export default {
         if (valid) {
           if (this.form.fId != null) {
             updateAgreement(this.form).then(response => {
-              let formData = new window.FormData();
+              let formData = new window.FormData()
               // 附件数据
-              formData.append("agreement",JSON.stringify(this.form))
-              formData.append("agreementitems", JSON.stringify(this.agreementitemsList));
+              formData.append('agreement', JSON.stringify(this.form))
+              formData.append('agreementitems', JSON.stringify(this.agreementitemsList))
               addAgreement(formData).then(response => {
                 this.msgSuccess('修改成功')
                 this.open = false
@@ -762,10 +1058,10 @@ export default {
               })
             })
           } else {
-            let formData = new window.FormData();
+            let formData = new window.FormData()
             // 附件数据
-            formData.append("agreement",JSON.stringify(this.form))
-            formData.append("agreementitems", JSON.stringify(this.agreementitemsList));
+            formData.append('agreement', JSON.stringify(this.form))
+            formData.append('agreementitems', JSON.stringify(this.agreementitemsList))
             addAgreement(formData).then(response => {
               this.msgSuccess('新增成功')
               this.open = false
@@ -778,16 +1074,16 @@ export default {
     },
     /** 删除按钮操作 */
     handleDelete(row) {
-      const fIds = row.fId || this.ids;
-      this.$confirm('是否确认删除仓储费编号为"' + fIds + '"的数据项?', "警告", {
-        confirmButtonText: "确定",
-        cancelButtonText: "取消",
-        type: "warning"
+      const fIds = row.fId || this.ids
+      this.$confirm('是否确认删除仓储费编号为"' + fIds + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
       }).then(function() {
-        return delAgreement(fIds);
+        return delAgreement(fIds)
       }).then(() => {
-        this.getList();
-        this.msgSuccess("删除成功");
+        this.getList()
+        this.msgSuccess('删除成功')
       })
     },
     /** 导出按钮操作 */
@@ -804,8 +1100,8 @@ export default {
       })
     },
     deleteRow(index, rows) {
-      rows.splice(index, 1);
-    },
+      rows.splice(index, 1)
+    }
   }
 }
 </script>

+ 11 - 10
src/views/warehouseBusiness/goodsTransfer/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
           style="width: 80%"
           size="small"
@@ -231,11 +231,10 @@
         align="center"
         prop="fTocorpid"
       />
-      <el-table-column label="提单号" align="center" prop="fMblno"/>
-      <!-- <el-table-column :show-overflow-tooltip="true" label="经营单位" align="center" prop="fSbu" /> -->
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column
         :show-overflow-tooltip="true"
-        label="唛头"
+        label="品牌"
         align="center"
         prop="fMarks"
       />
@@ -521,12 +520,12 @@
         </el-row>
         <el-row>
           <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
-                placeholder="唛头"
+                placeholder="品牌"
               />
             </el-form-item>
           </el-col>
@@ -599,7 +598,7 @@
           header-align="center"
           align="center"
           width="140px"
-          label="唛头"
+          label="品牌"
         >
         </el-table-column>
         <el-table-column
@@ -1789,7 +1788,7 @@
         }, 300);
         this.whgenlegVisible = false
       },
-      // 更新主表唛头、品名并去重
+      // 更新主表品牌、品名并去重
       updateDeduplication: function() {
         if (this.dataList.length === 0) {
           return false
@@ -1798,7 +1797,7 @@
         let fProductName = []
         for (let li in this.dataList) {
           fMarks.push(this.dataList[li].fMarks)
-          fProductName.push(this.dataList[li].fProductName)
+          fProductName.push(this.dataList[li].fGoodsids)
         }
         this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
         this.$set(this.form, 'fProductName', Array.from(new Set(fProductName)).join(","))
@@ -2213,6 +2212,7 @@
         this.dataListSelection = row
       },
       saveForm() {
+        this.updateDeduplication()
         this.$refs['form'].validate((valid) => {
           if (this.form.fCorpid === this.form.fTocorpid) {
             this.$message.error('新货权方不得与货权方一致')
@@ -2222,6 +2222,7 @@
             this.$message.error('请添加库存明细!')
             return false
           }
+          this.updateDeduplication()
           for (let list in this.dataList) {
             if (!this.dataList[list].fQty || Number(this.dataList[list].fQty) === 0) {
               this.$message.error('请维护序号为' + (Number(list) + 1) + '的货转件数!')

+ 35 - 11
src/views/warehouseBusiness/inStock/index.vue

@@ -250,6 +250,7 @@
         prop="fCorpid"
       />
       <el-table-column label="提单号" align="center" prop="fMblno" />
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column label="品牌" align="ceter" prop="fMarks" />
       <el-table-column
         label="入库日期"
@@ -531,16 +532,18 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="品牌" prop="fMarks">
+            <el-form-item label="品牌">
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
+                disabled
                 placeholder="品牌"
               />
             </el-form-item>
           </el-col>
-          <el-col :span="15">
+        </el-row>
+        <el-row>
+          <el-col :span="16">
             <el-form-item label="备注" prop="remark">
               <el-input
                 style="width: 100%"
@@ -551,6 +554,16 @@
               />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="品名" prop="fProductName">
+              <el-input
+                v-model="form.fProductName"
+                style="width: 80%"
+                disabled
+                placeholder="品名"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
 
         <div v-if="detailsHidden">
@@ -2817,7 +2830,7 @@ export default {
 
   methods: {
     //关闭弹框的事件
-    addCloseDialog(){    
+    addCloseDialog(){
       this.getList()
     },
     // 上传成功返回数据
@@ -3168,7 +3181,6 @@ export default {
     getList() {
       this.loading = true;
       listWarehousebills(this.queryParams).then((response) => {
-        console.log(response)
         this.warehousebillsList = response.rows;
         this.total = response.total;
         this.loading = false;
@@ -3750,11 +3762,8 @@ export default {
     changefGoodsid(row) {
       for (let corp in this.goodsOptions) {
         if (row.fGoodsid === this.goodsOptions[corp].fId) {
-          this.$set(
-            row,
-            "fPackagespecs",
-            this.goodsOptions[corp].fPackagespecs
-          );
+          this.$set(row, "fGoodsids", this.goodsOptions[corp].fName);
+          this.$set(row, "fPackagespecs", this.goodsOptions[corp].fPackagespecs);
         }
       }
     },
@@ -3780,7 +3789,6 @@ export default {
         );
       }
     },
-
     changefBsdate(row) {
       if (this.dataList.length > 0) {
         for (var i = 0; i < this.dataList.length; i++) {
@@ -4077,12 +4085,27 @@ export default {
     },
     /** 提交按钮 */
     submitForm(status) {
+      this.updateDeduplication()
       if (status === 2) {
         this.preservation();
       } else {
         this.pleaseCheck();
       }
     },
+    // 更新主表唛头、品名并去重
+    updateDeduplication: function() {
+      if (this.dataList.length === 0) {
+        return false
+      }
+      let fMarks = []
+      let fGoodsid = []
+      for (let li in this.dataList) {
+        fMarks.push(this.dataList[li].fMarks)
+        fGoodsid.push(this.dataList[li].fGoodsids)
+      }
+      this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
+      this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
+    },
     // 提交保存保存成功
     preservation() {
       this.$refs["form"].validate((valid) => {
@@ -4148,6 +4171,7 @@ export default {
     },
     // 请核成功
     pleaseCheck() {
+      this.updateDeduplication()
       this.$refs["form"].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error("请新增库存明细!");

+ 75 - 43
src/views/warehouseBusiness/outStock/index.vue

@@ -237,6 +237,7 @@
         prop="fCorpid"
       />
       <el-table-column label="提单号" align="center" prop="fMblno" />
+      <el-table-column label="品名" :show-overflow-tooltip="true" align="ceter" prop="fProductName" />
       <el-table-column label="品牌" align="center" prop="fMarks" />
       <el-table-column
         label="出库日期"
@@ -555,11 +556,21 @@
               <el-input
                 v-model="form.fMarks"
                 style="width: 80%"
-                :disabled="browseStatus || formBrowseStatus"
+                disabled
                 placeholder="品牌"
               />
             </el-form-item>
           </el-col>
+          <el-col :span="8">
+            <el-form-item label="品名" prop="fProductName">
+              <el-input
+                v-model="form.fProductName"
+                style="width: 80%"
+                disabled
+                placeholder="品名"
+              />
+            </el-form-item>
+          </el-col>
         </el-row>
         <el-row>
           <el-form-item label="备注" prop="remark">
@@ -2197,6 +2208,7 @@ import {
   updateWarehousebills,
   exportWarehousebills,
 } from "@/api/warehouseBusiness/warehouseOutStock";
+
 import { listAgreement, operationAgreement } from "@/api/agreement/agreement";
 
 import { listAgreements } from "@/api/warehouseBusiness/agreement";
@@ -2470,7 +2482,7 @@ export default {
   },
   methods: {
     //关闭弹框的事件
-    addCloseDialog(){    
+    addCloseDialog(){
       this.getList()
     },
     // 上传成功返回数据
@@ -3517,8 +3529,23 @@ export default {
       this.fCntrtype = selection[0].fCntrtype
       this.fGoodsids = selection[0].fGoodsids
     },
+    // 更新主表品名并去重
+    updateDeduplication: function() {
+      if (this.dataList.length === 0) {
+        return false
+      }
+      let fMarks = []
+      let fGoodsid = []
+      for (let li in this.dataList) {
+        fMarks.push(this.dataList[li].fMarks)
+        fGoodsid.push(this.dataList[li].fGoodsids)
+      }
+      this.$set(this.form, 'fMarks', Array.from(new Set(fMarks)).join(","))
+      this.$set(this.form, 'fProductName', Array.from(new Set(fGoodsid)).join(","))
+    },
     // 保存
     saveForm () {
+      this.updateDeduplication()
       this.$refs['form'].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error('请添加库存明细!')
@@ -3539,30 +3566,33 @@ export default {
           }
         }
         if (valid) {
-          this.form.fBillstatus = 2
-          let formData = new window.FormData()
-          formData.append("warehouseBills", JSON.stringify(this.form));
-          formData.append("warehousebillsitems", JSON.stringify(this.dataList));
-          formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
-          formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
-          formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
-          addWarehousebills(formData).then((response) => {
-            this.msgSuccess('保存成功')
-            this.form = response.data.warehouseBills
-            this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
-            this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
-            this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
-            this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
-            this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
-            this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
-            this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
-            this.dataList = response.data.warehousebillsitems
-          })
+          setTimeout(() => {
+            this.form.fBillstatus = 2
+            let formData = new window.FormData()
+            formData.append("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+            addWarehousebills(formData).then((response) => {
+              this.msgSuccess('保存成功')
+              this.form = response.data.warehouseBills
+              this.$set(this.form, 'fEta', Date.parse(this.form.fEta))
+              this.$set(this.form, 'fTrademodeid', this.form.fTrademodeid + '')
+              this.$set(this.form, 'fStltypeid', this.form.fStltypeid + '')
+              this.$set(this.form, 'fFeetunit', Number(this.form.fFeetunit))
+              this.$set(this.form, 'fBsdate', Date.parse(this.form.fBsdate))
+              this.$set(this.form, 'createTime', Date.parse(this.form.createTime))
+              this.$set(this.form, 'fChargedate', Date.parse(this.form.fChargedate))
+              this.dataList = response.data.warehousebillsitems
+            })
+          }, 200);
         }
       })
     },
     /** 提交按钮 */
     submitForm() {
+      this.updateDeduplication()
       this.$refs['form'].validate((valid) => {
         if (this.dataList.length === 0) {
           this.$message.error('请新增库存明细!')
@@ -3599,29 +3629,31 @@ export default {
           }
         }
         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
-          }
+          setTimeout(() => {
+            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("warehouseBills", JSON.stringify(this.form));
+            formData.append("warehousebillsitems", JSON.stringify(this.dataList));
+            formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
+            formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
+            formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
+            warehouseSubmission(formData).then((response) => {
+              this.msgSuccess('提交成功')
+              this.cancel()
+              this.getList()
+            })
+          }, 200);
         }
-        let formData = new window.FormData()
-        formData.append("warehouseBills", JSON.stringify(this.form));
-        formData.append("warehousebillsitems", JSON.stringify(this.dataList));
-        formData.append("tEnclosure", JSON.stringify(this.relevantAttachments));
-        formData.append("warehousebillsfeesCr", JSON.stringify(this.warehouseCrList));
-        formData.append("warehousebillsfeesDr", JSON.stringify(this.warehouseDrList));
-        warehouseSubmission(formData).then((response) => {
-          this.msgSuccess('提交成功')
-          this.cancel()
-          this.getList()
-        })
       })
     },
     /** 删除按钮操作 */

+ 9 - 32
src/views/warehouseBusiness/storageFeeCalculation/index.vue

@@ -403,20 +403,9 @@
             label="业务来源"
           >
             <template slot-scope="scope">
-              <el-select
-                v-model="scope.row.fBilltype"
-                filterable
-                disabled
-                remote
-                placeholder="业务来源"
-              >
-                <el-option
-                  v-for="(dict, index) in billtypeOptions"
-                  :key="index.fId"
-                  :label="dict.fName"
-                  :value="dict.fId"
-                ></el-option>
-              </el-select>
+              <span v-if="scope.row.fBilltype === 'SJRK'">入库</span>
+              <span v-if="scope.row.fBilltype === 'SJCK'">出库</span>
+              <span v-if="scope.row.fBilltype === 'KCZZ'">库存总账</span>
             </template>
           </el-table-column>
           <el-table-column
@@ -874,17 +863,6 @@
         open: false,
         // 货品名
         goodsOptions: [],
-        // 业务来源
-        billtypeOptions: [{
-          fId: 'SJRK',
-          fName: '入库'
-        }, {
-          fId: 'SJCK',
-          fName: '出库'
-        }, {
-          fId: 'KCZZ',
-          fName: '库存总账'
-        }],
         // 货权方(客户数据)
         fMblnoOptions: [],
         // 操作员
@@ -1187,6 +1165,7 @@
               this.$set(this.dataList[li], 'fBillingDeadline', Date.parse(this.dataList[li].fBillingDeadline))
               this.$set(this.dataList[li], 'fStorageFeeDeadline', Date.parse(this.dataList[li].fStorageFeeDeadline))
             }
+            console.log(this.dataList)
           }
           if (response.data.warehouseFeesList) {
             this.warehouseDrList = response.data.warehouseFeesList
@@ -1263,12 +1242,7 @@
             return;
           }
           const values = data.map((item) => Number(item[column.property]));
-          if (
-            column.property === "fUnitprice" ||
-            column.property === "fAmount" ||
-            column.property === "fQty" ||
-            column.property === "fQty"
-          ) {
+          if (column.property === "fAmount") {
             sums[index] = values.reduce((prev, curr) => {
               const value = Number(curr);
               if (!isNaN(value)) {
@@ -1277,6 +1251,9 @@
                 return prev;
               }
             }, 0); // sums[index]
+            sums[index] = sums[index].toFixed(2)
+          } else {
+            sums[index] = '-'
           }
         });
         return sums;
@@ -1371,7 +1348,7 @@
               this.$message({message: '请维护仓储费计算截止日期', type: 'warning'})
               return false
             }
-            if (!this.form.fBillstatus) {
+            if (this.form.fBillstatus !== 6) {
               this.form.fBillstatus = status
             }
             let formData = new window.FormData();