Przeglądaj źródła

货代增加付费申请和发票申请 2023-12-04

caojunjie 1 rok temu
rodzic
commit
0cf82e2936

+ 24 - 1
src/api/iosBasicData/finstlbills.js

@@ -57,7 +57,6 @@ export const finstlbillslistAccBillV1 = (params) => {
     params: params
   })
 }
-
 // 确认签收
 export const finstlbillsConfirmSignFor = (row) => {
   return request({
@@ -118,6 +117,22 @@ export const finstlbillsRevokeSettlement = (row) => {
     data: row
   })
 }
+// 付费申请
+export const settlementApprove = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/settlementApprove',
+    method: 'post',
+    data: row
+  })
+}
+// 付费申请 撤销
+export const revokeSettlementApprove = (row) => {
+  return request({
+    url: '/api/blade-los/finstlbills/revokeSettlementApprove',
+    method: 'post',
+    data: row
+  })
+}
 // 费用信息明细接口
 export const feecenterSelectByAccNoList = (data) => {
   return request({
@@ -126,3 +141,11 @@ export const feecenterSelectByAccNoList = (data) => {
     params: data
   })
 }
+// 申请单号
+export const approveDetail = (data) => {
+  return request({
+    url: '/api/blade-los/finstlbills/approveDetail',
+    method: 'get',
+    params: data
+  })
+}

+ 9 - 4
src/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue

@@ -144,22 +144,22 @@
                     prop="currentStlAmountNetRMB"
                     label="RMB" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountRMB" v-if="brfalse"
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountNetRMB" v-if="brfalse"
                                   size="mini" autocomplete="off"
                                   clearable placeholder="请输入USD" >
                         </el-input>
-                        <span v-else>{{scope.row.currentStlAmountRMB}}</span>
+                        <span v-else>{{scope.row.currentStlAmountNetRMB}}</span>
                     </template>
                 </el-table-column>
                 <el-table-column
                     prop="currentStlAmountNetUSD"
                     label="USD" width="100px">
                     <template slot-scope="scope">
-                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountUSD" v-if="brfalse"
+                        <el-input style="width: 100%;" v-model="scope.row.currentStlAmountNetUSD" v-if="brfalse"
                                   size="mini" autocomplete="off"
                                   clearable placeholder="请输入USD" >
                         </el-input>
-                        <span v-else>{{scope.row.currentStlAmountUSD}}</span>
+                        <span v-else>{{scope.row.currentStlAmountNetUSD}}</span>
                     </template>
                 </el-table-column>
             </el-table-column>
@@ -297,6 +297,10 @@
             brfalse:{
                 type:Boolean,
                 default:true,
+            },
+            handleSelectionData:{
+                type:Array,
+                default:[]
             }
         },
         data(){
@@ -304,6 +308,7 @@
                 ifInvoiceData:[], // 是否数据
                 invoicelosDara:[],// 发票
                 curCodeData:[], // 币种
+
             }
         },
         created() {

+ 28 - 73
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -7,11 +7,11 @@
                 </el-button>
             </div>
             <div class="add-customer-btn">
-                <el-button  size="small" type="warning" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.isCleared == 1"
-                            :loading="saveLoading" @click="finstlbillsRevokeSettlementfun">撤销结算
+                <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.status == '0'"
+                            :loading="saveLoading" @click="settlementApprovefun">确认申请
                 </el-button>
-                <el-button  size="small" type="success" plain  style="margin-right: 8px" :disabled="!form.id" v-else
-                            :loading="saveLoading" @click="finstlbillsConfirmSettlementfun">确认结算
+                <el-button  size="small" type="warning" plain  style="margin-right: 8px" :disabled="!form.id" v-if="form.status == '1'"
+                            :loading="saveLoading" @click="revokeSettlementApprovefun">撤销申请
                 </el-button>
                 <el-button  size="small" type="primary" style="margin-right: 8px" :disabled="form.isCleared == 1" v-if="editSave"
                             :loading="saveLoading" @click="editHandle">编 辑
@@ -417,13 +417,11 @@
     import {getRateList} from "@/api/iosBasicData/rateManagement";
     import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
     import {
-        finstlbillsConfirmSettlement,
         finstlbillsConfirmSignFor,
         finstlbillsDetail,
         finstlbillslistAccBillV1,
-        finstlbillsRevokeSettlement,
         finstlbillsRevokeSignFor,
-        finstlbillsSubmit
+        finstlbillsSubmit, revokeSettlementApprove, settlementApprove
     } from '@/api/iosBasicData/finstlbills'
     import expand from "@/components/basic-container/expand.vue";
     import finstlbillsitems from "@/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue";
@@ -521,10 +519,10 @@
                     return
                 }
                 // 业务类型
-                if (!this.form.businessTypes) {
-                    this.$message.warning('请选择业务类型');
-                    return
-                }
+                // if (!this.form.businessTypes) {
+                //     this.$message.warning('请选择业务类型');
+                //     return
+                // }
                 if (!this.form.id) {
                     // 是否选择从表数据
                     if (this.handleSelectionData.length == 0) {
@@ -537,17 +535,16 @@
                         this.$message.warning('请选择本次结算币种');
                         return;
                     }
-                    if (!item.currentStlAmount) {
-                        this.$message.warning('请选择本次结算金额');
-                        return;
-                    }
+                    // if (!item.currentStlAmount) {
+                    //     this.$message.warning('请选择本次结算金额');
+                    //     return;
+                    // }
                 }
                 this.saveLoading = true // 加载动画
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'STL' // 结算单
+                this.form.billNoFormat = 'FFSQ'
+                this.form.businessTypeCode = 'FFSQ'
+                this.form.businessType = 'FFSQ' // 结算单
                 this.form.dc = 'C' // 付
-
                 if (!this.form.id) {
                     this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
                         item.lineNo = index
@@ -558,8 +555,10 @@
                         item.dc = item.accountDc // 收付
                         if (item.currentStlCurCode == 'CNY') {
                             item.currentStlAmount = item.currentStlAmountRMB
+                            item.currentStlAmountNet = item.currentStlAmountNetRMB
                         }else {
                             item.currentStlAmount = item.currentStlAmountUSD
+                            item.currentStlAmountUSD = item.currentStlAmountNetUSD
                         }
                         delete item.businessType
                         if (!this.form.id) {
@@ -585,7 +584,7 @@
                     this.form = res.data.data
                     this.tableData = this.form.finStlBillsItemsList.map(item=>{
                         item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
-                        item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item.unsettledAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
+                        // item.currentStlAmountNet = Number(item.unsettledAmount) - (Number(item.unsettledAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
                         if(item.curCode == 'CNY') {
                             this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
                             this.$set(item,'amountRMB',item.amount)
@@ -624,10 +623,10 @@
                     return
                 }
                 // 业务类型
-                if (!this.form.businessTypes) {
-                    this.$message.warning('请选择业务类型');
-                    return
-                }
+                // if (!this.form.businessTypes) {
+                //     this.$message.warning('请选择业务类型');
+                //     return
+                // }
                 delete this.form.id
                 // let obj = JSON.parse(JSON.stringify(this.form))
                 let obj = {}
@@ -647,6 +646,7 @@
                 obj.receivableAdvance = this.form.receivableAdvance // 预收帐款
                 obj.voyageNo = this.form.voyageNo // 航次
                 obj.signforDateList = this.form.signforDateList // 签收日期
+                obj.auditStatus = '0'
                 // 审核期间
                 if (this.form.approvedDate) {
                     obj.approveTimeList = this.form.approvedDate
@@ -680,14 +680,14 @@
                 })
             },
             // 结算确认
-            finstlbillsConfirmSettlementfun(){
+            settlementApprovefun(){
                 this.$confirm("确定进行对账操作?", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
                     type: "warning"
                 }).then(()=>{
                     this.pageLoading = true
-                    finstlbillsConfirmSettlement(this.form).then(res=>{
+                    settlementApprove(this.form).then(res=>{
                         this.pageLoading = false
                         this.$message.success('操作成功');
                         this.finstlbillsDetailfun(res.data.data.id)
@@ -697,14 +697,14 @@
                 })
             },
             // 结算撤销
-            finstlbillsRevokeSettlementfun(){
+            revokeSettlementApprovefun(){
                 this.$confirm("确定进行撤销对账操作?", {
                     confirmButtonText: "确定",
                     cancelButtonText: "取消",
                     type: "warning"
                 }).then(()=>{
                     this.pageLoading = true
-                    finstlbillsRevokeSettlement(this.form).then(res=>{
+                    revokeSettlementApprove(this.form).then(res=>{
                         this.pageLoading = false
                         this.$message.success('操作成功');
                         this.finstlbillsDetailfun(res.data.data.id)
@@ -726,51 +726,6 @@
                 this.$emit('goBack')
             },
             // 请求的接口
-            // 确认签收接口
-            finstlbillsConfirmSignForfun(){
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'STL' // 结算单
-                // 保留id
-                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
-                    item.pType = item.businessType
-                    item.accBillId = item.id
-                    item.accBillNo = item.billNo
-                    item.accDate = item.billDate
-                    delete item.businessType
-                    delete item.billNo
-                    delete item.billDate
-                    return item
-                })
-                finstlbillsConfirmSignFor(this.form).then(res=>{
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                })
-            },
-            // 撤销签收接口
-            finstlbillsRevokeSignForfun(){
-                this.form.billNoFormat = 'HYDZ'
-                this.form.businessTypeCode = 'HYDZ'
-                this.form.businessType = 'STL' // 结算单
-
-                this.form.finStlBillsItemsList = this.handleSelectionData.map((item,index)=>{
-                    item.lineNo = index
-                    item.pType = item.businessType
-                    item.accBillId = item.id
-                    item.accBillNo = item.billNo
-                    item.accDate = item.billDate
-                    delete item.businessType
-                    delete item.billNo
-                    delete item.billDate
-                    return item
-                })
-                finstlbillsRevokeSignFor(this.form).then(res=>{
-                    this.$message.success('操作成功');
-                    this.finstlbillsDetailfun(res.data.data.id)
-                })
-            },
-
             // 获取币别数据
             getRateListfun(cnName){
                 getRateList({current:1,size:10,cnName}).then(res=>{

+ 2 - 1
src/views/iosBasicData/PaymentApplication/index.vue

@@ -465,6 +465,7 @@
             this.isShow = false
             this.editSave = true
             this.$nextTick(()=>{
+
                 this.$refs.finstlbillsDetails.finstlbillsDetailfun(row.id)
             })
         },
@@ -590,7 +591,7 @@
         finstlbillsList(
             page.currentPage,
             page.pageSize,
-            {...Object.assign(params, this.query),businessType:'STL',dc:'C'},
+            {...Object.assign(params, this.query),businessType:'FFSQ',dc:'C'},
         ).then(res => {
           const data = res.data.data;
           this.page.total = data.total;

+ 67 - 28
src/views/iosBasicData/PaymentSettlement/finstlbillsDetails.vue

@@ -56,7 +56,7 @@
                                     </el-input>
                                 </el-form-item>
                             </el-col>
-                            <el-col :span="9">
+                            <el-col :span="5">
                                 <el-form-item label="审核期间" prop="etd">
                                     <el-date-picker
                                         v-model="form.approvedDate"
@@ -73,6 +73,15 @@
                                     </el-date-picker>
                                 </el-form-item>
                             </el-col>
+                            <el-col :span="4">
+                                <el-form-item label="申请单号" prop="billNo">
+                                    <el-input style="width: 100%;" v-model="form.billNo"
+                                              size="small" autocomplete="off"
+                                              :disabled="editSave"
+                                              clearable placeholder="请输入单号" >
+                                    </el-input>
+                                </el-form-item>
+                            </el-col>
                             <el-col :span="10">
                                 <el-form-item label="结算单位" prop="corpCnName">
                                     <el-col :span="11">
@@ -417,6 +426,7 @@
     import {getRateList} from "@/api/iosBasicData/rateManagement";
     import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
     import {
+        approveDetail,
         finstlbillsConfirmSettlement,
         finstlbillsConfirmSignFor,
         finstlbillsDetail,
@@ -427,6 +437,7 @@
     } from '@/api/iosBasicData/finstlbills'
     import expand from "@/components/basic-container/expand.vue";
     import finstlbillsitems from "@/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue";
+    import {isProcurement} from "@/api/basicData/configuration";
 
     export default {
         components: {SearchQuery,expand,finstlbillsitems},
@@ -439,12 +450,15 @@
         },
         data(){
             return {
+                whetherAuditing:'', // 判断检索
                 activeName:'first', // tabs 切换数据
                 tableData:[],
                 pageLoading:false, // 全屏加载动画
                 saveLoading:false, // 按钮动画
                 // 绑定的数据
-                form:{},
+                form:{
+                    auditStatus:'3'
+                },
                 handleSelectionData:[], // 表格选择的数据
                 corpData:[], // 结算单位 数据
                 curCodeData:[],// 币别
@@ -484,6 +498,7 @@
             // },
         },
         created() {
+            this.isProcurementfun()
         },
         methods:{
             // 下拉回调
@@ -578,6 +593,19 @@
                     this.finstlbillsDetailfun(res.data.data.id)
                 })
             },
+            // 申请单号
+            approveDetailfun(billNo){
+                approveDetail({billNo}).then(res=>{
+                    console.log(res,587)
+                })
+            },
+            // 判断检索
+            isProcurementfun(){
+                isProcurement({"param":"whether.auditing"}).then(res=>{
+                    // res.data.data === '1'
+                    this.whetherAuditing = res.data.data
+                })
+            },
             // 详情接口
             finstlbillsDetailfun(id){
                 this.pageLoading = true
@@ -623,11 +651,17 @@
                     this.$message.warning('请选择对账单位');
                     return
                 }
-                // 业务类型
-                if (!this.form.businessTypes) {
-                    this.$message.warning('请选择业务类型');
-                    return
+                if (this.whetherAuditing == '1') {
+                    if (!this.form.billNo) {
+                        this.$message.warning('请输入申请单号');
+                        return;
+                    }
                 }
+                // 业务类型
+                // if (!this.form.businessTypes) {
+                //     this.$message.warning('请选择业务类型');
+                //     return
+                // }
                 delete this.form.id
                 // let obj = JSON.parse(JSON.stringify(this.form))
                 let obj = {}
@@ -655,29 +689,34 @@
                 if (this.form.accountDate) {
                     obj.billDateList = this.form.accountDate
                 }
-                finstlbillslistAccBillV1(obj).then(res=>{
-                    this.tableData = res.data.data.map(item=>{
-                        item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
-                        if(item.curCode == 'CNY') {
-                            this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
-                            this.$set(item,'amountRMB',item.amount)
-                            this.$set(item,'amountNetRMB',item.amountNet)
-                            this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
-                            this.$set(item,'stlTtlAmountNetRMB',item.stlTtlAmountNet)
-                            this.$set(item,'currentStlAmountRMB',item.unsettledAmount) // 未结算金额
-                            this.$set(item,'currentStlAmountNetRMB',item.currentStlAmountNet)
-                        }else {
-                            this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
-                            this.$set(item,'amountUSD',item.amount)
-                            this.$set(item,'amountNetUSD',item.amountNet)
-                            this.$set(item,'stlTtlAmountNetUSD',item.stlTtlAmountNet)
-                            this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
-                            this.$set(item,'currentStlAmountUSD',item.unsettledAmount) // 未结算金额
-                            this.$set(item,'currentStlAmountNetUSD',item.currentStlAmountNet)
-                        }
-                        return item
+
+                if (this.whetherAuditing == '1') {
+                    this.approveDetailfun()
+                }else {
+                    finstlbillslistAccBillV1(obj).then(res=>{
+                        this.tableData = res.data.data.map(item=>{
+                            item.stlTtlAmountNet = Number(item.stlTtlAmount) - (Number(item.stlTtlAmount) * (Number(item.taxRate) + Number(item.surchargeRate)))
+                            if(item.curCode == 'CNY') {
+                                this.$set(item,'currentInvoiceAmountRMB',item.currentInvoiceAmount)
+                                this.$set(item,'amountRMB',item.amount)
+                                this.$set(item,'amountNetRMB',item.amountNet)
+                                this.$set(item,'stlTtlAmountRMB',item.stlTtlAmount)
+                                this.$set(item,'stlTtlAmountNetRMB',item.stlTtlAmountNet)
+                                this.$set(item,'currentStlAmountRMB',item.unsettledAmount) // 未结算金额
+                                this.$set(item,'currentStlAmountNetRMB',item.currentStlAmountNet)
+                            }else {
+                                this.$set(item,'currentInvoiceAmountUSD',item.currentInvoiceAmount)
+                                this.$set(item,'amountUSD',item.amount)
+                                this.$set(item,'amountNetUSD',item.amountNet)
+                                this.$set(item,'stlTtlAmountNetUSD',item.stlTtlAmountNet)
+                                this.$set(item,'stlTtlAmountUSD',item.stlTtlAmount)
+                                this.$set(item,'currentStlAmountUSD',item.unsettledAmount) // 未结算金额
+                                this.$set(item,'currentStlAmountNetUSD',item.currentStlAmountNet)
+                            }
+                            return item
+                        })
                     })
-                })
+                }
             },
             // 结算确认
             finstlbillsConfirmSettlementfun(){

+ 3 - 2
src/views/iosBasicData/PaymentSettlement/index.vue

@@ -82,9 +82,9 @@
 <script>
   import {finstlbillsList, finstlbillsDetail, finstlbillsSubmit, finstlbillsRemove, finstlbillsitemsList} from "@/api/iosBasicData/finstlbills";
   import {mapGetters} from "vuex";
-  import finstlbillsDetails from '@/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue'
+  import finstlbillsDetails from '@/views/iosBasicData/PaymentSettlement/finstlbillsDetails.vue'
   import {getWorkDicts} from "@/api/system/dictbiz";
-  import finstlbillsitems from "@/views/iosBasicData/PaymentApplication/assembly/finstlbillsitems.vue";
+  import finstlbillsitems from "@/views/iosBasicData/PaymentSettlement/assembly/finstlbillsitems.vue";
   import {getRateList} from "@/api/iosBasicData/rateManagement";
 
   export default {
@@ -466,6 +466,7 @@
             this.editSave = true
             this.$nextTick(()=>{
                 this.$refs.finstlbillsDetails.finstlbillsDetailfun(row.id)
+                // this.$refs.finstlbillsDetails.isProcurementfun(row.id)
             })
         },
       // 详情的返回列表

+ 157 - 110
src/views/iosBasicData/SeafreightExportF/bills/assembly/DistributionBox/containers.vue

@@ -1,98 +1,115 @@
 <template>
-  <basic-container>
-    <avue-crud :option="option"
-               :table-loading="loading"
-               :data="assemblyForm.containersList"
-               :permission="permissionList"
-               :before-open="beforeOpen"
-               v-model="form"
-               id="out-table"
-               :header-cell-class-name="headerClassName"
-               ref="crud"
-               :row-style="{height:'20px'}"
-               :cell-style="{padding:'0px'}"
-               @row-update="rowUpdate"
-               @row-save="rowSave"
-               @row-del="rowDel"
-               @selection-change="selectionChange"
-               @refresh-change="refreshChange">
-      <template slot="menuLeft">
-        <div style="display: flex;align-items: center;justify-content: space-between">
-            <div>
-                <!--<el-button type="primary" size="small" @click="DistributionBox">配箱</el-button>-->
-                <el-button type="danger" size="small" :disabled="detailData.seeDisabled" @click="revokefun">撤销</el-button>
-                <el-button type="danger" size="small" :disabled="detailData.seeDisabled" @click="wholeRevokefun">全部撤销</el-button>
-                <el-button type="warning" size="small" :disabled="detailData.seeDisabled" @click="cleanCntrNofun">清除箱号</el-button>
-                <el-button type="primary" size="small" :disabled="detailData.seeDisabled" @click="containersSubmitListfun" >批量保存</el-button>
-                <el-button type="success" size="small" :disabled="detailData.seeDisabled" @click="containersExportContainersfun" >导出导入模板</el-button>
-                <el-button type="success" size="small" :disabled="detailData.seeDisabled"  >导入箱号,铅封号</el-button>
+  <div>
+      <basic-container>
+          <avue-crud :option="option"
+                     :table-loading="loading"
+                     :data="assemblyForm.containersList"
+                     :permission="permissionList"
+                     :before-open="beforeOpen"
+                     v-model="form"
+                     id="out-table"
+                     :header-cell-class-name="headerClassName"
+                     ref="crud"
+                     :row-style="{height:'20px'}"
+                     :cell-style="{padding:'0px'}"
+                     @row-update="rowUpdate"
+                     @row-save="rowSave"
+                     @row-del="rowDel"
+                     @selection-change="selectionChange"
+                     @refresh-change="refreshChange">
+              <template slot="menuLeft">
+                  <div style="display: flex;align-items: center;justify-content: space-between">
+                      <div>
+                          <!--<el-button type="primary" size="small" @click="DistributionBox">配箱</el-button>-->
+                          <el-button type="danger" size="small" :disabled="detailData.seeDisabled" @click="revokefun">撤销</el-button>
+                          <el-button type="danger" size="small" :disabled="detailData.seeDisabled" @click="wholeRevokefun">全部撤销</el-button>
+                          <el-button type="warning" size="small" :disabled="detailData.seeDisabled" @click="cleanCntrNofun">清除箱号</el-button>
+                          <el-button type="primary" size="small" :disabled="detailData.seeDisabled" @click="containersSubmitListfun" >批量保存</el-button>
+                          <el-button type="success" size="small" :disabled="detailData.seeDisabled || !assemblyForm.id" @click="excelBox = true" >导入箱号,铅封号</el-button>
+
+                          <el-button type="warning" size="small"
+                                     :disabled="numberfalsefun() || assemblyForm.id"
+                                     @click="equalDistribution">平均分配</el-button>
+                      </div>
+                      <!--<div>-->
+                      <!--    <el-button size="small">Copy</el-button>-->
+                      <!--    <el-button size="small">查看箱信息</el-button>-->
+                      <!--    <el-button size="small">校验箱信息</el-button>-->
+                      <!--</div>-->
+                  </div>
+              </template>
+              <template slot-scope="scope" slot="menu">
+                  <el-button v-if="scope.row.edit" :type="scope.type" :size="scope.size" icon="el-icon-edit"
+                             @click.stop="rowSavefun(scope.row, scope.index)">保存
+                  </el-button>
+                  <el-button v-else :type="scope.type" :size="scope.size" icon="el-icon-edit"
+                             :disabled="detailData.seeDisabled"
+                             @click.stop="rowCellfun(scope.row, scope.index)">编辑
+                  </el-button>
+                  <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
+                             :disabled="detailData.seeDisabled"
+                             @click.stop="rowDel(scope.row, scope.index)">删除
+                  </el-button>
+              </template>
+              <template slot-scope="scope" slot="cntrNo">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.cntrNo"
+                            size="small" clearable placeholder="请输入箱号"></el-input>
+                  <span v-else>{{scope.row.cntrNo}}</span>
+              </template>
+              <template slot-scope="scope" slot="sealNo">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.sealNo"
+                            size="small" clearable placeholder="请输入封号"></el-input>
+                  <span v-else>{{scope.row.sealNo}}</span>
+              </template>
+              <template slot-scope="scope" slot="quantity">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.quantity"
+                            size="small" clearable placeholder="请输入件数"></el-input>
+                  <span v-else>{{Number(scope.row.quantity).toFixed(2)}}</span>
+              </template>
+              <template slot-scope="scope" slot="grossWeight">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.grossWeight"
+                            size="small" clearable placeholder="请输入毛重"></el-input>
+                  <span v-else>{{scope.row.grossWeight}}</span>
+              </template>
+              <template slot-scope="scope" slot="netWeight">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.netWeight"
+                            size="small" clearable placeholder="请输入净重"></el-input>
+                  <span v-else>{{scope.row.netWeight}}</span>
+              </template>
+              <template slot-scope="scope" slot="measurement">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.measurement"
+                            size="small" clearable placeholder="请输入尺码"></el-input>
+                  <span v-else>{{scope.row.measurement}}</span>
+              </template>
+              <template slot-scope="scope" slot="remarks">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.remarks"
+                            size="small" clearable placeholder="请输入备注"></el-input>
+                  <span v-else>{{scope.row.remarks}}</span>
+              </template>
+              <template slot-scope="scope" slot="marks">
+                  <el-input v-if="scope.row.edit" v-model="scope.row.marks"
+                            size="small" clearable placeholder="请输入MARKS"></el-input>
+                  <span v-else>{{scope.row.marks}}</span>
+              </template>
+          </avue-crud>
+      </basic-container>
+
+      <el-dialog title="导入箱号,铅封号" append-to-body :visible.sync="excelBox" width="555px" :close-on-click-modal="false"
+                 v-dialog-drag>
+          <avue-form :option="excelOption" v-model="excelForm" :table-loading="excelLoading" :upload-before="uploadBefore"
+                     :upload-after="onSuccess">
+              <template slot="excelTemplate">
+                  <el-button type="primary" @click="handleGet">
+                      点击下载<i class="el-icon-download el-icon--right"></i>
+                  </el-button>
+              </template>
+          </avue-form>
+          <p style="text-align: center;color: #DC0505">
+              温馨提示 第一次导入时请先下载模板
+          </p>
+      </el-dialog>
+  </div>
 
-                <el-button type="warning" size="small"
-                           :disabled="numberfalsefun() || assemblyForm.id"
-                           @click="equalDistribution">平均分配</el-button>
-            </div>
-            <!--<div>-->
-            <!--    <el-button size="small">Copy</el-button>-->
-            <!--    <el-button size="small">查看箱信息</el-button>-->
-            <!--    <el-button size="small">校验箱信息</el-button>-->
-            <!--</div>-->
-        </div>
-      </template>
-        <template slot-scope="scope" slot="menu">
-            <el-button v-if="scope.row.edit" :type="scope.type" :size="scope.size" icon="el-icon-edit"
-                       @click.stop="rowSavefun(scope.row, scope.index)">保存
-            </el-button>
-            <el-button v-else :type="scope.type" :size="scope.size" icon="el-icon-edit"
-                       :disabled="detailData.seeDisabled"
-                       @click.stop="rowCellfun(scope.row, scope.index)">编辑
-            </el-button>
-            <el-button :type="scope.type" :size="scope.size" icon="el-icon-delete"
-                       :disabled="detailData.seeDisabled"
-                       @click.stop="rowDel(scope.row, scope.index)">删除
-            </el-button>
-        </template>
-        <template slot-scope="scope" slot="cntrNo">
-            <el-input v-if="scope.row.edit" v-model="scope.row.cntrNo"
-                      size="small" clearable placeholder="请输入箱号"></el-input>
-            <span v-else>{{scope.row.cntrNo}}</span>
-        </template>
-        <template slot-scope="scope" slot="sealNo">
-            <el-input v-if="scope.row.edit" v-model="scope.row.sealNo"
-                      size="small" clearable placeholder="请输入封号"></el-input>
-            <span v-else>{{scope.row.sealNo}}</span>
-        </template>
-        <template slot-scope="scope" slot="quantity">
-            <el-input v-if="scope.row.edit" v-model="scope.row.quantity"
-                      size="small" clearable placeholder="请输入件数"></el-input>
-            <span v-else>{{Number(scope.row.quantity).toFixed(2)}}</span>
-        </template>
-        <template slot-scope="scope" slot="grossWeight">
-            <el-input v-if="scope.row.edit" v-model="scope.row.grossWeight"
-                      size="small" clearable placeholder="请输入毛重"></el-input>
-            <span v-else>{{scope.row.grossWeight}}</span>
-        </template>
-        <template slot-scope="scope" slot="netWeight">
-            <el-input v-if="scope.row.edit" v-model="scope.row.netWeight"
-                      size="small" clearable placeholder="请输入净重"></el-input>
-            <span v-else>{{scope.row.netWeight}}</span>
-        </template>
-        <template slot-scope="scope" slot="measurement">
-            <el-input v-if="scope.row.edit" v-model="scope.row.measurement"
-                      size="small" clearable placeholder="请输入尺码"></el-input>
-            <span v-else>{{scope.row.measurement}}</span>
-        </template>
-        <template slot-scope="scope" slot="remarks">
-            <el-input v-if="scope.row.edit" v-model="scope.row.remarks"
-                      size="small" clearable placeholder="请输入备注"></el-input>
-            <span v-else>{{scope.row.remarks}}</span>
-        </template>
-        <template slot-scope="scope" slot="marks">
-            <el-input v-if="scope.row.edit" v-model="scope.row.marks"
-                      size="small" clearable placeholder="请输入MARKS"></el-input>
-            <span v-else>{{scope.row.marks}}</span>
-        </template>
-    </avue-crud>
-  </basic-container>
 </template>
 
 <script>
@@ -125,6 +142,35 @@ import {getToken} from "@/util/auth";
           extendedDisabled:false,
           // 装货港数据
           polData:[],
+          // 附件配置
+          excelOption: {
+              submitBtn: false,
+              emptyBtn: false,
+              column: [
+                  {
+                      label: "模板下载",
+                      prop: "excelTemplate",
+                      formslot: true,
+                      span: 24
+                  },
+                  {
+                      label: "模板上传",
+                      prop: "excelFile",
+                      type: "upload",
+                      drag: true,
+                      loadText: "模板上传中,请稍等",
+                      span: 24,
+                      propsHttp: {
+                          res: "data"
+                      },
+                      tip: "请上传 .xls,.xlsx 标准格式文件",
+                      action: "/api/blade-los/containers/importBoxNo"
+                  }
+              ]
+          },
+          excelForm:{},
+          excelLoading: false,
+          excelBox:false,
 
         form: {},
         query: {},
@@ -229,6 +275,24 @@ import {getToken} from "@/util/auth";
       created() {
       },
       methods: {
+          uploadBefore(file, done, loading) {
+              done();
+              loading = true;
+          },
+          // 上传成功
+          onSuccess(res, done, loading, column) {
+              this.excelBox = false;
+              this.$message.success("导入成功!");
+              loading = false;
+              done();
+          },
+          // 下载模板
+          handleGet() {
+              window.open(
+                  `/api/blade-los/containers/exportContainers?${this.website.tokenHeader
+                  }=${getToken()}&pid=${this.assemblyForm.id}`
+              );
+          },
           // 查询件数是否为零
           numberfalsefun() {
               if (!this.assemblyForm.containersList) {
@@ -342,23 +406,6 @@ import {getToken} from "@/util/auth";
                   })
               })
           },
-          // 导出导入模板
-          containersExportContainersfun(){
-              this.$confirm('是否导出?', '提示', {
-                  confirmButtonText: '确定',
-                  cancelButtonText: '取消',
-                  type: 'warning'
-              }).then(()=>{
-                  window.open(
-                      `/api/blade-los/containers/exportContainers?${this.website.tokenHeader
-                      }=${getToken()}&pid=${this.assemblyForm.id}`
-                  );
-              })
-          },
-          // 导入箱号,铅封号
-          containersImportBoxNofun(){
-              // containersImportBoxNo
-          },
 
       rowSave(row, done, loading) {
         containersSubmit(row).then(() => {

+ 1 - 1
src/views/tirePartsMall/salesManagement/purchaseOrder/detailsPage.vue

@@ -45,7 +45,7 @@
                 </el-dropdown>
                 <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" v-if="form.id"
                            type="success" size="small"
-                           :disabled="form.shortcutWarehousingStatus == '1' || editButton"
+                           :disabled="form.shortcutWarehousingStatus == '1' || form.status != '录入' || editButton"
                            @click="oneClickStorage" >一键采购入库
                 </el-button>
             </div>