소스 검색

修改放单

Qukatie 1 년 전
부모
커밋
3284b6949c

+ 2 - 2
src/api/iosBasicData/release/jobApplication.js

@@ -83,8 +83,8 @@ export const releaseApplication = (data) => {
 export const subsequentAvailability = (data) => {
   return request({
     url: '/api/blade-los/seareleasebill/subsequentAvailability',
-    method: 'get',
-    params: data
+    method: 'post',
+    data: data
   })
 }
 //申请退款

+ 2 - 2
src/api/iosBasicData/release/releaseManagement.js

@@ -83,8 +83,8 @@ export const releaseApplication = (data) => {
 export const subsequentAvailability = (data) => {
   return request({
     url: '/api/blade-los/seareleasebill/subsequentAvailability',
-    method: 'get',
-    params: data
+    method: 'post',
+    data: data
   })
 }
 //申请退款

+ 93 - 26
src/views/iosBasicData/release/jobApplication/detailsPage.vue

@@ -8,15 +8,20 @@
             </div>
             <div class="add-customer-btn">
                 <el-button class="el-button&#45;&#45;small-yh" style="margin-left: 6px;" type="primary" size="small"
-                    v-if="form.id && editButton" :disabled="form.issueStatus!='N'" @click="inEdit">编 辑
+                    v-if="form.id && editButton" :disabled="form.issueStatus != 'N'" @click="inEdit">编 辑
                 </el-button>
                 <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
                     v-if="!editButton" @click="submit">保 存
                 </el-button>
-                <el-button type="success" size="small" v-if="editButton&&form.id&&form.issueStatus=='N'" @click="subApplication">提 交</el-button>
-                <el-button type="info" size="small"  v-if="editButton&&form.id&&form.issueStatus=='S'"  @click="revokeApp">撤 销</el-button>
-                <el-button type="warning" size="small"  v-if="editButton&&form.id&&form.issueStatus=='S'" @click="submitSign">签单完成确认</el-button>
-                <el-button type="info" size="small"  v-if="editButton&&form.id&&form.issueStatus=='O'" @click="revokeSign">取消签单完成</el-button>
+                <el-button type="success" size="small" v-if="editButton && form.id && form.issueStatus == 'N'"
+                    @click="subApplication">提 交</el-button>
+                <el-button type="info" size="small" v-if="editButton && form.id && form.issueStatus == 'S'"
+                    @click="revokeApp">撤
+                    销</el-button>
+                <el-button type="warning" size="small" v-if="editButton && form.id && form.issueStatus == 'S'"
+                    @click="submitSign">签单完成确认</el-button>
+                <el-button type="info" size="small" v-if="editButton && form.id && form.issueStatus == 'O'"
+                    @click="revokeSign">取消签单完成</el-button>
             </div>
         </div>
         <div style="margin-top: 50px">
@@ -71,6 +76,11 @@
                             @corpChange="selectChange($event, 'runnerName')">
                         </search-query>
                     </tempalte>
+                    <template slot="unreleaseBillsLabel">
+                        <el-button type="primary" size="small" plain
+                            :disabled="!form.id || form.issueStatus != 'N' || editButton"
+                            @click="subsequentAb">后续有货</el-button>
+                    </template>
                 </avue-form>
                 <div style="display: flex;justify-content: flex-end;">
                     <el-button type="primary" size="small" :disabled="editButton || form.applicationList.length > 0"
@@ -101,7 +111,8 @@ import {
     application,
     revokeApplication,
     signcomplete,
-    revokeSigncomplete
+    revokeSigncomplete,
+    subsequentAvailability
 } from "@/api/iosBasicData/release/jobApplication";
 import reportDialog from "@/components/report-dialog/main";
 import { dateFormat } from "@/util/date";
@@ -572,20 +583,24 @@ export default {
                         children: [{
                             label: '等级',
                             prop: 'itemLevel',
+                            overHidden: true,
                             display: false
                         }, {
                             label: 'MBL NO',
                             prop: 'mblno',
+                            overHidden: true,
                             display: false
                         }, {
                             label: 'BOOKINGNO',
                             prop: 'bookingNo',
+                            overHidden: true,
                             width: 120,
                         }]
                     },
                     {
                         label: '提单份数',
                         prop: 'numberOfObl',
+                        overHidden: true,
                         display: false
                     },
                     {
@@ -597,6 +612,7 @@ export default {
                                 label: '状态',
                                 prop: 'issueStatus',
                                 type: "select",
+                                overHidden: true,
                                 disabled: true,
                                 dicData: [{
                                     id: 'N',
@@ -627,22 +643,27 @@ export default {
                             },
                             {
                                 label: '客户简称',
-                                prop: 'corpCnName'
+                                prop: 'corpCnName',
+                                overHidden: true,
                             }, {
                                 label: 'HB/L NO',
                                 prop: 'hblno',
+                                overHidden: true,
                                 display: false
                             }, {
                                 label: 'ETD',
                                 prop: 'etd',
+                                overHidden: true,
                                 display: false
                             }, {
                                 label: 'VSL',
                                 prop: 'vesselCnName',
+                                overHidden: true,
                                 display: false
                             }, {
                                 label: 'VOY',
                                 prop: 'voyageNo',
+                                overHidden: true,
                                 display: false
                             }]
                     },
@@ -662,18 +683,22 @@ export default {
                         children: [
                             {
                                 label: '签单方式',
-                                prop: 'issueType'
+                                prop: 'issueType',
+                                overHidden: true,
                             },
                             {
                                 label: '要求时间',
-                                prop: 'requireTime'
+                                prop: 'requireTime',
+                                overHidden: true,
                             }, {
                                 label: '跑单员',
                                 prop: 'runnerId',
+                                overHidden: true,
                                 display: false
                             }, {
                                 label: '操作确认时间',
                                 prop: 'confirmTime',
+                                overHidden: true,
                                 display: false,
                                 width: 140
                             }]
@@ -976,6 +1001,21 @@ export default {
             this.editButton = false
             this.optionForm.disabled = false
         },
+        subsequentAb() {
+            this.$confirm('是否继续操作?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                subsequentAvailability(this.form).then(res => {
+                    if (Object.keys(res.data.data).length) {
+                        this.form.unreleaseBills = '票数:' + res.data.data.number + '\n' + res.data.data.text
+                    }
+                })
+            }).catch(() => {
+            });
+
+        },
         //修改提交触发
         submit() {
             this.$refs["form"].validate((valid, done) => {
@@ -988,26 +1028,53 @@ export default {
                         background: 'rgba(255,255,255,0.7)'
                     });
                     let obj = {}
-                    obj = {
-                        billNoFormat: 'FDSQ',
-                        businessTypeCode: 'FDSQ',
-                        ...this.form,
-                        billType: 'A'
+                    let val = 0
+                    val = this.form.applicationList.filter(e => e.id)
+                    if (val.length > 0) {
+                        obj = {
+                            billNoFormat: 'FDSQ',
+                            businessTypeCode: 'FDSQ',
+                            ...this.form,
+                            billType: 'A'
+                        }
+                        submit(obj).then(res => {
+                            this.form = res.data.data
+                            this.$message.success("保存成功");
+                            this.editButton = true;
+                            this.optionForm.disabled = true
+                        }).finally(() => {
+                            loading.close();
+                        });
+                    } else {
+                        if (this.selectionList.length > 0) {
+                            this.form.applicationList = this.selectionList
+                            obj = {
+                                billNoFormat: 'FDSQ',
+                                businessTypeCode: 'FDSQ',
+                                ...this.form,
+                                billType: 'A'
+                            }
+                            submit(obj).then(res => {
+                                this.form = res.data.data
+                                this.$message.success("保存成功");
+                                this.editButton = true;
+                                this.optionForm.disabled = true
+                            }).finally(() => {
+                                loading.close();
+                            });
+                        } else {
+                            loading.close();
+                            this.$message.error("请选择明细");
+                        }
+
                     }
-                    submit(obj).then(res => {
-                        this.form = res.data.data
-                        this.$message.success("保存成功");
-                        this.editButton = true;
-                        this.optionForm.disabled = true
-                    }).finally(() => {
-                        loading.close();
-                    });
+
                 } else {
                     return false;
                 }
             });
         },
-        subApplication(){
+        subApplication() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
@@ -1029,7 +1096,7 @@ export default {
                 }
             });
         },
-        revokeApp(){
+        revokeApp() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
@@ -1051,7 +1118,7 @@ export default {
                 }
             });
         },
-        submitSign(){
+        submitSign() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {
@@ -1073,7 +1140,7 @@ export default {
                 }
             });
         },
-        revokeSign(){
+        revokeSign() {
             this.$refs["form"].validate((valid, done) => {
                 done();
                 if (valid) {

+ 70 - 23
src/views/iosBasicData/release/releaseManagement/detailsPage.vue

@@ -69,6 +69,11 @@
                             @corpChange="selectChange($event, 'runnerName')">
                         </search-query>
                     </tempalte>
+                    <template slot="unreleaseBillsLabel">
+                        <el-button type="primary" size="small" plain
+                            :disabled="!form.id || form.issueStatus != 'I' || editButton"
+                            @click="subsequentAb">后续有货</el-button>
+                    </template>
                 </avue-form>
                 <div style="display: flex;justify-content: flex-end;">
                     <el-button type="primary" size="small" :disabled="editButton || form.releaseBillList.length > 0"
@@ -99,7 +104,8 @@ import {
     application,
     revokeApplication,
     signcomplete,
-    revokeSigncomplete
+    revokeSigncomplete,
+    subsequentAvailability
 } from "@/api/iosBasicData/release/releaseManagement";
 import reportDialog from "@/components/report-dialog/main";
 import { dateFormat } from "@/util/date";
@@ -643,7 +649,7 @@ export default {
                             prop: 'mblno',
                             overHidden: true,
                             display: false
-                        },{
+                        }, {
                             label: 'HBL NO',
                             prop: 'hblno',
                             overHidden: true,
@@ -733,7 +739,7 @@ export default {
                             prop: 'amountDrTotal',
                             overHidden: true,
                             display: false
-                        },{
+                        }, {
                             label: '未收',
                             prop: 'unstlDrTotal',
                             overHidden: true,
@@ -1019,9 +1025,9 @@ export default {
                             podId: this.form.podId,
                             corpId: this.form.corpId,
                             bookingNo: this.form.bookingNo,
-                            dateFrom:this.form.dateFrom,
-                            dateTo:this.form.dateTo,
-                            isSwtich:this.form.isSwtich
+                            dateFrom: this.form.dateFrom,
+                            dateTo: this.form.dateTo,
+                            isSwtich: this.form.isSwtich
                         }
                     } else if (this.form.businessType == 'SI') {
                         obj = {
@@ -1034,9 +1040,9 @@ export default {
                             podId: this.form.podId,
                             corpId: this.form.corpId,
                             bookingNo: this.form.bookingNo,
-                            dateFrom:this.form.dateFrom,
-                            dateTo:this.form.dateTo,
-                            isSwtich:this.form.isSwtich
+                            dateFrom: this.form.dateFrom,
+                            dateTo: this.form.dateTo,
+                            isSwtich: this.form.isSwtich
                         }
                     }
 
@@ -1077,6 +1083,21 @@ export default {
             this.editButton = false
             this.optionForm.disabled = false
         },
+        subsequentAb() {
+            this.$confirm('是否继续操作?', '提示', {
+                confirmButtonText: '确定',
+                cancelButtonText: '取消',
+                type: 'warning'
+            }).then(() => {
+                subsequentAvailability(this.form).then(res => {
+                    if (Object.keys(res.data.data).length) {
+                        this.form.unreleaseBills = '票数:' + res.data.data.number + '\n' + res.data.data.text
+                    }
+                })
+            }).catch(() => {
+            });
+
+        },
         //修改提交触发
         submit() {
             this.$refs["form"].validate((valid, done) => {
@@ -1089,20 +1110,45 @@ export default {
                         background: 'rgba(255,255,255,0.7)'
                     });
                     let obj = {}
-                    obj = {
-                        billNoFormat: 'FD',
-                        businessTypeCode: 'FD',
-                        ...this.form,
-                        billType:"R"
+                    let val = 0
+                    val = this.form.releaseBillList.filter(e => e.preleaseId)
+                    if (val.length > 0) {
+                        obj = {
+                            billNoFormat: 'FD',
+                            businessTypeCode: 'FD',
+                            ...this.form,
+                            billType: "R"
+                        }
+                        submit(obj).then(res => {
+                            this.form = res.data.data
+                            this.$message.success("保存成功");
+                            this.editButton = true;
+                            this.optionForm.disabled = true
+                        }).finally(() => {
+                            loading.close();
+                        });
+                    } else {
+                        if (this.selectionList.length > 0) {
+                            this.form.releaseBillList = this.selectionList
+                            obj = {
+                                billNoFormat: 'FD',
+                                businessTypeCode: 'FD',
+                                ...this.form,
+                                billType: "R"
+                            }
+                            submit(obj).then(res => {
+                                this.form = res.data.data
+                                this.$message.success("保存成功");
+                                this.editButton = true;
+                                this.optionForm.disabled = true
+                            }).finally(() => {
+                                loading.close();
+                            });
+                        } else {
+                            loading.close();
+                            this.$message.error("请选择明细");
+                        }
                     }
-                    submit(obj).then(res => {
-                        this.form = res.data.data
-                        this.$message.success("保存成功");
-                        this.editButton = true;
-                        this.optionForm.disabled = true
-                    }).finally(() => {
-                        loading.close();
-                    });
                 } else {
                     return false;
                 }
@@ -1252,4 +1298,5 @@ export default {
 <style lang="scss" scoped>
 ::v-deep .el-form-item {
     margin-bottom: 8px !important;
-}</style>
+}
+</style>