|
@@ -219,6 +219,17 @@
|
|
|
v-hasPermi="['basicdata:yard:list']"
|
|
|
>取消</el-button>
|
|
|
</el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="copyAdded"
|
|
|
+ v-hasPermi="['basicdata:yard:list']"
|
|
|
+ >克隆</el-button>
|
|
|
+ </el-col>
|
|
|
<el-col style="position: absolute;left:75%" :span="5" >
|
|
|
<el-button size="small" @click="queryParamsHidden ? (queryParamsHidden = false) : (queryParamsHidden = true)">{{ queryParamsHidden ? '隐藏' : '更多' }}</el-button>
|
|
|
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
@@ -688,6 +699,141 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
+ <el-collapse v-model="activeNames">
|
|
|
+ <el-collapse-item name="1">
|
|
|
+ <template slot="title" >
|
|
|
+ <i class="el-icon-s-home"></i>海运运价
|
|
|
+ </template>
|
|
|
+ <div>
|
|
|
+ <el-button
|
|
|
+ :disabled="doNot"
|
|
|
+ type="primary"
|
|
|
+ @click.prevent="addRelevant()"
|
|
|
+ size="small"
|
|
|
+ >新行
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <el-table
|
|
|
+ :data="dataList"
|
|
|
+ tooltip-effect="dark"
|
|
|
+ ref="checkout"
|
|
|
+ border
|
|
|
+ stripe
|
|
|
+ @selection-change="Selectinventory"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <el-table-column label="序号" type="index" width="80" />
|
|
|
+ <el-table-column prop="fCntrid" header-align="center" align="center" label="集装箱">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.fCntrid"
|
|
|
+ :disabled="doNot"
|
|
|
+ size="small"
|
|
|
+ clearable>
|
|
|
+ <el-option
|
|
|
+ v-for="item in cntrOptions"
|
|
|
+ :key="item.fId"
|
|
|
+ :label="item.fNo"
|
|
|
+ :value="item.fId"/>
|
|
|
+ </el-select>
|
|
|
+
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="fPrice"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="单价"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
|
|
|
+ v-model="scope.row.fPrice"
|
|
|
+ :disabled="doNot"
|
|
|
+ placeholder="单价"
|
|
|
+ clearable
|
|
|
+ show-word-limit
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="remark"
|
|
|
+ header-align="center"
|
|
|
+ width="140px"
|
|
|
+ align="center"
|
|
|
+ label="备注"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-input
|
|
|
+ v-model="scope.row.remark"
|
|
|
+ size="small"
|
|
|
+ :disabled="doNot"
|
|
|
+ clearable
|
|
|
+ placeholder=""
|
|
|
+ >
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="fDates"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="船期">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ v-model="scope.row.fDates"
|
|
|
+ style="width: 80%"
|
|
|
+ :disabled="doNot"
|
|
|
+ clearable
|
|
|
+ multiple
|
|
|
+ placeholder="请输入航期"
|
|
|
+ >
|
|
|
+ <el-option label="周一" value="周一"/>
|
|
|
+ <el-option label="周二" value="周二"/>
|
|
|
+ <el-option label="周三" value="周三"/>
|
|
|
+ <el-option label="周四" value="周四"/>
|
|
|
+ <el-option label="周五" value="周五"/>
|
|
|
+ <el-option label="周六" value="周六"/>
|
|
|
+ <el-option label="周天" value="周天"/>
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column
|
|
|
+ prop="fStatus"
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="状态"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-select
|
|
|
+ :disabled="doNot"
|
|
|
+ v-model="scope.row.fStatus"
|
|
|
+ >
|
|
|
+ <el-option label="正常" value="T" />
|
|
|
+ <el-option label="停用" value="F" />
|
|
|
+ </el-select>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column
|
|
|
+ header-align="center"
|
|
|
+ align="center"
|
|
|
+ label="操作"
|
|
|
+ >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ :disabled="doNot"
|
|
|
+ @click.native.prevent="wDeleteRow(scope.$index, dataList)"
|
|
|
+ size="small"
|
|
|
+ >移除</el-button
|
|
|
+ >
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="info" round @click="doNot = false">修 改</el-button>
|
|
|
<el-button type="success" round @click="submitForm" :disabled="doNot">保 存</el-button>
|
|
@@ -703,6 +849,7 @@
|
|
|
import Vue from 'vue'
|
|
|
import Cookies from 'js-cookie'
|
|
|
import { addSet, resetModule, select } from '@/api/system/set'
|
|
|
+ import {getcntrName} from "@/api/kaihe/shipDynamics/oceanFreightRate";
|
|
|
|
|
|
Vue.directive('dialogDrag', {
|
|
|
bind(el, binding, vnode, oldVnode) {
|
|
@@ -767,6 +914,7 @@
|
|
|
data() {
|
|
|
return {
|
|
|
setRowList: [],
|
|
|
+ dataList: [],
|
|
|
rouTe: [],
|
|
|
getRowList: [],
|
|
|
tableDate: [
|
|
@@ -932,6 +1080,7 @@
|
|
|
queryParamsHidden:false,
|
|
|
//查看置灰
|
|
|
doNot:true,
|
|
|
+ activeNames: ['1'],
|
|
|
//模糊查询港口名称
|
|
|
portNameOptions:[],
|
|
|
//港口类型字典表
|
|
@@ -999,6 +1148,7 @@
|
|
|
fCutoffdate:null,
|
|
|
fTeu:null
|
|
|
},
|
|
|
+ cntrOptions:[],
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
fPid: [{ required: true, message: "船名不能为空", trigger: "blur" }],
|
|
@@ -1023,6 +1173,11 @@
|
|
|
this.getList()
|
|
|
},
|
|
|
created() {
|
|
|
+ let queryParams = { pageNum: 1,};
|
|
|
+ getcntrName(queryParams).then(response=>{
|
|
|
+ // console.log(response)
|
|
|
+ this.cntrOptions = response.rows
|
|
|
+ })
|
|
|
routeSelection().then(res =>{
|
|
|
this.rouTe = res.rows;
|
|
|
})
|
|
@@ -1128,6 +1283,10 @@
|
|
|
this.vesselOptions = response.rows
|
|
|
})
|
|
|
},
|
|
|
+ //海运价选中
|
|
|
+ Selectinventory(selection) {
|
|
|
+ console.log(selection)
|
|
|
+ },
|
|
|
//模糊查询港口名称
|
|
|
portRemoteMethod(){
|
|
|
let queryParams = { pageNum: 1,};
|
|
@@ -1181,8 +1340,13 @@
|
|
|
fCutoffdate:null,
|
|
|
fTeu:null
|
|
|
};
|
|
|
+ this.dataList = []
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
+ //海运价移除
|
|
|
+ wDeleteRow(index, rows) {
|
|
|
+ rows.splice(index, 1);
|
|
|
+ },
|
|
|
// 状态修改
|
|
|
handleStatusChange(row) {
|
|
|
let text = row.fStatus === "0" ? "启用" : "停用";
|
|
@@ -1228,15 +1392,37 @@
|
|
|
const fId = row.fId || this.ids
|
|
|
getCorps(fId).then(response => {
|
|
|
this.form = response.data;
|
|
|
+ this.dataList = response.data.tCtnpriceItemsList
|
|
|
+ this.dataList.forEach(item =>item.fDates = JSON.parse(item.fDates))
|
|
|
+ delete this.form.tCtnpriceItemsList
|
|
|
+ console.log(this.form)
|
|
|
this.open = true;
|
|
|
this.title = "修改客户详情";
|
|
|
});
|
|
|
},
|
|
|
+ //海运价新行
|
|
|
+ addRelevant(){
|
|
|
+ this.$refs["form"].validate((valid) => {
|
|
|
+ if (valid) {
|
|
|
+ this.dataList.push({
|
|
|
+ fPid:null,
|
|
|
+ fCntrid:null,
|
|
|
+ fPrice:null,
|
|
|
+ remarks:null,
|
|
|
+ fStatus:'T',
|
|
|
+ fDates:null
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/** 提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
|
- addyard(this.form).then(response => {
|
|
|
+ let formData = new window.FormData();
|
|
|
+ formData.append("tVoyage", JSON.stringify(this.form));
|
|
|
+ formData.append("tCtnpriceItems", JSON.stringify(this.dataList));
|
|
|
+ addyard(formData).then(response => {
|
|
|
this.msgSuccess("操作成功");
|
|
|
this.open = false;
|
|
|
this.getList();
|
|
@@ -1258,6 +1444,22 @@
|
|
|
this.msgSuccess("删除成功");
|
|
|
})
|
|
|
},
|
|
|
+ /** 复制新增*/
|
|
|
+ copyAdded(){
|
|
|
+ getCorps(this.ids[0]).then(response => {
|
|
|
+ this.form = response.data;
|
|
|
+ this.dataList = response.data.tCtnpriceItemsList
|
|
|
+ this.dataList.forEach(item =>{
|
|
|
+ item.fDates = JSON.parse(item.fDates)
|
|
|
+ delete item .fId
|
|
|
+ })
|
|
|
+ delete this.form.tCtnpriceItemsList
|
|
|
+ this.form.fId = ''
|
|
|
+ this.open = true;
|
|
|
+ this.doNot = false
|
|
|
+ this.title = "新增";
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
const queryParams = this.queryParams;
|