|
@@ -318,6 +318,8 @@
|
|
|
</el-button>
|
|
|
<el-button type="primary" size="small" plain @click="CopyDocumentsfun">复制单据
|
|
|
</el-button>
|
|
|
+ <el-button type="primary" size="small" @click="allClick('修改单据类型')">修改单据类型
|
|
|
+ </el-button>
|
|
|
<el-button type="success" size="small" plain @click="increaseMawb">分单->主单
|
|
|
</el-button>
|
|
|
<el-button type="warning" size="small" plain v-if="query.billStatus == 0" @click="Disembarkingfun">退
|
|
@@ -352,7 +354,8 @@
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
- <el-button type="primary" size="small" @click="updateField" :disabled="selectionList.length === 0">批量更改
|
|
|
+ <el-button type="primary" size="small" @click="updateField"
|
|
|
+ :disabled="selectionList.length === 0">批量更改
|
|
|
</el-button>
|
|
|
<div style="margin-top: 10px">
|
|
|
<el-tabs type="card" v-model="query.billStatus" @tab-click="handleClick">
|
|
@@ -589,23 +592,24 @@ import {
|
|
|
billsRemove,
|
|
|
billsRevokeDisembarking,
|
|
|
billsSubmit,
|
|
|
- editypesSendingEdi
|
|
|
+ editypesSendingEdi,
|
|
|
+ updateBillType
|
|
|
} from "@/api/iosBasicData/bills";
|
|
|
-import {mapGetters} from "vuex";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
import billsDetails from "@/views/iosBasicData/SeafreightExportF/bills/billsDetails.vue";
|
|
|
import feesTemplateItems from "@/views/iosBasicData/losbfeestemplate/feesTemplateItems.vue";
|
|
|
import SplitList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/SplitList.vue";
|
|
|
-import {getWorkDicts} from "@/api/system/dictbiz";
|
|
|
-import {defaultDate} from "@/util/date";
|
|
|
+import { getWorkDicts } from "@/api/system/dictbiz";
|
|
|
+import { defaultDate } from "@/util/date";
|
|
|
import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
|
|
|
-import {editypesList} from "@/api/iosBasicData/editypes";
|
|
|
-import {getBvesselsList} from "@/api/iosBasicData/bvessels";
|
|
|
-import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
|
|
|
-import {bportsList} from "@/api/iosBasicData/bports";
|
|
|
-import {blinesList} from "@/api/iosBasicData/blines";
|
|
|
+import { editypesList } from "@/api/iosBasicData/editypes";
|
|
|
+import { getBvesselsList } from "@/api/iosBasicData/bvessels";
|
|
|
+import { getBcorpslistByType } from "@/api/iosBasicData/bcorps";
|
|
|
+import { bportsList } from "@/api/iosBasicData/bports";
|
|
|
+import { blinesList } from "@/api/iosBasicData/blines";
|
|
|
import TreeSelect from "@/components/iosbasic-data/TreeSelect.vue";
|
|
|
-import {getDeptTree} from "@/api/system/dept";
|
|
|
-import {getToken} from "@/util/auth";
|
|
|
+import { getDeptTree } from "@/api/system/dept";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
import UpdateBatchField from "@/views/iosBasicData/SeafreightExportF/bills/updateBatchField.vue";
|
|
|
|
|
|
export default {
|
|
@@ -1712,7 +1716,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
|
|
|
- updateField(){
|
|
|
+ updateField() {
|
|
|
this.$refs.updateFieldRef.formData.ids = this.selectionList.map(item => item.id)
|
|
|
this.$refs.updateFieldRef.dialogVisible = true
|
|
|
},
|
|
@@ -2085,6 +2089,81 @@ export default {
|
|
|
this.isShow = false;
|
|
|
this.$store.commit("IN_SEAFE_DETAIL");
|
|
|
},
|
|
|
+ allClick(name) {
|
|
|
+ if (name == '修改单据类型') {
|
|
|
+ if (this.selectionList.length !== 1) {
|
|
|
+ this.$message.warning("请选择一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ for (let item of this.selectionList) {
|
|
|
+ if (item.status != 0) {
|
|
|
+ return this.$message.error("请选择未审核的单据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$DialogForm.show({
|
|
|
+ title: "修改单据类型",
|
|
|
+ width: "300px",
|
|
|
+ menuPosition: "right",
|
|
|
+ option: {
|
|
|
+ submitText: "确认",
|
|
|
+ emptyText: "取消",
|
|
|
+ span: 24,
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "单据类型",
|
|
|
+ prop: "billType",
|
|
|
+ type: 'select',
|
|
|
+ dicData: [
|
|
|
+ {
|
|
|
+ label: "直单",
|
|
|
+ value: "DD"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "主单",
|
|
|
+ value: "MM"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "分单",
|
|
|
+ value: "MH"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ span: 24
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ beforeClose: done => {
|
|
|
+ done();
|
|
|
+ },
|
|
|
+ callback: res => {
|
|
|
+ res.done();
|
|
|
+ // this.detailData.seeDisabled = false;
|
|
|
+ // this.detailData.id = this.selectionList[0].id;
|
|
|
+ // this.isShow = false;
|
|
|
+ let obj = {
|
|
|
+ ids: this.selectionList[0].id,
|
|
|
+ billType: res.data.billType
|
|
|
+ }
|
|
|
+ updateBillType(obj).then(res => {
|
|
|
+ this.refreshChange()
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ })
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // this.$refs.billsDetails.pageLoading = true;
|
|
|
+ // this.$refs.billsDetails.billsCopyBillsfun(
|
|
|
+ // this.selectionList[0].id,
|
|
|
+ // res.data.checkbox
|
|
|
+ // );
|
|
|
+ // });
|
|
|
+ // this.$store.commit("IN_SEAFE_DETAIL");
|
|
|
+ res.close();
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
+ },
|
|
|
// 复制单据
|
|
|
CopyDocumentsfun() {
|
|
|
if (this.selectionList.length !== 1) {
|