|
@@ -215,19 +215,19 @@
|
|
|
</template>
|
|
|
<template slot="cntrTypeCodeHeader" slot-scope="{column}">
|
|
|
<span style="color: #1e9fff;cursor: pointer;" @click="inJump('箱型')">{{ (column || {}).label
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="goodsNameHeader" slot-scope="{column}">
|
|
|
<span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="hsCodeHeader" slot-scope="{column}">
|
|
|
<span style="color: #1e9fff;cursor: pointer;" @click="inJump('HSCODE')">{{ (column || {}).label
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="goodsTypeHeader" slot-scope="{column}">
|
|
|
<span style="color: #1e9fff;cursor: pointer;" @click="inJump('类型')">{{ (column || {}).label
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="index" slot-scope="{row,index}">
|
|
|
<span>{{ index + 1 }}</span>
|
|
@@ -365,7 +365,7 @@
|
|
|
@saveColumn="saveColumn('crud3', 'option3', 'optionBack3', 390)">
|
|
|
<template slot="storageUnitHeader" slot-scope="{column}">
|
|
|
<span style="color: #1e9fff;cursor: pointer;" @click="inJump('入库单位')">{{ (column || {}).label
|
|
|
- }}</span>
|
|
|
+ }}</span>
|
|
|
</template>
|
|
|
<template slot="warehouseName" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.warehouseName" placeholder="入库" key="id"
|
|
@@ -493,13 +493,27 @@
|
|
|
<el-button type="primary" @click="ckSubmit(ckForm)">确 定</el-button>
|
|
|
</span>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog append-to-body title="库存预警" :visible.sync="yjVisible" width="60%" :close-on-click-modal="false"
|
|
|
+ v-dialog-drag>
|
|
|
+ <span>
|
|
|
+ <span style="font-size: 16px;color:#F56C6C">{{ yjForm.content }}</span> <br>
|
|
|
+ <span> <el-button type="warning" size="small" @click="outExport">导 出
|
|
|
+ </el-button></span>
|
|
|
+
|
|
|
+ <avue-crud :option="yhOption" :data="yjForm.feeCenterList"></avue-crud>
|
|
|
+ </span>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="yjVisible = false">取 消</el-button>
|
|
|
+ <el-button type="primary" @click="yjSubmit(rowForm)">确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
<dictbiz-dialog ref="dictbiz" :title="dicTitle" :code="dicCode" :parentId="parentId" @closed="getAllWorkDicts">
|
|
|
</dictbiz-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
+import { storagefeeitems, submit, getDetail, detailTradeByMblno, remove, checkAgent, revokeCheckAgent, copyAgent, generateDispatchVehicles, confirmDispatchVehicles, generateWarehouseEntry, confirmWarehouseEntry, generateOutbound, dispatchvehiclesRemove, inoutstorageRemove, calculationWarehouseUnitPrice, billsCopyBills, submitList1, submitList2, revokePrecontainers, revokeDispatchVehicles, revokeWarehouseEntry, revokeInoutstorage, revokeOutbound, confirmInspection, revokeInspection, confirmReturnBox, revokeReturnBox, inventoryAlert } from "@/api/tradeAgency/oceanFreightImport";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import feeInfo from "@/components/tradeAgency/fee-oceanFreight";
|
|
|
import reports from "@/components/tradeAgency/reportsJK.vue";
|
|
@@ -507,11 +521,86 @@ import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
import businessReports from "@/components/tradeAgency/businessReportsJK.vue";
|
|
|
import { precontainersRemove } from "@/api/iosBasicData/ReceivingOrders/precontainers";
|
|
|
+import { getToken } from "@/util/auth";
|
|
|
import _ from "lodash";
|
|
|
export default {
|
|
|
name: "detailsPage",
|
|
|
data() {
|
|
|
return {
|
|
|
+ rowForm: {},
|
|
|
+ yjForm: {
|
|
|
+ feeCenterList: []
|
|
|
+ },
|
|
|
+ yjVisible: false,
|
|
|
+ yhOption: {
|
|
|
+ menu: false,
|
|
|
+ header: false,
|
|
|
+ align: 'center',
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "业务类型",
|
|
|
+ prop: "businessType",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [{
|
|
|
+ label: '海运进口',
|
|
|
+ value: 'SI',
|
|
|
+ }, {
|
|
|
+ label: '海运出口',
|
|
|
+ value: 'SE',
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "合同号",
|
|
|
+ prop: "bookingNo",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "提单号",
|
|
|
+ prop: "mblno",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "往来单位",
|
|
|
+ prop: "corpCnName",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "费用名称",
|
|
|
+ prop: "feeCnName",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "未收金额",
|
|
|
+ prop: "unsettledAmount",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "业务时间",
|
|
|
+ prop: "billDate",
|
|
|
+ width: "100",
|
|
|
+ overHidden: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "账单",
|
|
|
+ prop: "accStatus",
|
|
|
+ width: '80',
|
|
|
+ overHidden: true,
|
|
|
+ dicData: [{
|
|
|
+ label: '否',
|
|
|
+ value: 0
|
|
|
+ }, {
|
|
|
+ label: '是',
|
|
|
+ value: 1
|
|
|
+ }]
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
ckForm: {
|
|
|
// id: null,
|
|
|
// returnDate: null,
|
|
@@ -1858,6 +1947,17 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ yjSubmit(row) {
|
|
|
+ storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
|
|
|
+ this.ckForm = {
|
|
|
+ ...row,
|
|
|
+ storageFeePriceD: res.data.data.price,
|
|
|
+ storageFeePriceC: res.data.data.priceC
|
|
|
+ }
|
|
|
+ this.yjVisible = false
|
|
|
+ this.ckVisible = true
|
|
|
+ })
|
|
|
+ },
|
|
|
ckSubmit(row) {
|
|
|
if (row.storageFeePriceD == 0 || row.storageFeePriceD == null || row.storageFeePriceC == 0 || row.storageFeePriceC == null) return this.$message.success("仓储费单价收和仓储费单价付不能为空或0");
|
|
|
const loading = this.$loading({
|
|
@@ -2041,7 +2141,7 @@ export default {
|
|
|
rowCell(name, row, index) {
|
|
|
if (name == '箱编辑') {
|
|
|
if (row.$cellEdit == true) {
|
|
|
- if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight| !row.grossWeight || !row.amount) {
|
|
|
+ if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight | !row.grossWeight || !row.amount) {
|
|
|
return this.$message.error((!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
|
|
|
}
|
|
|
this.$set(row, "$cellEdit", false);
|
|
@@ -2108,6 +2208,9 @@ export default {
|
|
|
}
|
|
|
if (name == '出库编辑') {
|
|
|
if (row.$cellEdit == true) {
|
|
|
+ if (this.compareDates(row.outStorageDate, row.storageDate)) {
|
|
|
+ return this.$message.error("出库日期不能早于入库日期");
|
|
|
+ }
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
|
text: '加载中',
|
|
@@ -2408,6 +2511,13 @@ export default {
|
|
|
if (!row.outStorageDate || !row.outQuantity || !row.outWeight) {
|
|
|
return this.$message.error((!row.outStorageDate ? "出库时间," : '') + (!row.outQuantity ? "出库件数," : '') + (!row.outWeight ? "出库重量" : '') + "不能为空");
|
|
|
}
|
|
|
+ if (this.compareDates(row.outStorageDate, row.storageDate)) {
|
|
|
+ return this.$message.error("出库日期不能早于入库日期");
|
|
|
+ }
|
|
|
+ this.rowForm = {}
|
|
|
+ this.yjForm = {
|
|
|
+ feeCenterList: []
|
|
|
+ }
|
|
|
if (row.confirmDispatchVehicles == 1) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
@@ -2422,14 +2532,23 @@ export default {
|
|
|
loading.close()
|
|
|
})
|
|
|
} else {
|
|
|
- storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
|
|
|
- this.ckForm = {
|
|
|
- ...row,
|
|
|
- storageFeePriceD: res.data.data.price,
|
|
|
- storageFeePriceC: res.data.data.priceC
|
|
|
+ inventoryAlert(row).then(res => {
|
|
|
+ if (res.data.data.status == true) {
|
|
|
+ this.rowForm = row
|
|
|
+ this.yjForm = res.data.data
|
|
|
+ this.yjVisible = true
|
|
|
+ } else {
|
|
|
+ storagefeeitems({ pid: row.warehouseId, goodsType: row.goodsType }).then(res => {
|
|
|
+ this.ckForm = {
|
|
|
+ ...row,
|
|
|
+ storageFeePriceD: res.data.data.price,
|
|
|
+ storageFeePriceC: res.data.data.priceC
|
|
|
+ }
|
|
|
+ this.ckVisible = true
|
|
|
+ })
|
|
|
}
|
|
|
- this.ckVisible = true
|
|
|
})
|
|
|
+
|
|
|
// const loading = this.$loading({
|
|
|
// lock: true,
|
|
|
// text: '加载中',
|
|
@@ -2463,6 +2582,39 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
+ compareDates(date1, date2) {
|
|
|
+ const d1 = new Date(date1);
|
|
|
+ const d2 = new Date(date2);
|
|
|
+ if (d1 >= d2) {
|
|
|
+ return false;
|
|
|
+ } else if (d1 < d2) {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ outExport() {
|
|
|
+ let config = { params: { ...this.query } }
|
|
|
+ if (config.params) {
|
|
|
+ for (const propName of Object.keys(config.params)) {
|
|
|
+ const value = config.params[propName];
|
|
|
+ if (value !== null && typeof (value) !== "undefined") {
|
|
|
+ if (value instanceof Array) {
|
|
|
+ for (const key of Object.keys(value)) {
|
|
|
+ let params = propName + '[' + key + ']';
|
|
|
+ config.params[params] = value[key]
|
|
|
+ }
|
|
|
+ delete config.params[propName]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const routeData = this.$router.resolve({
|
|
|
+ path: '/api/blade-los/inoutstorage/inventoryAlertExport', //跳转目标窗口的地址
|
|
|
+ query: {
|
|
|
+ id: this.rowForm.id,
|
|
|
+ }
|
|
|
+ })
|
|
|
+ window.open(routeData.href.slice(1, routeData.href.length) + '&' + `${this.website.tokenHeader}=${getToken()}`);
|
|
|
+ },
|
|
|
getDetails(id) {
|
|
|
const loading = this.$loading({
|
|
|
lock: true,
|
|
@@ -2513,7 +2665,7 @@ export default {
|
|
|
if (valid) {
|
|
|
for (let row of this.form.preContainersList) {
|
|
|
if (!row.cntrTypeCode || !row.boxNo || !row.goodsName || !row.goodsType || !row.number || !row.netWeight || !row.grossWeight || !row.amount) {
|
|
|
- return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '')+ (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
|
|
|
+ return this.$message.error("箱信息:" + (!row.cntrTypeCode ? "箱型," : '') + (!row.boxNo ? "箱号," : '') + (!row.goodsName ? "品名," : '') + (!row.goodsType ? "类型," : '') + (!row.number ? "件数," : '') + (!row.netWeight ? "净重," : '') + (!row.grossWeight ? "毛重," : '') + (!row.amount ? "总金额" : '') + "不能为空");
|
|
|
}
|
|
|
}
|
|
|
if (this.$refs.feeInfo.submitValidate()) {
|