Browse Source

费用申请 成本中心

Qukatie 10 months ago
parent
commit
45a9bedf32

+ 1 - 1
src/api/iosBasicData/containers.js

@@ -144,4 +144,4 @@ export const verifyData = (params) => {
     method: 'get',
     params: params
   })
-}
+}

+ 19 - 0
src/api/iosBasicData/costcenter/coc.js

@@ -110,4 +110,23 @@ export const feeRemove = (data) => {
         method: 'post',
         params: data
     })
+}
+//所属公司下拉
+export const topList = (data) => {
+    return request({
+        url: '/api/blade-system/dept/top-list',
+        method: 'get',
+        params: data
+    })
+}
+export const getBcorpsList = (current, size, params) => {
+    return request({
+        url: '/api/blade-los/bcorps/selectList',
+        method: 'get',
+        params: {
+            ...params,
+            current,
+            size,
+        }
+    })
 }

+ 20 - 1
src/api/iosBasicData/costcenter/soc.js

@@ -110,4 +110,23 @@ export const feeRemove = (data) => {
         method: 'post',
         params: data
     })
-}
+}
+//所属公司下拉
+export const topList = (data) => {
+    return request({
+      url: '/api/blade-system/dept/top-list',
+      method: 'get',
+      params: data
+    })
+  }
+  export const getBcorpsList = (current, size, params) => {
+    return request({
+      url: '/api/blade-los/bcorps/selectList',
+      method: 'get',
+      params: {
+        ...params,
+        current,
+        size,
+      }
+    })
+  }

+ 85 - 3
src/views/boxManagement/agentBox/detailsPage.vue

@@ -233,6 +233,8 @@
                   @click="allClick('费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('费用批量删除')">批量删除</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -389,7 +391,8 @@ import {
   enable,
   submitBoxList,
   boxRemove,
-  copyAgent
+  copyAgent,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1086,6 +1089,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -1357,7 +1394,7 @@ export default {
     },
     // 上传成功
     onSuccess(res, done, loading, column) {
-      if (res.length>0) {
+      if (res.length > 0) {
         this.$message.success("上传成功!");
       }
       this.excelBox = false;
@@ -2022,7 +2059,9 @@ export default {
       }
       if (name == '费用一键编辑') {
         for (let row of this.form.feeCenterList) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == '费用批量删除') {
@@ -2030,6 +2069,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2066,6 +2111,43 @@ export default {
           }
         })
       }
+      if (name == '费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/boxManagement/agentBox/index',
+            pageStatus: '',
+            pageLabel: '代理箱',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 99 - 13
src/views/boxManagement/boxAdjustment/detailsPage.vue

@@ -40,8 +40,8 @@
                 <dic-select v-model="form.purchaseCompanyName" placeholder="船公司/车队" label="shortName"
                   url="/blade-los/bcorps/listAll?status=0&corpTypeName=船公司,车队" :filterable="true" :remote="true"
                   dataName="cnName" @selectChange="dicChange('purchaseCompanyName', $event)"
-                  :disabled="editDisabled || form.buxStaus == '已确认' || form.tradingBoxItemsList.length" :slotRight="true"
-                  rightLabel="code"></dic-select>
+                  :disabled="editDisabled || form.buxStaus == '已确认' || form.tradingBoxItemsList.length"
+                  :slotRight="true" rightLabel="code"></dic-select>
               </tempalte>
               <template slot="boxTypeQuantityOne">
                 <dic-select v-model="form.boxTypeQuantityOne" key="id" label="cnName" res="records"
@@ -94,6 +94,8 @@
                 <el-button type="danger" plain size="small"
                   :disabled="editDisabled || boxSelectionList.length == 0 || form.buxStaus == '已确认'"
                   @click="allClick('box批量删除')">批量删除</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('费用申请')">费用申请</el-button>
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled || !form.id" circle
@@ -198,7 +200,9 @@
                 <el-button type="danger" plain size="small"
                   :disabled="editDisabled || selectionfeecList.length == 0 || form.buxStaus == '已确认'"
                   @click="allClick('费用批量删除')">批量删除</el-button>
-                <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
+                  <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('费用申请')">费用申请</el-button>
+                  <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus"
@@ -209,20 +213,21 @@
                 <span>{{ index + 1 }}</span>
               </template>
               <template slot="billTypeForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.billType"
-                  key="id" label="cnName" res="records"
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.billType" key="id" label="cnName" res="records"
                   url="/blade-los/bcorpstypedefine/list?status=0&current=1&size=20" :filterable="true" :remote="true"
                   dataName="cnName" @selectChange="rowDicChange('billType', $event, row, index)"></dic-select>
                 <span v-else>{{ row.billType }}</span>
               </template>
               <template slot="cntrNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.cntrNo"
-                  key="id" label="code" :mockData="form.tradingBoxItemsList" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.cntrNo" key="id" label="code" :mockData="form.tradingBoxItemsList"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.cntrNo }}</span>
               </template>
               <template slot="corpCnNameForm" slot-scope="{ row,index }">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" :key="updateSearchKey"
-                  v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records"
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  :key="updateSearchKey" v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records"
                   :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.billType"
                   :filterable="true" :remote="true" dataName="shortName"
                   @selectChange="rowDicChange('corpCnName', $event, row)" :slotRight="true"
@@ -255,8 +260,9 @@
                 <span v-else>{{ row.exrate }}</span>
               </template>
               <template slot="unitNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.unitNo"
-                  label="cnName" url="/blade-los/bunits/listAll?status=0" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.unitNo" label="cnName" url="/blade-los/bunits/listAll?status=0"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.unitNo }}</span>
               </template>
               <template slot="priceForm" slot-scope="{ row }">
@@ -327,7 +333,8 @@ import {
   boxRemove,
   copyAgent,
   confirm,
-  revoke
+  revoke,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -960,6 +967,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -1717,7 +1758,9 @@ export default {
       }
       if (name == '费用一键编辑') {
         for (let row of this.form.feeCenterList) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == '费用批量删除') {
@@ -1725,6 +1768,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -1761,6 +1810,43 @@ export default {
           }
         })
       }
+      if (name == '费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/boxManagement/boxAdjustment/index',
+            pageStatus: '',
+            pageLabel: '箱管调箱',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 191 - 24
src/views/boxManagement/boxCost/detailsPage.vue

@@ -177,6 +177,8 @@
                   @click="allClick('D费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
                   @click="allClick('D费用批量删除')">批量删除</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
+                  @click="allClick('D费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -188,21 +190,22 @@
                 <span>{{ index + 1 }}</span>
               </template>
               <template slot="billTypeForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.billType"
-                  key="id" label="cnName" res="records" url="/blade-los/bcorpstypedefine/list?current=1&size=20"
-                  :filterable="true" :remote="true" dataName="cnName"
-                  @selectChange="rowDicChange('billType', $event, row)"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.billType" key="id" label="cnName" res="records"
+                  url="/blade-los/bcorpstypedefine/list?current=1&size=20" :filterable="true" :remote="true"
+                  dataName="cnName" @selectChange="rowDicChange('billType', $event, row)"></dic-select>
                 <span v-else>{{ row.billType }}</span>
               </template>
               <template slot="cntrNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.cntrNo"
-                  key="id" label="code" :mockData="form.tradingBoxItemsList" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.cntrNo" key="id" label="code" :mockData="form.tradingBoxItemsList"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.cntrNo }}</span>
               </template>
               <template slot="corpCnNameForm" slot-scope="{ row,index }">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" :key="updateSearchKey"
-                  v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records" :slotRight="true"
-                  rightLabel="code"
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  :key="updateSearchKey" v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records"
+                  :slotRight="true" rightLabel="code"
                   :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.billType"
                   :filterable="true" :remote="true" dataName="shortName"
                   @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
@@ -229,8 +232,9 @@
                 <span v-else>{{ row.exrate }}</span>
               </template>
               <template slot="unitNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.unitNo"
-                  label="cnName" url="/blade-los/bunits/listAll?status=0" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.unitNo" label="cnName" url="/blade-los/bunits/listAll?status=0"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.unitNo }}</span>
               </template>
               <template slot="priceForm" slot-scope="{ row }">
@@ -266,6 +270,8 @@
                   @click="allClick('C费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('C费用批量删除')">批量删除</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('C费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -277,21 +283,22 @@
                 <span>{{ index + 1 }}</span>
               </template>
               <template slot="billTypeForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.billType"
-                  key="id" label="cnName" res="records"
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.billType" key="id" label="cnName" res="records"
                   url="/blade-los/bcorpstypedefine/list?status=0&current=1&size=20" :filterable="true" :remote="true"
                   dataName="cnName" @selectChange="rowDicChange('billType', $event, row, index)"></dic-select>
                 <span v-else>{{ row.billType }}</span>
               </template>
               <template slot="cntrNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.cntrNo"
-                  key="id" label="code" :mockData="form.tradingBoxItemsList" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.cntrNo" key="id" label="code" :mockData="form.tradingBoxItemsList"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.cntrNo }}</span>
               </template>
               <template slot="corpCnNameForm" slot-scope="{ row,index }">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" :key="updateSearchKey"
-                  v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records" :slotRight="true"
-                  rightLabel="code"
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  :key="updateSearchKey" v-model="row.corpCnName" placeholder="付费对象" label="shortName" res="records"
+                  :slotRight="true" rightLabel="code"
                   :url="'/blade-los/bcorps/selectList?status=0&current=1&size=5&corpTypeName=' + row.billType"
                   :filterable="true" :remote="true" dataName="shortName"
                   @selectChange="rowDicChange('corpCnName', $event, row)"></dic-select>
@@ -318,8 +325,9 @@
                 <span v-else>{{ row.exrate }}</span>
               </template>
               <template slot="unitNoForm" slot-scope="{row,index}">
-                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')" v-model="row.unitNo"
-                  label="cnName" url="/blade-los/bunits/listAll?status=0" :filterable="true"></dic-select>
+                <dic-select v-if="row.$cellEdit && !(row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ')"
+                  v-model="row.unitNo" label="cnName" url="/blade-los/bunits/listAll?status=0"
+                  :filterable="true"></dic-select>
                 <span v-else>{{ row.unitNo }}</span>
               </template>
               <template slot="priceForm" slot-scope="{ row }">
@@ -474,6 +482,7 @@ import {
   copyAgent,
   confirm,
   revoke,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1102,9 +1111,43 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
-            width: "100",
+            width: 100,
             overHidden: true,
             cell: true,
             slot: true,
@@ -1339,9 +1382,43 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
-            width: "100",
+            width: 100,
             overHidden: true,
             cell: true,
             slot: true,
@@ -2200,7 +2277,9 @@ export default {
       }
       if (name == 'D费用一键编辑') {
         for (let row of this.feeCenterListD) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'D费用批量删除') {
@@ -2208,6 +2287,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2269,7 +2354,9 @@ export default {
       }
       if (name == 'C费用一键编辑') {
         for (let row of this.feeCenterListC) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'C费用批量删除') {
@@ -2277,6 +2364,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2313,6 +2406,80 @@ export default {
           }
         })
       }
+      if (name == 'D费用申请') {
+        for (let row of this.selectionfeedList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeedList,
+            url: '/boxManagement/boxCost/index',
+            pageStatus: '',
+            pageLabel: '箱管费用',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
+      if (name == 'C费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/boxManagement/boxCost/index',
+            pageStatus: '',
+            pageLabel: '箱管费用',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 86 - 4
src/views/boxManagement/boxExit/detailsPage.vue

@@ -212,7 +212,9 @@
                 <el-button type="danger" plain size="small"
                   :disabled="editDisabled || selectionfeecList.length == 0 || form.buxStaus == '已确认'"
                   @click="allClick('费用批量删除')">批量删除</el-button>
-                <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
+                  <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('费用申请')">费用申请</el-button>
+                  <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus"
@@ -258,7 +260,7 @@
               </template>
               <template slot="curCodeForm" slot-scope="{ row }">
                 <dic-select v-if="row.$cellEdit" v-model="row.curCode" placeholder="币别" label="code"
-                  :url="'/blade-los/bcurrency/getExrate?date=' + form.purchaseDate + '&dc=C'" :filterable="true"
+                  :url="'/blade-los/bcurrency/getExrate?date=' + form.createTime + '&dc=C'" :filterable="true"
                   @selectChange="rowDicChange('curCode', $event, row)"></dic-select>
                 <span v-else>{{ row.curCode }}</span>
               </template>
@@ -341,7 +343,8 @@ import {
   boxRemove,
   copyAgent,
   confirm,
-  revoke
+  revoke,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1015,6 +1018,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -1767,7 +1804,9 @@ export default {
       }
       if (name == '费用一键编辑') {
         for (let row of this.form.feeCenterList) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == '费用批量删除') {
@@ -1775,6 +1814,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -1811,6 +1856,43 @@ export default {
           }
         })
       }
+      if (name == '费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/boxManagement/boxExit/index',
+            pageStatus: '',
+            pageLabel: '出场申请',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 56 - 6
src/views/boxManagement/buyContainer/detailsPage.vue

@@ -168,7 +168,7 @@
                   @click="allClick('费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('费用批量删除')">批量删除</el-button>
-                <el-button type="primary" plain size="small" :disabled="editDisabled||selectionfeecList.length == 0"
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
@@ -923,9 +923,43 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
-            width: "100",
+            width: 100,
             overHidden: true,
             cell: true,
             slot: true,
@@ -1688,7 +1722,9 @@ export default {
       }
       if (name == '费用一键编辑') {
         for (let row of this.form.feeCenterList) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == '费用批量删除') {
@@ -1696,6 +1732,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -1733,6 +1775,14 @@ export default {
         })
       }
       if (name == '费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
         this.$confirm("确定申请费用?", {
           confirmButtonText: "确定",
           cancelButtonText: "取消",
@@ -1741,8 +1791,8 @@ export default {
           let obj = {}
           obj = {
             srcId: this.form.id,
-            srcType:this.form.type,
-            feeCenterList:this.selectionfeecList,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
             url: '/boxManagement/buyContainer/index',
             pageStatus: '',
             pageLabel: '买箱',
@@ -1755,7 +1805,7 @@ export default {
           });
           pleaseVerifyCost(obj).then(res => {
             this.$message.success("操作成功");
-            this.getDetail(res.data.data.id)
+            this.getDetail(this.form.id)
           }).finally(() => {
             loading.close();
           })

+ 85 - 4
src/views/boxManagement/rentalBox/detailsPage.vue

@@ -211,7 +211,8 @@
                   @click="allClick('费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('费用批量删除')">批量删除</el-button>
-                  
+                  <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -371,7 +372,8 @@ import {
   revokeRentingOut,
   rentCalculation,
   revokeRentCalculation,
-  copyAgent
+  copyAgent,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer/index.js";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1107,9 +1109,43 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
-            width: "100",
+            width: 100,
             overHidden: true,
             cell: true,
             slot: true,
@@ -2269,7 +2305,9 @@ export default {
       }
       if (name == '费用一键编辑') {
         for (let row of this.form.feeCenterList) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == '费用批量删除') {
@@ -2277,6 +2315,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2313,6 +2357,43 @@ export default {
           }
         })
       }
+      if (name == '费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/boxManagement/rentalBox/index',
+            pageStatus: '',
+            pageLabel: '租箱',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 55 - 37
src/views/iosBasicData/costcenter/coc/detailsPage.vue

@@ -44,14 +44,14 @@
                 <avue-form :option="optionForm" v-model="form" ref="form">
                     <tempalte slot="podCname">
                         <dic-select v-model="form.podCname" placeholder="起运港" key="id" label="cnName" res="records"
-                            url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true" dataName="cnName"
-                            @selectChange="dicChange('podCname', $event)" :disabled="editDisabled" :slotRight="true"
-                            rightLabel="code"></dic-select>
+                            url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
+                            dataName="cnName" @selectChange="dicChange('podCname', $event)" :disabled="editDisabled"
+                            :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
                     <tempalte slot="destinationCname">
                         <dic-select v-model="form.destinationCname" placeholder="目的港" key="id" label="cnName"
-                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
-                            dataName="cnName" @selectChange="dicChange('destinationCname', $event)"
+                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true"
+                            :remote="true" dataName="cnName" @selectChange="dicChange('destinationCname', $event)"
                             :disabled="editDisabled" :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
                     <tempalte slot="airlineCname">
@@ -61,9 +61,10 @@
                     </tempalte>
                     <tempalte slot="shippingCompanyCname">
                         <dic-select v-model="form.shippingCompanyCname" placeholder="船公司" key="id" label="shortName"
-                            res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
-                            :remote="true" dataName="shortName" @selectChange="dicChange('shippingCompanyCname', $event)"
-                            :disabled="editDisabled" :slotRight="true" rightLabel="code"></dic-select>
+                            res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司"
+                            :filterable="true" :remote="true" dataName="shortName"
+                            @selectChange="dicChange('shippingCompanyCname', $event)" :disabled="editDisabled"
+                            :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
                     <tempalte slot="shipCname">
                         <dic-select v-model="form.shipCname" placeholder="船名" key="id" label="cnName" res="records"
@@ -87,10 +88,17 @@
                     </tempalte>
                     <tempalte slot="transitPortCname">
                         <dic-select v-model="form.transitPortCname" placeholder="中转港" key="id" label="cnName"
-                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
-                            dataName="cnName" @selectChange="dicChange('transitPortCname', $event)"
+                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true"
+                            :remote="true" dataName="cnName" @selectChange="dicChange('transitPortCname', $event)"
                             :disabled="editDisabled" :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
+                    <tempalte slot="transportationTerms">
+                        <dic-select v-model="form.transportationTerms" placeholder="运输条款" key="id" label="cnName"
+                            res="records" url="/blade-los/bserviceterms/list?status=0&current=1&size=20"
+                            :filterable="true" :remote="true" dataName="cnName"
+                            @selectChange="dicChange('transportationTerms', $event)"
+                            :disabled="editDisabled"></dic-select>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <trade-card title="基础明细">
@@ -140,10 +148,15 @@
                             :controls="false" placeholder="请输入 销售价" size="small" style="width: 100%;"></el-input-number>
                         <span v-else>{{ row.salesPrice }}</span>
                     </template>
-                    <template slot="costPriceForm" slot-scope="{ row }">
+                    <!-- <template slot="costPriceForm" slot-scope="{ row }">
                         <el-input-number v-if="row.$cellEdit" v-model="row.costPrice" @change="countChange(row)"
                             :controls="false" placeholder="请输入 成本价" size="small" style="width: 100%;"></el-input-number>
                         <span v-else>{{ row.costPrice }}</span>
+                    </template> -->
+                    <template slot="oceanFreightForm" slot-scope="{ row }">
+                        <el-input-number v-if="row.$cellEdit" v-model="row.oceanFreight" @change="countChange(row)"
+                            :controls="false" placeholder="请输入 海运费" size="small" style="width: 100%;"></el-input-number>
+                        <span v-else>{{ row.oceanFreight }}</span>
                     </template>
                 </avue-crud>
             </trade-card>
@@ -225,6 +238,12 @@
                             :precision="2"></el-input-number>
                         <span v-else>{{ row.costPrice }}</span>
                     </template>
+                    <template slot="salesPriceForm" slot-scope="{ row }">
+                        <el-input-number v-if="row.$cellEdit" v-model="row.salesPrice" :controls="false"
+                            @change="countChange()" placeholder="请输入 销售价" size="small" style="width: 100%;"
+                            :precision="2"></el-input-number>
+                        <span v-else>{{ row.salesPrice }}</span>
+                    </template>
                     <template slot="menu" slot-scope="{ row, index }">
                         <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
                             @click="polRowDel(row, index)">删 除</el-button>
@@ -309,6 +328,12 @@
                             :precision="2"></el-input-number>
                         <span v-else>{{ row.costPrice }}</span>
                     </template>
+                    <template slot="salesPriceForm" slot-scope="{ row }">
+                        <el-input-number v-if="row.$cellEdit" v-model="row.salesPrice" :controls="false"
+                            @change="countChange()" placeholder="请输入 销售价" size="small" style="width: 100%;"
+                            :precision="2"></el-input-number>
+                        <span v-else>{{ row.salesPrice }}</span>
+                    </template>
                     <template slot="menu" slot-scope="{ row, index }">
                         <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
                             @click="podRowDel(row, index)">删 除</el-button>
@@ -526,15 +551,6 @@ export default {
                         label: '运输条款',
                         prop: "transportationTerms",
                         disabled: false,
-                        type: 'select',
-                        filterable: true,
-                        remote: true,
-                        dicUrl: "/api/blade-los/bserviceterms/list?status=0&current=1&size=20&cnName={{key}}",
-                        props: {
-                            label: 'cnName',
-                            value: 'cnName',
-                            res: 'data.records'
-                        },
                     },
                     {
                         label: "有效期起",
@@ -717,16 +733,16 @@ export default {
                         prop: "costPrice",
                         width: "80",
                         overHidden: true,
-                        cell: true,
-                        slot: true,
-                        formslot: true,
-                        rules: [
-                            {
-                                required: true,
-                                message: '请输入销售价',
-                                trigger: 'blur'
-                            }
-                        ]
+                        // cell: true,
+                        // slot: true,
+                        // formslot: true,
+                        // rules: [
+                        //     {
+                        //         required: true,
+                        //         message: '请输入销售价',
+                        //         trigger: 'blur'
+                        //     }
+                        // ]
                     },
                     {
                         label: "利润",
@@ -1356,6 +1372,7 @@ export default {
         polAddRow() {
             this.polFeeList.push({
                 pid: this.form.id,
+                srcType: 0,
                 busType: 'POL',
                 type: '船公司',
                 curCode: 'CNY',
@@ -1366,6 +1383,7 @@ export default {
         podAddRow() {
             this.podFeeList.push({
                 pid: this.form.id,
+                srcType: 0,
                 busType: 'POD',
                 type: '船公司',
                 curCode: 'CNY',
@@ -1518,7 +1536,7 @@ export default {
                     multiList = this.selectionList
                     arr = this.form.costItemList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -1548,7 +1566,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.polFeeList) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice==null || row.costPrice==null) {
                         this.$refs.crud2.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -1582,7 +1600,7 @@ export default {
                     multiList = this.selectionPolList
                     arr = this.polFeeList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -1614,7 +1632,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.podFeeList) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice==null || row.costPrice==null) {
                         this.$refs.crud3.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -1648,7 +1666,7 @@ export default {
                     multiList = this.selectionPodList
                     arr = this.podFeeList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -1800,13 +1818,13 @@ export default {
                         }
                     }
                     for (let row of this.polFeeList) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice==null || row.costPrice==null) {
                             this.$refs.crud2.rowCell(row, row.$index)
                             return this.$message.error("请完善POL杂费明细");
                         }
                     }
                     for (let row of this.podFeeList) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice==null || row.costPrice==null) {
                             this.$refs.crud3.rowCell(row, row.$index)
                             return this.$message.error("请完善POD杂费明细");
                         }

+ 71 - 40
src/views/iosBasicData/costcenter/soc/detailsPage.vue

@@ -50,14 +50,15 @@
                     </tempalte>
                     <tempalte slot="podCname">
                         <dic-select v-model="form.podCname" placeholder="起运港" key="id" label="cnName" res="records"
-                            url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true" dataName="cnName"
-                            @selectChange="dicChange('podCname', $event)" :disabled="editDisabled" :slotRight="true" rightLabel="code"></dic-select>
+                            url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
+                            dataName="cnName" @selectChange="dicChange('podCname', $event)" :disabled="editDisabled"
+                            :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
                     <tempalte slot="destinationCname">
                         <dic-select v-model="form.destinationCname" placeholder="目的港" key="id" label="cnName"
-                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
-                            dataName="cnName" @selectChange="dicChange('destinationCname', $event)" :slotRight="true" rightLabel="code"
-                            :disabled="editDisabled"></dic-select>
+                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true"
+                            :remote="true" dataName="cnName" @selectChange="dicChange('destinationCname', $event)"
+                            :slotRight="true" rightLabel="code" :disabled="editDisabled"></dic-select>
                     </tempalte>
                     <tempalte slot="airlineCname">
                         <dic-select v-model="form.airlineCname" placeholder="航线" key="id" label="cnName" res="records"
@@ -66,14 +67,15 @@
                     </tempalte>
                     <tempalte slot="shippingCompanyCname">
                         <dic-select v-model="form.shippingCompanyCname" placeholder="承运人" key="id" label="shortName"
-                            res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
-                            :remote="true" dataName="shortName" @selectChange="dicChange('shippingCompanyCname', $event)"
-                            :slotRight="true" rightLabel="code"
-                            :disabled="editDisabled"></dic-select>
+                            res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司"
+                            :filterable="true" :remote="true" dataName="shortName"
+                            @selectChange="dicChange('shippingCompanyCname', $event)" :slotRight="true"
+                            rightLabel="code" :disabled="editDisabled"></dic-select>
                     </tempalte>
                     <tempalte slot="actualShippingCompanyCname">
-                        <dic-select v-model="form.actualShippingCompanyCname" placeholder="船公司" key="id" label="shortName"
-                            res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
+                        <dic-select v-model="form.actualShippingCompanyCname" placeholder="船公司" key="id"
+                            label="shortName" res="records"
+                            url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
                             :remote="true" dataName="shortName" :slotRight="true" rightLabel="code"
                             @selectChange="dicChange('actualShippingCompanyCname', $event)"
                             :disabled="editDisabled"></dic-select>
@@ -114,8 +116,8 @@
                     </tempalte>
                     <tempalte slot="transitPortCname">
                         <dic-select v-model="form.transitPortCname" placeholder="中转港" key="id" label="cnName"
-                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true" :remote="true"
-                            dataName="cnName" @selectChange="dicChange('transitPortCname', $event)"
+                            res="records" url="/blade-los/bports/list?current=1&size=5" :filterable="true"
+                            :remote="true" dataName="cnName" @selectChange="dicChange('transitPortCname', $event)"
                             :disabled="editDisabled" :slotRight="true" rightLabel="code"></dic-select>
                     </tempalte>
                     <tempalte slot="navigateDay">
@@ -130,8 +132,9 @@
                     </tempalte>
                     <tempalte slot="actualShippingCompanyCnameTwo">
                         <dic-select v-model="form.actualShippingCompanyCnameTwo" placeholder="二程实际船公司" key="id"
-                            label="shortName" res="records" url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司"
-                            :filterable="true" :remote="true" dataName="shortName" :slotRight="true" rightLabel="code"
+                            label="shortName" res="records"
+                            url="/blade-los/bcorps/selectList?current=1&size=5&corpTypeName=船公司" :filterable="true"
+                            :remote="true" dataName="shortName" :slotRight="true" rightLabel="code"
                             @selectChange="dicChange('actualShippingCompanyCnameTwo', $event)"
                             :disabled="editDisabled"></dic-select>
                     </tempalte>
@@ -146,6 +149,13 @@
                             :disabled="editDisabled || form.costItemList.length || polFeeList.length || podFeeList.length || polFeeList2.length || podFeeList2.length">
                         </el-date-picker>
                     </tempalte>
+                    <tempalte slot="transportationTerms">
+                        <dic-select v-model="form.transportationTerms" placeholder="运输条款" key="id" label="cnName"
+                            res="records" url="/blade-los/bserviceterms/list?status=0&current=1&size=20"
+                            :filterable="true" :remote="true" dataName="cnName"
+                            @selectChange="dicChange('transportationTerms', $event)"
+                            :disabled="editDisabled"></dic-select>
+                    </tempalte>
                 </avue-form>
             </trade-card>
             <el-tabs type="border-card" v-model="tabsName">
@@ -675,7 +685,7 @@
 </template>
 
 <script>
-import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent } from "@/api/iosBasicData/costcenter/soc";
+import { submit, submitItemList, submitFeeList, getDetail, removeItem, feeRemove, checkAgent, revokeCheckAgent, copyAgent, topList, getBcorpsList } from "@/api/iosBasicData/costcenter/soc";
 import { getListTemplate, getListTemplatelist } from "@/api/iosBasicData/losbfeestemplate";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -839,15 +849,6 @@ export default {
                         label: '运输条款',
                         prop: "transportationTerms",
                         disabled: false,
-                        type: 'select',
-                        filterable: true,
-                        remote: true,
-                        dicUrl: "/api/blade-los/bserviceterms/list?status=0&current=1&size=20&cnName={{key}}",
-                        props: {
-                            label: 'cnName',
-                            value: 'cnName',
-                            res: 'data.records'
-                        },
                     },
                     {
                         label: '舱位类型',
@@ -867,7 +868,7 @@ export default {
                         prop: "cabinTypeData",
                         disabled: false,
                         span: 2,
-                    }, 
+                    },
                     {
                         label: '舱位数',
                         prop: "shippingSpaceNumber",
@@ -877,7 +878,7 @@ export default {
                             message: " ",
                             trigger: "blur"
                         }]
-                    },    
+                    },
                     {
                         label: '限大柜',
                         prop: "limitBox",
@@ -1788,6 +1789,36 @@ export default {
         this.option2 = await this.getColumnData(this.getColumnName(458), this.optionBack2);
         this.polOption = await this.getColumnData(this.getColumnName(448), this.polOptionBack);
         this.podOption = await this.getColumnData(this.getColumnName(449), this.podOptionBack);
+        if (this.detailData.type == 'new') {
+            topList({ deptName: '永发物流' }).then(res => {
+                if (res.data.data.length > 0) {
+                    res.data.data.forEach(item => {
+                        if (item.deptName == '永发物流') {
+                            this.form.belongingCompanyId = item.id
+                            this.form.belongingCompanyName = item.deptName
+                            this.form.podId = item.polId
+                            this.form.podCode = item.polCode
+                            this.form.podEname = item.polEnName
+                            this.form.podCname = item.polCnName
+                        }
+                    })
+
+                }
+            })
+            getBcorpsList(1,10,{ shortName: '青岛永发船务' }).then(res => {
+                if (res.data.data.records.length > 0) {
+                    res.data.data.records.forEach(item => {
+                        if (item.shortName == '青岛永发船务') {
+                            this.form.actualShippingCompanyId = item.id
+                            this.form.actualShippingCompanyCode = item.code
+                            this.form.actualShippingCompanyEname = item.enName
+                            this.form.actualShippingCompanyCname = item.shortName
+                        }
+                    })
+
+                }
+            })
+        }
         if (this.detailData.id) {
             this.editButton = true
             this.editDisabled = true
@@ -2515,7 +2546,7 @@ export default {
                     multiList = this.selectionList
                     arr = this.form.costItemList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -2545,7 +2576,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.polFeeList) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                         this.$refs.crud2.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -2579,7 +2610,7 @@ export default {
                     multiList = this.selectionPolList
                     arr = this.polFeeList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -2611,7 +2642,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.podFeeList) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                         this.$refs.crud3.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -2645,7 +2676,7 @@ export default {
                     multiList = this.selectionPodList
                     arr = this.podFeeList
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -2737,7 +2768,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.polFeeList2) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                         this.$refs.crud2.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -2771,7 +2802,7 @@ export default {
                     multiList = this.selectionPolList
                     arr = this.polFeeList2
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -2803,7 +2834,7 @@ export default {
                     return this.$message.error("请添加数据");
                 }
                 for (let row of this.podFeeList2) {
-                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                    if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                         this.$refs.crud3.rowCell(row, row.$index)
                         return this.$message.error("请完善POL杂费明细");
                     }
@@ -2837,7 +2868,7 @@ export default {
                     multiList = this.selectionPodList
                     arr = this.podFeeList2
                     // 获取有id 的数据
-                    const itemsWithId = multiList.filter(item =>item.id!=null);
+                    const itemsWithId = multiList.filter(item => item.id != null);
                     let arrIds = itemsWithId.map(item => item.id) // 获取id 数据
                     // 把选中的删除掉
                     multiList.forEach((item) => {
@@ -3152,25 +3183,25 @@ export default {
                         }
                     }
                     for (let row of this.polFeeList) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || !row.costPrice == null) {
                             this.$refs.crud2.rowCell(row, row.$index)
                             return this.$message.error("请完善POL杂费明细");
                         }
                     }
                     for (let row of this.polFeeList2) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                             this.$refs.crud2.rowCell(row, row.$index)
                             return this.$message.error("请完善POL杂费明细");
                         }
                     }
                     for (let row of this.podFeeList) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                             this.$refs.crud3.rowCell(row, row.$index)
                             return this.$message.error("请完善POD杂费明细");
                         }
                     }
                     for (let row of this.podFeeList2) {
-                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || !row.salesPrice || !row.costPrice) {
+                        if (!row.type || !row.feeName || !row.curCode || !row.curCode || row.salesPrice == null || row.costPrice == null) {
                             this.$refs.crud3.rowCell(row, row.$index)
                             return this.$message.error("请完善POD杂费明细");
                         }

+ 4 - 0
src/views/iosBasicData/costcenter/soc/index.vue

@@ -48,6 +48,7 @@ export default {
     data() {
         return {
             isShow: true,
+            detailData: {},
             form: {},
             query: {
                 businessType: 'SOC',
@@ -332,6 +333,9 @@ export default {
     methods: {
         addButton() {
             this.isShow = false
+            this.detailData={
+                type:'new'
+            }
         },
         copyButton() {
             this.isShow = false

+ 176 - 5
src/views/ow/owPut/detailsPage.vue

@@ -229,7 +229,9 @@
                   :disabled="editDisabled||form.tradingBoxItemsList.length == 0">生成租金</el-button>
                 <el-button type="danger" plain size="small" @click="allClick('撤销租金')"
                   :disabled="editDisabled||form.tradingBoxItemsList.length == 0">撤销租金</el-button>
-                <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
+                  <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
+                  @click="allClick('D费用申请')">费用申请</el-button>
+                  <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -320,7 +322,9 @@
                   @click="allClick('C费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('C费用批量删除')">批量删除</el-button>
-                <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
+                  <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('C费用申请')">费用申请</el-button>
+                  <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
                 <el-button type="primary" size="mini" icon="el-icon-plus" :disabled="editDisabled" circle
@@ -561,7 +565,8 @@ import {
   copyAgent,
   countRent,
   revokeCountRent,
-  submitRtList
+  submitRtList,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1362,6 +1367,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -1594,6 +1633,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -2291,6 +2364,14 @@ export default {
       })
     },
     rtSubmit() {
+      for (let row of this.form.rentTermList) {
+        if (!row.curCode) {
+          return this.$message.error("请完善币别");
+        }
+        if (this.form.rentTermList[0].curCode != row.curCode) {
+          return this.$message.error("币别要保持一致");
+        }
+      }
       const loading = this.$loading({
         lock: true,
         text: '加载中',
@@ -2545,7 +2626,9 @@ export default {
       }
       if (name == 'D费用一键编辑') {
         for (let row of this.feeCenterListD) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'D费用批量删除') {
@@ -2553,6 +2636,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2614,7 +2703,9 @@ export default {
       }
       if (name == 'C费用一键编辑') {
         for (let row of this.feeCenterListC) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0||row.auditStatus== 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'C费用批量删除') {
@@ -2622,6 +2713,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2743,6 +2840,80 @@ export default {
           })
         })
       }
+      if (name == 'D费用申请') {
+        for (let row of this.selectionfeedList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeedList,
+            url: '/ow/owPut/index',
+            pageStatus: '',
+            pageLabel: 'OW(放)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
+      if (name == 'C费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/ow/owPut/index',
+            pageStatus: '',
+            pageLabel: 'OW(放)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {

+ 142 - 5
src/views/ow/owTask/detailsPage.vue

@@ -227,11 +227,13 @@
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
                   @click="allClick('D费用批量删除')">批量删除</el-button>
                 <el-button type="success" plain size="small" @click="allClick('生成租金')"
-                  :disabled="editDisabled||form.tradingBoxItemsList.length == 0">生成租金</el-button>
+                  :disabled="editDisabled || form.tradingBoxItemsList.length == 0">生成租金</el-button>
                 <el-button type="danger" plain size="small" @click="allClick('撤销租金')"
-                  :disabled="editDisabled||form.tradingBoxItemsList.length == 0">撤销租金</el-button>
+                  :disabled="editDisabled || form.tradingBoxItemsList.length == 0">撤销租金</el-button>
                 <el-button type="primary" plain size="small" :disabled="editDisabled">计算超期箱使费</el-button>
                 <el-button type="warning" plain size="small" :disabled="editDisabled">批量导入费用</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeedList.length == 0"
+                  @click="allClick('D费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -323,6 +325,8 @@
                   @click="allClick('C费用一键编辑')">一键编辑</el-button>
                 <el-button type="danger" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
                   @click="allClick('C费用批量删除')">批量删除</el-button>
+                <el-button type="primary" plain size="small" :disabled="editDisabled || selectionfeecList.length == 0"
+                  @click="allClick('C费用申请')">费用申请</el-button>
                 <!-- <el-button type="primary" plain size="small" @click="$refs.printC.openDialog()">打印账单</el-button> -->
               </template>
               <template slot="indexHeader" slot-scope="{row,index}">
@@ -564,7 +568,8 @@ import {
   copyAgent,
   countRent,
   revokeCountRent,
-  submitRtList
+  submitRtList,
+  pleaseVerifyCost
 } from "@/api/boxManagement/buyContainer";
 import dicSelect from "@/components/dicSelect/main";
 import checkSchedule from "@/components/checkH/checkSchedule.vue";
@@ -1373,6 +1378,40 @@ export default {
             headerslot: true,
           },
           {
+            label: '账单状态',
+            prop: 'accStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '未生成',
+              value: 0,
+            }, {
+              label: '已生成',
+              value: 1,
+            }],
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            overHidden: true,
+            width: 80,
+            type: 'select',
+            dicData: [{
+              label: '录入',
+              value: '0',
+            }, {
+              label: '提交审核',
+              value: '1',
+            }, {
+              label: '审核中',
+              value: '2',
+            }, {
+              label: '审核通过',
+              value: '4',
+            }],
+          },
+          {
             label: "类别",
             prop: "billType",
             width: "100",
@@ -2301,6 +2340,14 @@ export default {
       })
     },
     rtSubmit() {
+      for (let row of this.form.rentTermList) {
+        if (!row.curCode) {
+          return this.$message.error("请完善币别");
+        }
+        if (this.form.rentTermList[0].curCode != row.curCode) {
+          return this.$message.error("币别要保持一致");
+        }
+      }
       const loading = this.$loading({
         lock: true,
         text: '加载中',
@@ -2573,7 +2620,9 @@ export default {
       }
       if (name == 'D费用一键编辑') {
         for (let row of this.feeCenterListD) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'D费用批量删除') {
@@ -2581,6 +2630,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2642,7 +2697,9 @@ export default {
       }
       if (name == 'C费用一键编辑') {
         for (let row of this.feeCenterListC) {
-          this.$set(row, "$cellEdit", true);
+          if (!row.stlPid && (row.accStatus == 0 || row.auditStatus == 0)) {
+            this.$set(row, "$cellEdit", true);
+          }
         }
       }
       if (name == 'C费用批量删除') {
@@ -2650,6 +2707,12 @@ export default {
           if (row.feeCode == 'BOX-YJ' || row.feeCode == 'BOX-ZJ') {
             return this.$message.error("押金和租箱费不允许删除");
           }
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许删除");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许删除");
+          }
         }
         let multiList = []
         let arr = []
@@ -2771,6 +2834,80 @@ export default {
           })
         })
       }
+      if (name == 'D费用申请') {
+        for (let row of this.selectionfeedList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeedList,
+            url: '/ow/owTask/index',
+            pageStatus: '',
+            pageLabel: 'OW(拿)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
+      if (name == 'C费用申请') {
+        for (let row of this.selectionfeecList) {
+          if (row.stlPid && row.accStatus != 0) {
+            return this.$message.error("已生成账单,不允许重复申请");
+          }
+          if (row.stlPid && row.auditStatus != 0) {
+            return this.$message.error("已申请费用,不允许重复申请");
+          }
+        }
+        this.$confirm("确定申请费用?", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {}
+          obj = {
+            srcId: this.form.id,
+            srcType: this.form.type,
+            feeCenterList: this.selectionfeecList,
+            url: '/ow/owTask/index',
+            pageStatus: '',
+            pageLabel: 'OW(拿)',
+          }
+          const loading = this.$loading({
+            lock: true,
+            text: '加载中',
+            spinner: 'el-icon-loading',
+            background: 'rgba(255,255,255,0.7)'
+          });
+          pleaseVerifyCost(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id)
+          }).finally(() => {
+            loading.close();
+          })
+        });
+      }
     },
     submit(type) {
       this.$refs["form"].validate((valid, done) => {