|
|
@@ -5,6 +5,8 @@
|
|
|
<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="nextPage">下一票</el-button>
|
|
|
</div>
|
|
|
<div class="add-customer-btn">
|
|
|
<el-button size="small" :disabled="!form.id" @click="$refs.print.openDialog()">预 览
|
|
|
@@ -20,19 +22,25 @@
|
|
|
@click="inEdit">编 辑
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
- :disabled="isSaveBtn || form.issueStatus == 1 || form.status == 3" @click="submit">保 存
|
|
|
+ :disabled="isSaveBtn || editDisabled" @click="submit">保 存
|
|
|
</el-button>
|
|
|
<el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
- :disabled="form.issueStatus == 1 || form.status == 1" @click="allClick('生成订单')">生成订单
|
|
|
+ :disabled="form.issueStatus == 2" @click="allClick('提交订舱')">提交订舱
|
|
|
</el-button>
|
|
|
- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
- :disabled="form.status != 0 || form.issueStatus == 1" @click="application">运费申请
|
|
|
+ <el-button v-if="form.issueStatus == 2" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
+ size="small" @click="allClick('撤销订舱')">撤销订舱
|
|
|
+ </el-button>
|
|
|
+ <el-button v-if="form.issueStatus == 2" class="el-button--small-yh" style="margin-left: 6px;" type="success"
|
|
|
+ size="small" :disabled="editDisabled" @click="allClick('提单确认')">提单确认
|
|
|
</el-button>
|
|
|
+ <!-- <el-button v-if="form.id" class="el-button--small-yh" style="margin-left: 6px;" type="success" size="small"
|
|
|
+ :disabled="form.status != 0 || form.issueStatus == 1" @click="application">提单确认
|
|
|
+ </el-button> -->
|
|
|
<el-button v-if="form.status == 1" class="el-button--small-yh" style="margin-left: 6px;" type="danger"
|
|
|
size="small" @click="revokeApplication">撤销单据请核
|
|
|
</el-button>
|
|
|
<el-dropdown style="line-height: 0" v-if="importTemplate == 1">
|
|
|
- <el-button size="small" type="warning" style="margin-left: 8px" :disabled="form.status > 0 || showLock">
|
|
|
+ <el-button size="small" type="warning" style="margin-left: 8px" :disabled="editDisabled || showLock">
|
|
|
导入模板<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
</el-button>
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
@@ -41,7 +49,7 @@
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
- <el-dropdown style="line-height: 0">
|
|
|
+ <!-- <el-dropdown style="line-height: 0">
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="warning" :disabled="!form.id"
|
|
|
size="small">
|
|
|
审 批<i class="el-icon-arrow-down el-icon--right"></i>
|
|
|
@@ -50,7 +58,7 @@
|
|
|
<el-dropdown-item @click.native="checkScheduleDialog = true, checkId = form.id">审核进度
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
- </el-dropdown>
|
|
|
+ </el-dropdown> -->
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="margin-top: 50px">
|
|
|
@@ -61,11 +69,11 @@
|
|
|
<el-row>
|
|
|
<el-col span="12">
|
|
|
<el-row>
|
|
|
- <el-form-item label="客户" prop="corpCnName">
|
|
|
- <dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcorps/selectList?status=0¤t=1&size=20" :filterable="true" :remote="true"
|
|
|
- dataName="cnName" @selectChange="dicChange('corpCnName', $event)" :disabled="editDisabled"
|
|
|
- :searchShow="true" :slotRight="true" rightLabel="shortName"></dic-select>
|
|
|
+ <el-form-item label="客服" prop="customerServiceName">
|
|
|
+ <dic-select v-model="form.customerServiceName" placeholder="客服" :key="form.branchId"
|
|
|
+ label="realName" :url="'/blade-user/userListAll?roleAlias=客服&deptId=' + form.branchId"
|
|
|
+ :filterable="true" @selectChange="dicChange('customerServiceName', $event)"
|
|
|
+ :disabled="editDisabled"></dic-select>
|
|
|
</el-form-item>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
@@ -216,28 +224,7 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col span="12">
|
|
|
- <el-form-item label="OP" prop="operatorName"
|
|
|
- :rules="[{ required: true, message: ' ', trigger: 'blur' }]">
|
|
|
- <dic-select v-model="form.operatorName" placeholder="OP" :key="form.branchId" label="realName"
|
|
|
- :url="'/blade-user/userListAll?roleAlias=操作员&deptId=' + form.branchId" :filterable="true"
|
|
|
- @selectChange="dicChange('operatorName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
- <el-col span="12">
|
|
|
- <el-form-item label="客服" prop="customerServiceName">
|
|
|
- <dic-select v-model="form.customerServiceName" placeholder="客服" :key="form.branchId"
|
|
|
- label="realName" :url="'/blade-user/userListAll?roleAlias=客服&deptId=' + form.branchId"
|
|
|
- :filterable="true" @selectChange="dicChange('customerServiceName', $event)"
|
|
|
- :disabled="editDisabled"></dic-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col span="12">
|
|
|
<el-form-item label="货描" prop="cargoType">
|
|
|
- <!-- <dic-select v-model="form.cargoType" placeholder="货描" label="value"
|
|
|
- keyValue="value" :mockData="cargoTypeData"
|
|
|
- :disabled="editDisabled"></dic-select> -->
|
|
|
<el-select v-model="form.cargoType" placeholder="请选择 货描" :disabled="editDisabled" size="small">
|
|
|
<el-option v-for="item in cargoTypeData" :key="item.value" :label="item.label"
|
|
|
:value="item.value">
|
|
|
@@ -247,40 +234,6 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col span="12">
|
|
|
- <el-form-item label="箱属" prop="boxBelongsTo">
|
|
|
- <dic-select v-model="form.boxBelongsTo" placeholder="箱属" key="dictKey" label="dictValue"
|
|
|
- keyValue="dictKey" url="/blade-system/dict-biz/dictionary?code=boxBelongsTo"
|
|
|
- :filterable="true" :disabled="editDisabled"></dic-select>
|
|
|
- </el-form-item>
|
|
|
- </el-col>
|
|
|
- <el-col span="12">
|
|
|
- <el-form-item label="业务来源" prop="srcType">
|
|
|
- <div style="display: flex;">
|
|
|
- <dic-select style="margin-right: 4px;" v-model="form.srcType" placeholder="业务来源" key="dictKey"
|
|
|
- keyValue="dictKey" label="dictValue" :initData="true"
|
|
|
- url="/blade-system/dict-biz/dictionary?code=source_Type" :filterable="true"
|
|
|
- :disabled="editDisabled" @selectChange="dicChange('srcType', $event)"></dic-select>
|
|
|
- <el-input v-show="!form.srcType" v-model="form.srcCnName" placeholder="请选择" :disabled="true"
|
|
|
- size="small">
|
|
|
- </el-input>
|
|
|
- <dic-select v-show="form.srcType == 'OWN'" v-model="form.srcCnName" placeholder="所属公司"
|
|
|
- key="id" label="title" url="/blade-system/dept/lazy-tree?parentId=0" :filterable="true"
|
|
|
- @selectChange="dicChange('OWN', $event)" :disabled="editDisabled"></dic-select>
|
|
|
- <dic-select v-show="form.srcType == 'AGENT'" v-model="form.srcCnName" placeholder="代理"
|
|
|
- key="id" label="cnName" res="records" url="/blade-los/bcorps/listByType?corpTypeName=代理客户"
|
|
|
- :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('AGENT', $event)" :disabled="editDisabled"></dic-select>
|
|
|
- <dic-select v-show="form.srcType == 'SALES'" v-model="form.srcCnName" placeholder="业务员"
|
|
|
- key="id" label="name" url="/blade-user/selectListLos?roles=业务员" :filterable="true"
|
|
|
- :remote="true" dataName="name" @selectChange="dicChange('SALES', $event)"
|
|
|
- :disabled="editDisabled"></dic-select>
|
|
|
- </div>
|
|
|
- </el-form-item>
|
|
|
-
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
- <el-row>
|
|
|
<el-form-item label="订舱备注" prop="cyRemarks">
|
|
|
<el-input type="textarea" style="width: 100%;" v-model="form.cyRemarks" size="small"
|
|
|
autocomplete="off" :disabled="editDisabled" :rows="2" clearable placeholder="请输入场站备注"
|
|
|
@@ -296,8 +249,8 @@
|
|
|
:header-cell-class-name="headerClassName" :row-style="{ height: '20px', padding: '0px' }"
|
|
|
:cell-style="{ height: '20px', padding: '0px' }" @selection-change="selectionChange"
|
|
|
@select="selectHandle" @row-update="rowUpdate"
|
|
|
- @resetColumn="resetColumn('crud', 'option', 'optionBack', 502)"
|
|
|
- @saveColumn="saveColumn('crud', 'option', 'optionBack', 502)">
|
|
|
+ @resetColumn="resetColumn('crud', 'option', 'optionBack', 512)"
|
|
|
+ @saveColumn="saveColumn('crud', 'option', 'optionBack', 512)">
|
|
|
<template slot="menuLeft">
|
|
|
<el-button type="info" plain size="small" :disabled="editDisabled || !form.id"
|
|
|
@click="allClick('一键保存')">一键保存</el-button>
|
|
|
@@ -305,9 +258,6 @@
|
|
|
@click="allClick('一键编辑')">一键编辑</el-button>
|
|
|
<el-button type="danger" plain size="small" :disabled="editDisabled || selectionList.length == 0"
|
|
|
@click="allClick('批量删除')">批量删除</el-button>
|
|
|
- <el-button type="success" plain size="small"
|
|
|
- :disabled="editDisabled || form.preContainersList.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
|
|
|
@@ -462,7 +412,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, submitBookingCabin, sendMessageBooking, copyAgent, pleaseCheck, repealCancel, submitItemList, itemRemove, submitFeeList, itemFeeRemove } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
+import { submit, getDetail, submitConfirm, submitCustomerBooking, revokeCustomerBooking, submitBookingCabin, sendMessageBooking, copyAgent, pleaseCheck, repealCancel, submitItemList, itemRemove, submitFeeList, itemFeeRemove } from "@/api/iosBasicData/businessCenter/bookingCabin.js";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
import businessReports from "@/components/boxManagement/businessReportsTS.vue";
|
|
|
@@ -586,8 +536,8 @@ export default {
|
|
|
form: {
|
|
|
branchId: JSON.parse(localStorage.getItem('sysitemData')).deptId,
|
|
|
branchName: JSON.parse(localStorage.getItem('sysitemData')).deptName,
|
|
|
- customerServiceName: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_name, // OP 默认登录人
|
|
|
- customerServiceId: JSON.parse(localStorage.getItem('saber-userInfo')).content.user_id,
|
|
|
+ customerServiceName: JSON.parse(localStorage.getItem('sysitemData')).name, // OP 默认登录人
|
|
|
+ customerServiceId: JSON.parse(localStorage.getItem('sysitemData')).id,
|
|
|
businessType: 'KHTS',
|
|
|
billNoFormat: 'KHTS',
|
|
|
businessTypeCode: 'KHTS',
|
|
|
@@ -735,44 +685,6 @@ export default {
|
|
|
trigger: 'blur'
|
|
|
}
|
|
|
]
|
|
|
- },
|
|
|
- {
|
|
|
- label: "海运费",
|
|
|
- prop: "oceanFreight",
|
|
|
- overHidden: true,
|
|
|
- cell: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "销售价",
|
|
|
- prop: "salesPrice",
|
|
|
- overHidden: true,
|
|
|
- cell: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "制单人",
|
|
|
- prop: "createUserName",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "制单日期",
|
|
|
- prop: "createTime",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "修改人",
|
|
|
- prop: "updateUserName",
|
|
|
- overHidden: true
|
|
|
- },
|
|
|
- {
|
|
|
- label: "修改日期",
|
|
|
- prop: "updateTime",
|
|
|
- overHidden: true,
|
|
|
- },
|
|
|
- {
|
|
|
- label: "备注",
|
|
|
- prop: "remarks",
|
|
|
- cell: true,
|
|
|
- overHidden: true
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
@@ -1064,12 +976,16 @@ export default {
|
|
|
DistributionBox
|
|
|
},
|
|
|
props: {
|
|
|
- detailData: Object
|
|
|
+ detailData: Object,
|
|
|
+ pageIds: {
|
|
|
+ type: Array, // 指定 prop 的类型为 Array
|
|
|
+ default: () => [], // 提供一个默认值,这里使用函数形式返回一个空数组
|
|
|
+ }
|
|
|
},
|
|
|
async created() {
|
|
|
this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
|
|
|
this.roleName = localStorage.getItem('roleName').split(',')
|
|
|
- this.option = await this.getColumnData(this.getColumnName(502), this.optionBack);
|
|
|
+ this.option = await this.getColumnData(this.getColumnName(512), this.optionBack);
|
|
|
this.feecOption = await this.getColumnData(this.getColumnName(235.2), this.feecOptionBack);
|
|
|
this.saveLocalCurrency(JSON.parse(localStorage.getItem('sysitemData')).deptId)
|
|
|
isProcurement({ "param": "import.template" }).then(res => {
|
|
|
@@ -1098,6 +1014,42 @@ export default {
|
|
|
this.saveLocalCurrency(this.deptId)
|
|
|
},
|
|
|
methods: {
|
|
|
+ lastPage() {
|
|
|
+ if (this.pageIds.length) {
|
|
|
+ const index = this.pageIds.indexOf(this.form.id)
|
|
|
+ if (index == 0) {
|
|
|
+ return this.$message.error('没有上一票了');
|
|
|
+ }
|
|
|
+ const lastIndex = index - 1
|
|
|
+ // if (this.form.id) {
|
|
|
+ // this.unLock({
|
|
|
+ // moduleName: "SE",
|
|
|
+ // tableName: "SE_order",
|
|
|
+ // billId: this.form.id,
|
|
|
+ // billNo: this.form.mblno
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ this.getDetails(this.pageIds[lastIndex])
|
|
|
+ }
|
|
|
+ },
|
|
|
+ nextPage() {
|
|
|
+ if (this.pageIds.length) {
|
|
|
+ const index = this.pageIds.indexOf(this.form.id)
|
|
|
+ if (this.pageIds[this.pageIds.length - 1] == this.form.id) {
|
|
|
+ return this.$message.error('没有下一票了');
|
|
|
+ }
|
|
|
+ const nextIndex = index + 1
|
|
|
+ // if (this.form.id) {
|
|
|
+ // this.unLock({
|
|
|
+ // moduleName: "SE",
|
|
|
+ // tableName: "SE_order",
|
|
|
+ // billId: this.form.id,
|
|
|
+ // billNo: this.form.mblno
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ this.getDetails(this.pageIds[nextIndex])
|
|
|
+ }
|
|
|
+ },
|
|
|
// 提取箱专用的保存
|
|
|
billsAddfun() {
|
|
|
billsAdd(this.form).then(res => {
|
|
|
@@ -1286,9 +1238,15 @@ export default {
|
|
|
if (name == 'customerServiceName') {
|
|
|
if (row) {
|
|
|
this.form.customerServiceId = row.id
|
|
|
+ this.form.srcId = row.id
|
|
|
+ this.form.srcEnName = row.name
|
|
|
+ this.form.srcCnName = row.name
|
|
|
} else {
|
|
|
this.form.customerServiceName = null
|
|
|
this.form.customerServiceId = null
|
|
|
+ this.form.srcId = null
|
|
|
+ this.form.srcEnName = null
|
|
|
+ this.form.srcCnName = null
|
|
|
}
|
|
|
}
|
|
|
if (name == 'polCnName') {
|
|
|
@@ -1450,10 +1408,13 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
this.form = res.data.data
|
|
|
- if (res.data.data.issueStatus == 1 || res.data.data.status == 1 || res.data.data.status == 2 || res.data.data.status == 3) {
|
|
|
+ if (res.data.data.confirmStatus == 1) {
|
|
|
// this.editButton = true
|
|
|
this.editDisabled = true
|
|
|
this.optionForm.disabled = true
|
|
|
+ } else {
|
|
|
+ this.editDisabled = false
|
|
|
+ this.optionForm.disabled = false
|
|
|
}
|
|
|
}).finally(() => {
|
|
|
loading.close()
|
|
|
@@ -1694,6 +1655,87 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
+ if (name == '提交订舱') {
|
|
|
+ if (!this.form.preContainersList.length) {
|
|
|
+ return this.$message.error("集装箱明细不能为空");
|
|
|
+ }
|
|
|
+ for (let item of this.form.preContainersList) {
|
|
|
+ if (!item.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ if (!item.cntrTypeCode || !item.quantity) {
|
|
|
+ this.$refs.crud.rowCell(item, item.$index)
|
|
|
+ return this.$message.error("请完善明细信息");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for (let item of this.form.containersList) {
|
|
|
+ if (!item.id) {
|
|
|
+ return this.$message.error("请保存数据");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$confirm("是否提交订舱?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ this.form.businessType = 'KHTS'
|
|
|
+ this.form.billNoFormat = 'KHTS'
|
|
|
+ this.form.businessTypeCode = 'KHTS'
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitCustomerBooking(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+ if (name == '撤销订舱') {
|
|
|
+ this.$confirm("是否撤销订舱?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ revokeCustomerBooking(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ if (name == '提单确认') {
|
|
|
+ this.$confirm("是否提单确认?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitConfirm(this.form).then(res => {
|
|
|
+ this.$message.success("操作成功");
|
|
|
+ this.getDetails(this.form.id)
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close();
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
submit(type) {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
@@ -1739,7 +1781,7 @@ export default {
|
|
|
if (!this.form.preContainersList.length) {
|
|
|
return this.$message.error("集装箱明细不能为空");
|
|
|
}
|
|
|
- this.$confirm("确定运费申请?", {
|
|
|
+ this.$confirm("是否提单确认?", {
|
|
|
confirmButtonText: "确定",
|
|
|
cancelButtonText: "取消",
|
|
|
type: "warning"
|
|
|
@@ -1747,9 +1789,9 @@ export default {
|
|
|
let obj = {}
|
|
|
obj = {
|
|
|
id: this.form.id,
|
|
|
- url: '/iosBasicData/businessCenter/customerLetter/index',
|
|
|
+ url: '/iosBasicData/businessCenter/customerBooking/index',
|
|
|
pageStatus: '',
|
|
|
- pageLabel: '客户托书 ',
|
|
|
+ pageLabel: '客户订舱 ',
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|