|
|
@@ -38,8 +38,9 @@
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
<tempalte slot="corpCnName">
|
|
|
<dic-select v-model="form.corpCnName" placeholder="客户" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('corpCnName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('corpCnName', $event)"
|
|
|
+ :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="polCnName">
|
|
|
<dic-select v-model="form.polCnName" placeholder="起运港" key="id" label="cnName" res="records"
|
|
|
@@ -58,13 +59,15 @@
|
|
|
</tempalte>
|
|
|
<tempalte slot="hshipperCnName">
|
|
|
<dic-select v-model="form.hshipperCnName" placeholder="发货人" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcorps/listByType?corpTypeName=外国工厂" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('hshipperCnName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ url="/blade-los/bcorps/listByType?corpTypeName=国外工厂" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('hshipperCnName', $event)"
|
|
|
+ :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="hconsigneeCnName">
|
|
|
<dic-select v-model="form.hconsigneeCnName" placeholder="收货人" key="id" label="cnName" res="records"
|
|
|
- url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true" :remote="true" dataName="cnName"
|
|
|
- @selectChange="dicChange('hconsigneeCnName', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ url="/blade-los/bcorps/listByType?corpTypeName=国内贸易商" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('hconsigneeCnName', $event)"
|
|
|
+ :disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
<tempalte slot="carrierCnName">
|
|
|
<dic-select v-model="form.carrierCnName" placeholder="船公司" key="id" label="cnName" res="records"
|
|
|
@@ -89,8 +92,7 @@
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 388)">
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
- @click="rowCell('编辑', row, index)">编
|
|
|
- 辑</el-button>
|
|
|
+ @click="rowCell('箱编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
@click="rowCell('派车', row, index)">派
|
|
|
车</el-button>
|
|
|
@@ -135,12 +137,11 @@
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text"
|
|
|
:disabled="editDisabled || row.whetherDispatchVehicles == 1 || row.whetherWarehouseEntry == 1"
|
|
|
- @click="rowCell('编辑', row, index)">编
|
|
|
- 辑</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1"
|
|
|
+ @click="rowCell('派车编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.whetherDispatchVehicles == 1||row.$cellEdit"
|
|
|
@click="rowCell('确认派车', row, index)">确
|
|
|
认</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.whetherWarehouseEntry == 1"
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.whetherWarehouseEntry == 1||row.$cellEdit"
|
|
|
@click="rowCell('生成入库', row, index)">入
|
|
|
库</el-button>
|
|
|
<!-- <el-button size="small" type="text"
|
|
|
@@ -161,12 +162,11 @@
|
|
|
</template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
- @click="rowCell('编辑', row, index)">编
|
|
|
- 辑</el-button>
|
|
|
- <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
+ @click="rowCell('入库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
+ <el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1||row.$cellEdit"
|
|
|
@click="rowCell('入库确认', row, index)">入库确认</el-button>
|
|
|
<el-button size="small" type="text"
|
|
|
- :disabled="editDisabled || (row.whetherInOutStorage == 1 && row.surplusQuantity == 0)"
|
|
|
+ :disabled="editDisabled || (row.whetherInOutStorage == 1 && row.surplusQuantity == 0)||row.$cellEdit"
|
|
|
@click="rowCell('生成出库', row, index)">出
|
|
|
库</el-button>
|
|
|
<!-- <el-button size="small" type="text"
|
|
|
@@ -181,8 +181,7 @@
|
|
|
@saveColumn="saveColumn('crud4', 'option4', 'optionBack4', 391)">
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
- @click="rowCell('编辑', row, index)">编
|
|
|
- 辑</el-button>
|
|
|
+ @click="rowCell('出库编辑', row, index)">{{ row.$cellEdit ? '保 存' : '编 辑' }}</el-button>
|
|
|
<el-button size="small" type="text" :disabled="editDisabled || row.confirmDispatchVehicles == 1"
|
|
|
@click="rowCell('出库确认', row, index)">出库确认</el-button>
|
|
|
<el-button size="small" type="text" :disabled="editDisabled" @click="rowCell('开票', row, index)">开
|
|
|
@@ -199,7 +198,7 @@
|
|
|
<c-upload :data="form.filesCenterList" :enumerationValue="76"
|
|
|
deleteUrl="/blade-purchase-sales/orderfiles/update" display :disabled="editDisabled"></c-upload>
|
|
|
</div>
|
|
|
- <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务"></business-reports>
|
|
|
+ <business-reports :id="form.id" ref="print" businessValue="HYJK" classifyCode="业务"></business-reports>
|
|
|
<!--审核弹窗-->
|
|
|
<el-dialog append-to-body title="审批进度" class="el-dialogDeep" :visible.sync="checkScheduleDialog" width="40%"
|
|
|
:close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
|
|
|
@@ -209,7 +208,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
+import { submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2 } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
@@ -1164,9 +1163,65 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
rowCell(name, row, index) {
|
|
|
- if (name == '编辑') {
|
|
|
- console.log(2232323)
|
|
|
+ if (name == '箱编辑') {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == '派车编辑') {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitList1(this.form.dispatchVehiclesList).then(res => {
|
|
|
+ this.form.dispatchVehiclesList = res.data.data
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == '入库编辑') {
|
|
|
+ if (row.$cellEdit == true) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitList2(this.form.inStorageList).then(res => {
|
|
|
+ this.form.inStorageList = res.data.data
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
+ this.$set(row, "$cellEdit", false);
|
|
|
+ } else {
|
|
|
+ this.$set(row, "$cellEdit", true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == '出库编辑') {
|
|
|
if (row.$cellEdit == true) {
|
|
|
+ const loading = this.$loading({
|
|
|
+ lock: true,
|
|
|
+ text: '加载中',
|
|
|
+ spinner: 'el-icon-loading',
|
|
|
+ background: 'rgba(255,255,255,0.7)'
|
|
|
+ });
|
|
|
+ submitList2(this.form.outStorageList).then(res => {
|
|
|
+ this.form.outStorageList = res.data.data
|
|
|
+ this.$message.success("保存成功");
|
|
|
+ }).finally(() => {
|
|
|
+ loading.close()
|
|
|
+ })
|
|
|
this.$set(row, "$cellEdit", false);
|
|
|
} else {
|
|
|
this.$set(row, "$cellEdit", true);
|
|
|
@@ -1174,11 +1229,8 @@ export default {
|
|
|
}
|
|
|
if (name == '派车') {
|
|
|
if (row.whetherMachineInspection == 1) {
|
|
|
- if (!row.inspectionType) {
|
|
|
- return this.$message.error("查验类型不能为空");
|
|
|
- }
|
|
|
- if (!row.inspectionDate) {
|
|
|
- return this.$message.error("查验时间不能为空");
|
|
|
+ if (!row.inspectionType || !row.inspectionDate) {
|
|
|
+ return this.$message.error((!row.inspectionType ? "查验类型," : '') + (!row.inspectionDate ? "查验时间" : '') + "不能为空");
|
|
|
}
|
|
|
}
|
|
|
let obj = {
|
|
|
@@ -1232,23 +1284,8 @@ export default {
|
|
|
// })
|
|
|
// }
|
|
|
if (name == '确认派车') {
|
|
|
- if (!row.fleetName) {
|
|
|
- return this.$message.error("承运车队不能为空");
|
|
|
- }
|
|
|
- if (!row.licenseNumber) {
|
|
|
- return this.$message.error("车号不能为空");
|
|
|
- }
|
|
|
- if (!row.fullName) {
|
|
|
- return this.$message.error("姓名不能为空");
|
|
|
- }
|
|
|
- if (!row.contactInformation) {
|
|
|
- return this.$message.error("联系方式不能为空");
|
|
|
- }
|
|
|
- if (!row.deliveryDate) {
|
|
|
- return this.$message.error("送货时间不能为空");
|
|
|
- }
|
|
|
- if (!row.deliveryAddressName) {
|
|
|
- return this.$message.error("送货地点不能为空");
|
|
|
+ if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
|
|
|
+ return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -1264,23 +1301,8 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '生成入库') {
|
|
|
- if (!row.fleetName) {
|
|
|
- return this.$message.error("承运车队不能为空");
|
|
|
- }
|
|
|
- if (!row.licenseNumber) {
|
|
|
- return this.$message.error("车号不能为空");
|
|
|
- }
|
|
|
- if (!row.fullName) {
|
|
|
- return this.$message.error("姓名不能为空");
|
|
|
- }
|
|
|
- if (!row.contactInformation) {
|
|
|
- return this.$message.error("联系方式不能为空");
|
|
|
- }
|
|
|
- if (!row.deliveryDate) {
|
|
|
- return this.$message.error("送货时间不能为空");
|
|
|
- }
|
|
|
- if (!row.deliveryAddressName) {
|
|
|
- return this.$message.error("送货地点不能为空");
|
|
|
+ if (!row.fleetName || !row.licenseNumber || !row.fullName || !row.contactInformation || !row.deliveryDate || !row.deliveryAddressName) {
|
|
|
+ return this.$message.error((!row.fleetName ? "承运车队," : '') + (!row.licenseNumber ? "车号," : '') + (!row.fullName ? "姓名," : '') + (!row.contactInformation ? "联系方式," : '') + (!row.deliveryDate ? "送货时间," : null) + (!row.deliveryAddressName ? "送货地点" : null) + "不能为空");
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -1296,11 +1318,8 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '入库确认') {
|
|
|
- if (!this.form.eta) {
|
|
|
- return this.$message.error("实际到港不能为空");
|
|
|
- }
|
|
|
- if (!row.warehouseName) {
|
|
|
- return this.$message.error("仓库不能为空");
|
|
|
+ if (!this.form.eta || !row.warehouseName) {
|
|
|
+ return this.$message.error((!this.form.eta ? "基础信息的实际到港," : '') + (!row.warehouseName ? "仓库" : '') + "不能为空");
|
|
|
}
|
|
|
calculationWarehouseUnitPrice(row).then(res => {
|
|
|
this.$confirm(res.data.data, '提示', {
|
|
|
@@ -1326,11 +1345,8 @@ export default {
|
|
|
|
|
|
}
|
|
|
if (name == '生成出库') {
|
|
|
- if (!row.warehouseName) {
|
|
|
- return this.$message.error("仓库不能为空");
|
|
|
- }
|
|
|
- if (!row.warehouseUnitPrice) {
|
|
|
- return this.$message.error("仓储单价不能为空");
|
|
|
+ if (!row.warehouseName || !row.warehouseUnitPrice) {
|
|
|
+ return this.$message.error((!row.warehouseName ? "仓库," : '') + (!row.warehouseUnitPrice ? "仓储单价" : '') + "不能为空");
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
@@ -1346,11 +1362,8 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '出库确认') {
|
|
|
- if (!row.outQuantity) {
|
|
|
- return this.$message.error("出库件数不能为空");
|
|
|
- }
|
|
|
- if (!row.outWeight) {
|
|
|
- return this.$message.error("出库重量不能为空");
|
|
|
+ if (!row.outQuantity || !row.outWeight) {
|
|
|
+ return this.$message.error((!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
|
|
|
}
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|