Browse Source

海运进出口 页数 财务 上传保存 SOC 上下票释放解锁

Qukatie 6 months ago
parent
commit
21d7aaa846

+ 8 - 0
src/api/uploadFile/upload-file.js

@@ -11,3 +11,11 @@ export function updateListRemove(data, url) {
     }
   })
 }
+//附件上传列表删除
+export function submitList(data) {
+  return request({
+    url: '/api/blade-los/filescenter/submitList',
+    method: 'post',
+    data:data
+  })
+}

+ 34 - 1
src/components/upload/index.vue

@@ -7,6 +7,9 @@
           <el-button type="primary" size="small" icon="el-icon-edit" @click="addDetail" :disabled="disabled"
             v-if="display">上传
           </el-button>
+          <el-button type="success" size="small" icon="el-icon-edit" @click="submit" :disabled="disabled"
+            v-if="saveBtn">一键保存
+          </el-button>
           <slot name="c_button"></slot>
         </template>
         <template slot="url" slot-scope="{ row }">
@@ -141,7 +144,7 @@ import { getToken } from "@/util/auth";
 import { LTfujianDelete, sharedDeletion } from "@/api/user";
 import option from "@/views/exportTrade/customerInquiry/config/mainList.json";
 import { gainUser } from "@/api/basicData/customerInquiry";
-import { updateListRemove } from "@/api/uploadFile/upload-file";
+import { updateListRemove, submitList } from "@/api/uploadFile/upload-file";
 import { deleteImg } from "../../api/basicData/EquipmentArchives";
 import PreviewImage from '@/components/PreviewImage/index.vue'
 export default {
@@ -182,6 +185,14 @@ export default {
       type: String,
       default: 'link'
     },
+    saveBtn: {
+      type: Boolean,
+      default: false
+    },
+    pId: {
+      type: String,
+      default: null
+    },
   },
   data() {
     return {
@@ -518,6 +529,22 @@ export default {
         }
       }
     },
+    submit() {
+      if (this.data.length == 0) {
+        return this.$message.error("请添加数据");
+      }
+      const loading = this.$loading({
+        lock: true,
+        text: '加载中',
+        spinner: 'el-icon-loading',
+        background: 'rgba(255,255,255,0.7)'
+      });
+      submitList(this.data).then(res => {
+        this.$emit('upDate', res.data.data)
+      }).finally(() => {
+        loading.close();
+      })
+    },
     beforeUpload(file) {
       if (file.type == "image/jpeg" || file.type == "image/png" || file.type == "image/bmp") {
         const fileSize = file.size / 1024 / 1024
@@ -536,6 +563,7 @@ export default {
     //新增上传成功
     onSuccess(response, file, fileList) {
       this.$refs.crud.rowCellAdd({
+        pid: this.pId ? this.pId : null,
         fileName: response.data.originalName,
         url: response.data[this.linkKey]
       });
@@ -560,6 +588,11 @@ export default {
     },
     //开启批量上传
     addDetail() {
+      if (this.saveBtn) {
+        if (!this.pId) {
+          return this.$message.error("请保存主表数据");
+        }
+      }
       if (this.maxNum > 0 && this.data.length == this.maxNum) {
         return this.$message.error("最多上传" + this.maxNum + "个文件");
       }

+ 4 - 1
src/views/iosBasicData/ComputationCenter/settlementDetails.vue

@@ -327,7 +327,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="form.isCleared == 1"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
         </div>
@@ -529,6 +529,9 @@ export default {
         this.saveLocalCurrency()
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         dicChange(name, row) {
             if (name == 'branchName') {
                 if (row) {

+ 2 - 1
src/views/iosBasicData/OceanFreightImport/bills/index.vue

@@ -439,7 +439,8 @@ export default {
             page: {
                 pageSize: 10,
                 currentPage: 1,
-                total: 0
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 500]
             },
             // 弹窗分页
             mawbPage: {

+ 4 - 1
src/views/iosBasicData/PaymentApplication/finstlbillsDetails.vue

@@ -350,7 +350,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="form.status == '3'"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
 
@@ -563,6 +563,9 @@ export default {
         this.saveLocalCurrency()
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         importData(list) {
             this.tableData = this.tableData.concat(list)
         },

+ 2 - 1
src/views/iosBasicData/SeafreightExportF/bills/index.vue

@@ -564,7 +564,8 @@ export default {
             page: {
                 pageSize: 10,
                 currentPage: 1,
-                total: 0
+                total: 0,
+                pageSizes: [10, 20, 30, 40, 50, 100, 200, 300, 500]
             },
             // 弹窗分页
             mawbPage: {

+ 11 - 5
src/views/iosBasicData/costcenter/coc/detailsPage.vue

@@ -5,7 +5,7 @@
                 <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
                     @click="goBack()">返回列表
                 </el-button>
-                 <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
+                <el-button v-if="form.id && pageIds.length" type="text" @click="lastPage">上一票</el-button>
                 <el-button v-if="form.id && pageIds.length" type="text" @click="nextPage">下一票</el-button>
             </div>
             <div class="add-customer-btn">
@@ -1236,7 +1236,7 @@ export default {
         }
     },
     methods: {
-               lastPage() {
+        lastPage() {
             if (this.pageIds.length) {
                 const index = this.pageIds.indexOf(this.form.id)
                 if (index == 0) {
@@ -1246,7 +1246,7 @@ export default {
                 if (this.form.id) {
                     this.unLock({
                         moduleName: "COC",
-                        tableName: "COC_order",
+                        tableName: "COC",
                         billId: this.form.id,
                         billNo: this.form.businessNo
                     });
@@ -1265,7 +1265,7 @@ export default {
                 if (this.form.id) {
                     this.unLock({
                         moduleName: "COC",
-                        tableName: "COC_order",
+                        tableName: "COC",
                         billId: this.form.id,
                         billNo: this.form.businessNo
                     });
@@ -1552,7 +1552,7 @@ export default {
             getDetail({ id: id }).then(res => {
                 // this.polFeeList = res.data.data.costFeeList.filter(item => item.busType == 'POL')
                 // this.podFeeList = res.data.data.costFeeList.filter(item => item.busType == 'POD')
-              console.log(res.data.data)
+                console.log(res.data.data)
                 this.saveLocalCurrency(res.data.data.belongingCompanyId)
                 this.form = res.data.data
                 if (res.data.data.status != '录入') {
@@ -2115,6 +2115,12 @@ export default {
             return back;
         },
         goBack(type) {
+            this.unLock({
+                moduleName: "SOC",
+                tableName: "SOC",
+                billId: this.form.id,
+                billNo: this.form.businessNo
+            });
             this.$emit("goBack");
         },
     }

+ 11 - 3
src/views/iosBasicData/costcenter/soc/detailsPage.vue

@@ -1884,7 +1884,7 @@ export default {
             };
             this.inDetailsKey(this.$route.name, {
                 moduleName: "SOC",
-                tableName: "SOC_order",
+                tableName: "SOC",
                 billId: this.form.id,
                 billNo: this.form.businessNo
             });
@@ -1908,7 +1908,7 @@ export default {
                 if (this.form.id) {
                     this.unLock({
                         moduleName: "SOC",
-                        tableName: "SOC_order",
+                        tableName: "SOC",
                         billId: this.form.id,
                         billNo: this.form.businessNo
                     });
@@ -1927,7 +1927,7 @@ export default {
                 if (this.form.id) {
                     this.unLock({
                         moduleName: "SOC",
-                        tableName: "SOC_order",
+                        tableName: "SOC",
                         billId: this.form.id,
                         billNo: this.form.businessNo
                     });
@@ -3528,6 +3528,14 @@ export default {
             return back;
         },
         goBack(type) {
+            if (this.form.id) {
+                this.unLock({
+                    moduleName: "SOC",
+                    tableName: "SOC",
+                    billId: this.form.id,
+                    billNo: this.form.businessNo
+                });
+            }
             this.$emit("goBack");
         },
     }

+ 4 - 1
src/views/iosBasicData/fininvoices/fininvoicesDetails.vue

@@ -544,7 +544,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="statusType"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
         </div>
@@ -709,6 +709,9 @@ export default {
         }
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         dicChange(name, row) {
             if (name == 'branchName') {
                 if (row) {

+ 28 - 25
src/views/iosBasicData/fininvoicesApplyfor/fininvoicesDetails.vue

@@ -177,7 +177,7 @@
                                                     </el-date-picker>
                                                 </el-form-item>
                                             </el-col>
-<!--                                            <el-col :span="12">
+                                            <!--                                            <el-col :span="12">
                                                 <el-form-item label="装货港" prop="pol">
                                                     <search-query :datalist="polData" :selectValue="form.pol"
                                                         :filterable="true" :clearable="true" :remote="true"
@@ -201,7 +201,7 @@
                                                     </search-query>
                                                 </el-form-item>
                                             </el-col>-->
-<!--                                            <el-col :span="12">
+                                            <!--                                            <el-col :span="12">
                                                 <el-form-item label="目的地" prop="destination">
                                                     <search-query :datalist="destinationData"
                                                         :selectValue="form.destination" :filterable="true"
@@ -313,13 +313,13 @@
                                             <el-col :span="8">
                                                 <el-form-item label="选择币种" prop="curCode">
                                                     <search-query :datalist="curData" :selectValue="form.curCode"
-                                                                  :filterable="true" :clearable="true"
-                                                                  :disabled="editSave || tableData.length" :remote="true"
-                                                                  :buttonIf="false" placeholder="请输入选择币种"
-                                                                  :forParameter="{ key: 'id', label: 'code', value: 'code' }"
-                                                                  @remoteMethod="getRateListfun"
-                                                                  @corpChange="corpChange($event, 'curCode')"
-                                                                  @corpFocus="getRateListfun">
+                                                        :filterable="true" :clearable="true"
+                                                        :disabled="editSave || tableData.length" :remote="true"
+                                                        :buttonIf="false" placeholder="请输入选择币种"
+                                                        :forParameter="{ key: 'id', label: 'code', value: 'code' }"
+                                                        @remoteMethod="getRateListfun"
+                                                        @corpChange="corpChange($event, 'curCode')"
+                                                        @corpFocus="getRateListfun">
                                                     </search-query>
                                                 </el-form-item>
                                             </el-col>
@@ -343,16 +343,16 @@
                                             <el-col :span="16">
                                                 <el-form-item label="HBLNO" prop="hblno">
                                                     <el-input style="width: 100%;" v-model="form.hblno" size="small"
-                                                              autocomplete="off" :disabled="editSave || tableData.length"
-                                                              clearable placeholder="请输入分单编号">
+                                                        autocomplete="off" :disabled="editSave || tableData.length"
+                                                        clearable placeholder="请输入分单编号">
                                                     </el-input>
                                                 </el-form-item>
                                             </el-col>
                                             <el-col :span="8">
                                                 <el-form-item label="发票汇率" prop="exrate">
                                                     <el-input style="width: 100%;" v-model="form.exrate" size="small"
-                                                              autocomplete="off" :disabled="editSave || tableData.length"
-                                                              clearable placeholder="请输入发票汇率">
+                                                        autocomplete="off" :disabled="editSave || tableData.length"
+                                                        clearable placeholder="请输入发票汇率">
                                                     </el-input>
                                                 </el-form-item>
                                             </el-col>
@@ -368,7 +368,7 @@
                                                     </search-query>
                                                 </el-form-item>
                                             </el-col>
-<!--                                            <el-col :span="8">
+                                            <!--                                            <el-col :span="8">
                                                 <el-form-item label="税率(%)" prop="taxRate">
                                                     <el-input style="width: 100%;" v-model="form.taxRate" size="small"
                                                         autocomplete="off" :disabled="editSave || tableData.length"
@@ -388,20 +388,20 @@
                                             <el-col :span="16">
                                                 <el-form-item label="业务编号" prop="businessNo">
                                                     <el-input style="width: 100%;" v-model="form.businessNo"
-                                                              size="small" autocomplete="off"
-                                                              :disabled="editSave || tableData.length" clearable
-                                                              placeholder="请输入业务编号">
+                                                        size="small" autocomplete="off"
+                                                        :disabled="editSave || tableData.length" clearable
+                                                        placeholder="请输入业务编号">
                                                     </el-input>
                                                 </el-form-item>
                                             </el-col>
                                             <el-col :span="8">
                                                 <el-form-item label="发票类型" prop="invType">
                                                     <search-query :datalist="invTypeData" :selectValue="form.invType"
-                                                                  :clearable="true" :disabled="editSave || tableData.length"
-                                                                  :buttonIf="false" placeholder="请输入发票类型"
-                                                                  :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
-                                                                  @corpChange="corpChange($event, 'invType')"
-                                                                  @corpFocus="invTypeWorkDictsfun">
+                                                        :clearable="true" :disabled="editSave || tableData.length"
+                                                        :buttonIf="false" placeholder="请输入发票类型"
+                                                        :forParameter="{ key: 'dictKey', label: 'dictValue', value: 'dictKey' }"
+                                                        @corpChange="corpChange($event, 'invType')"
+                                                        @corpFocus="invTypeWorkDictsfun">
                                                     </search-query>
                                                 </el-form-item>
                                             </el-col>
@@ -534,7 +534,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="statusType"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
 
@@ -672,7 +672,7 @@ export default {
                 branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
                 dc: 'D',
                 invCurCode: 'CNY',
-                curCode:'CNY',
+                curCode: 'CNY',
                 isRp: 1,
                 invType: '全电发票',
                 taxRate: 0,
@@ -769,6 +769,9 @@ export default {
         }
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         dicChange(name, row) {
             if (name == 'branchName') {
                 if (row) {
@@ -791,7 +794,7 @@ export default {
                 isExchangeToCny: 0,
                 billDate: getCurrentDate(),
             }
-             this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc, 2))
+            this.$set(this.form, 'exrate', this.getExchangeRate(this.getLocalCurrency(), this.form.dc, 2))
             // getRateList({ current: 1, size: 30 }).then(res => {
             //     for (let item of res.data.data.records) {
             //         if (item.code == "USD") {

+ 4 - 1
src/views/iosBasicData/fininvoicesOutput/fininvoicesDetails.vue

@@ -561,7 +561,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="statusType"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
         </div>
@@ -763,6 +763,9 @@ export default {
         }
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         dicChange(name, row) {
             if (name == 'branchName') {
                 if (row) {

+ 4 - 1
src/views/iosBasicData/finstlbills/finstlbillsDetails.vue

@@ -465,7 +465,7 @@
                 <el-tab-pane label="文件中心">
                     <containerTitle title="上传附件"></containerTitle>
                     <c-upload :data="form.fileList" :enumerationValue="76" deleteUrl="/api/blade-los/filescenter/remove"
-                        display :disabled="form.status == '3'"></c-upload>
+                        display :pId="form.id" @upDate="upDate" :saveBtn="true"></c-upload>
                 </el-tab-pane>
             </el-tabs>
 
@@ -667,6 +667,9 @@ export default {
         this.saveLocalCurrency()
     },
     methods: {
+        upDate(list) {
+            this.form.fileList = list
+        },
         dicChange(name, row) {
             if (name == 'branchName') {
                 if (row) {