|
@@ -15,31 +15,32 @@
|
|
|
<div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
- <!-- <tempalte slot="businessType">
|
|
|
- <el-select v-model="form.businessType" placeholder="请选择 业务类型">
|
|
|
- <el-option v-for="item in typeOptions" :key="item.value" :label="item.label"
|
|
|
- :value="item.value">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- </tempalte> -->
|
|
|
<template slot="menuForm">
|
|
|
<el-button icon="el-icon-search" type="primary" @click="searchChange">获取配置信息</el-button>
|
|
|
+ <el-button icon="el-icon-search" type="success" :disabled="data.length == 0"
|
|
|
+ @click="getData">获取原始信息</el-button>
|
|
|
</template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
<trade-card title="字段明细">
|
|
|
- <avue-crud :option="option" :data="data" id="out-table" ref="crud" @selection-change="selectionChange" v-model="rowFrom"
|
|
|
- @row-update="rowUpdate" @resetColumn="resetColumn('crud', 'option', 'optionBack', 415)"
|
|
|
+ <avue-crud :option="option" :data="data" id="out-table" ref="crud" @selection-change="selectionChange"
|
|
|
+ v-model="rowFrom" @row-update="rowUpdate"
|
|
|
+ @resetColumn="resetColumn('crud', 'option', 'optionBack', 415)"
|
|
|
@saveColumn="saveColumn('crud', 'option', 'optionBack', 415)">
|
|
|
<template slot-scope="{type,size,row,index}" slot="menu">
|
|
|
- <el-button type="text" icon="el-icon-edit" @click.stop="$refs.crud.rowEdit(row, index)">编 辑
|
|
|
+ <el-button size="small" type="text" icon="el-icon-edit"
|
|
|
+ @click.stop="$refs.crud.rowEdit(row, index)">编 辑
|
|
|
</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text" @click.stop="rowDel(row, index)">删
|
|
|
+ 除</el-button>
|
|
|
</template>
|
|
|
- <template slot-scope="{type,disabled}" slot="fieldValueNewForm">
|
|
|
- <el-input v-if="rowFrom.fieldValueType=='输入框'" :disabled="disabled" v-model="rowFrom.fieldValueNew"></el-input>
|
|
|
- <dic-select v-if="rowFrom.fieldValueType=='选择器'" v-model="rowFrom.fieldValueNew" :placeholder="箱型" key="id" res="records"
|
|
|
- :label="rowFrom.fieldValueRetrieval" :url="rowFrom.fieldValueUrl" :filterable="true" :remote="true"
|
|
|
- :dataName="rowFrom.fieldValueRetrieval"></dic-select>
|
|
|
+ <template slot-scope="{type,disabled}" slot="fieldValueNewNameForm">
|
|
|
+ <el-input v-if="rowFrom.fieldValueType == '输入框'" :disabled="disabled"
|
|
|
+ v-model="rowFrom.fieldValueNewName"></el-input>
|
|
|
+ <dic-select v-if="rowFrom.fieldValueType == '选择器'" v-model="rowFrom.fieldValueNewName" key="id"
|
|
|
+ res="records" :label="rowFrom.fieldValueRetrieval" :url="rowFrom.fieldValueUrl"
|
|
|
+ :filterable="true" :remote="true" :dataName="rowFrom.fieldValueRetrieval"
|
|
|
+ @selectChange="dicChange(rowFrom.fieldValueNewName, $event)"></dic-select>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
@@ -48,7 +49,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getDetail, submit, getUpdate, checkUpdate } from "@/api/serviceConfiguration/modifyData"; import feeInfo from "@/components/tradeAgency/fee-info";
|
|
|
+import { getDetail, submit, getUpdate, removeItem, getItemDetail, checkUpdate } from "@/api/serviceConfiguration/modifyData"; import feeInfo from "@/components/tradeAgency/fee-info";
|
|
|
import dicSelect from "@/components/dicSelect/main";
|
|
|
import checkSchedule from "@/components/checkH/checkSchedule.vue";
|
|
|
import businessReports from "@/components/tradeAgency/businessReports.vue";
|
|
@@ -66,7 +67,7 @@ export default {
|
|
|
type: 2,
|
|
|
updateItemList: []
|
|
|
},
|
|
|
- rowFrom:{
|
|
|
+ rowFrom: {
|
|
|
|
|
|
},
|
|
|
optionForm: {
|
|
@@ -77,10 +78,6 @@ export default {
|
|
|
disabled: false,
|
|
|
column: [
|
|
|
{
|
|
|
- label: "源单据单号",
|
|
|
- prop: "retrievalValue",
|
|
|
- },
|
|
|
- {
|
|
|
label: "业务类型",
|
|
|
prop: "businessType",
|
|
|
type: 'select',
|
|
@@ -109,6 +106,37 @@ export default {
|
|
|
value: 'BGAI',
|
|
|
label: '空运报关进口'
|
|
|
}],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "检索类型",
|
|
|
+ prop: "retrievalType",
|
|
|
+ type: 'select',
|
|
|
+ dicData: [{
|
|
|
+ value: '1',
|
|
|
+ label: '业务单号'
|
|
|
+ }, {
|
|
|
+ value: '2',
|
|
|
+ label: '提单号'
|
|
|
+ }],
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "源单据单号",
|
|
|
+ prop: "retrievalValue",
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: " ",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
},
|
|
|
{
|
|
|
label: "创建日期",
|
|
@@ -130,7 +158,7 @@ export default {
|
|
|
optionBack: {
|
|
|
height: 'auto',
|
|
|
calcHeight: 30,
|
|
|
- menuWidth: 60,
|
|
|
+ menuWidth: 150,
|
|
|
tip: false,
|
|
|
border: true,
|
|
|
addBtn: false,
|
|
@@ -146,7 +174,7 @@ export default {
|
|
|
label: "更改时间",
|
|
|
prop: "updateTime",
|
|
|
overHidden: true,
|
|
|
- editDisplay:false,
|
|
|
+ editDisplay: false,
|
|
|
},
|
|
|
{
|
|
|
label: "字段描述",
|
|
@@ -156,13 +184,13 @@ export default {
|
|
|
},
|
|
|
{
|
|
|
label: "字段原值",
|
|
|
- prop: "fieldValue",
|
|
|
+ prop: "fieldValueName",
|
|
|
overHidden: true,
|
|
|
editDisplay: false,
|
|
|
},
|
|
|
{
|
|
|
label: "字段新值",
|
|
|
- prop: "fieldValueNew",
|
|
|
+ prop: "fieldValueNewName",
|
|
|
overHidden: true,
|
|
|
}
|
|
|
]
|
|
@@ -188,10 +216,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- rowUpdate(row,index,done,loading){
|
|
|
+ rowUpdate(row, index, done, loading) {
|
|
|
done()
|
|
|
- this.data[index].fieldValueNew=row.fieldValueNew
|
|
|
- console.log(row)
|
|
|
+ this.data[index].fieldValueNew = row.fieldValueNew
|
|
|
+ this.data[index].fieldValueNewName = row.fieldValueNewName
|
|
|
},
|
|
|
searchChange() {
|
|
|
this.form.updateItemList = []
|
|
@@ -199,159 +227,52 @@ export default {
|
|
|
this.data = res.data.data.updateItemList
|
|
|
})
|
|
|
},
|
|
|
- dicChange(name, row) {
|
|
|
- if (name == 'corpName') {
|
|
|
- if (row) {
|
|
|
- this.form.corpId = row.id
|
|
|
- this.form.corpName = row.cnName
|
|
|
- this.form.sourceType = row.sourceType
|
|
|
- this.form.salesmanName = row.srcCnName
|
|
|
- this.form.salesmanId = row.srcId
|
|
|
- } else {
|
|
|
- this.form.corpId = null
|
|
|
- this.form.sourceType = null
|
|
|
- this.form.salesmanName = null
|
|
|
- this.form.salesmanId = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'countryOfOrigin') {
|
|
|
- if (row) {
|
|
|
- this.form.countryOfOrigin = row.cnName
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'polCnName') {
|
|
|
- if (row) {
|
|
|
- this.form.polId = row.id
|
|
|
- this.form.polCode = row.code
|
|
|
- this.form.polCnName = row.cnName
|
|
|
- this.form.polEnName = row.enName
|
|
|
- } else {
|
|
|
- this.form.polId = null
|
|
|
- this.form.polCode = null
|
|
|
- this.form.polEnName = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'podCnName') {
|
|
|
- if (row) {
|
|
|
- this.form.podId = row.id
|
|
|
- this.form.podCode = row.code
|
|
|
- this.form.podCnName = row.cnName
|
|
|
- this.form.podEnName = row.enName
|
|
|
- } else {
|
|
|
- this.form.podId = null
|
|
|
- this.form.podCode = null
|
|
|
- this.form.podEnName = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'abroadConsignorCname') {
|
|
|
- if (row) {
|
|
|
- this.$refs.abankCode.IdGetDicData({ id: row.id })
|
|
|
- this.form.abroadConsignorId = row.id
|
|
|
- this.form.abroadConsignorCname = row.cnName
|
|
|
- getDicinit('get', '/blade-los/bcorps/detail', { id: row.id }).then(res => {
|
|
|
- res.data.data.corpsBankList.forEach((e, index) => {
|
|
|
- if (index == 0) {
|
|
|
- console.log(e)
|
|
|
- this.form.abroadBankMnemonicCode = e.mnemonicCode
|
|
|
- this.form.abroadBank = e.accountBank
|
|
|
- this.form.abroadCurrency = e.curNo
|
|
|
+ getData() {
|
|
|
+ this.$refs["form"].validate((valid, done) => {
|
|
|
+ done();
|
|
|
+ if (valid) {
|
|
|
+ getItemDetail(this.form).then(res => {
|
|
|
+ let obj=res.data.data
|
|
|
+ this.data.forEach(row=>{
|
|
|
+ if(row.fieldValueType=='选择器'){
|
|
|
+ row.fieldValue=obj[row.mainFieldId]
|
|
|
+ row.fieldValueName=obj[row.mainFieldCname]
|
|
|
+ }else{
|
|
|
+ row.fieldValue=obj[row.fieldDescribe]
|
|
|
+ row.fieldValueName=obj[row.fieldDescribe]
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
-
|
|
|
} else {
|
|
|
- this.form.abroadConsignorId = null
|
|
|
- this.form.abroadBankMnemonicCode = null
|
|
|
- this.form.abroadBank = null
|
|
|
- this.form.abroadCurrency = null
|
|
|
+ return false;
|
|
|
}
|
|
|
+ });
|
|
|
+ },
|
|
|
+ dicChange(name, row) {
|
|
|
+ if (row) {
|
|
|
+ this.rowFrom.fieldValueNew = row.id
|
|
|
+ this.rowFrom.fieldValueNewName = row.cnName
|
|
|
+ } else {
|
|
|
+ this.rowFrom.fieldValueNew = null
|
|
|
+ this.rowFrom.fieldValueNewName = null
|
|
|
}
|
|
|
- if (name == 'domesticConsigneeCname') {
|
|
|
- if (row) {
|
|
|
- this.$refs.dbankCode.IdGetDicData({ id: row.id })
|
|
|
- console.log(this.$refs.abankCode.IdGetDicData({ id: row.id }), 222)
|
|
|
- this.form.domesticConsigneeId = row.id
|
|
|
- this.form.domesticConsigneeCname = row.cnName
|
|
|
- getDicinit('get', '/blade-los/bcorps/detail', { id: row.id }).then(res => {
|
|
|
- res.data.data.corpsBankList.forEach((e, index) => {
|
|
|
- if (index == 0) {
|
|
|
- console.log(e)
|
|
|
- this.form.domesticBankMnemonicCode = e.mnemonicCode
|
|
|
- this.form.domesticBank = e.accountBank
|
|
|
- this.form.domesticCurrency = e.curNo
|
|
|
- }
|
|
|
- })
|
|
|
+ },
|
|
|
+ rowDel(row, index) {
|
|
|
+ this.$confirm("确定删除数据?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(() => {
|
|
|
+ if (row.id) {
|
|
|
+ removeItem({ ids: row.id }).then(res => {
|
|
|
+ this.data.splice(index, 1);
|
|
|
+ this.$message.success("成功删除");
|
|
|
})
|
|
|
} else {
|
|
|
- this.form.domesticConsigneeId = null
|
|
|
- this.form.domesticBankMnemonicCode = null
|
|
|
- this.form.domesticBank = null
|
|
|
- this.form.domesticCurrency = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'affiliatedCompanyName') {
|
|
|
- if (row) {
|
|
|
- this.form.affiliatedCompanyId = row.id
|
|
|
- } else {
|
|
|
- this.form.affiliatedCompanyId = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'sourceType') {
|
|
|
- if (!row) {
|
|
|
- this.form.salesmanId = null
|
|
|
- this.form.salesmanName = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'salesmanName') {
|
|
|
- if (row) {
|
|
|
- this.form.salesmanId = row.id
|
|
|
- } else {
|
|
|
- this.form.salesmanId = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'abroadBankMnemonicCode') {
|
|
|
- if (row) {
|
|
|
- this.form.abroadBank = row.accountBank
|
|
|
- this.form.abroadCurrency = row.curNo
|
|
|
- } else {
|
|
|
- this.form.abroadBank = null
|
|
|
- this.form.abroadCurrency = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'domesticBankMnemonicCode') {
|
|
|
- if (row) {
|
|
|
- this.form.domesticBank = row.accountBank
|
|
|
- this.form.domesticCurrency = row.curNo
|
|
|
- } else {
|
|
|
- this.form.domesticBank = null
|
|
|
- this.form.domesticCurrency = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'fundingParty') {
|
|
|
- if (row) {
|
|
|
- this.form.fundingPartyId = row.id
|
|
|
- this.form.fundingParty = row.cnName
|
|
|
- } else {
|
|
|
- this.form.fundingPartyId = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'transactionMethod') {
|
|
|
- if (row) {
|
|
|
- this.form.transactionMethodId = row.id
|
|
|
- } else {
|
|
|
- this.form.transactionMethodId = null
|
|
|
- }
|
|
|
- }
|
|
|
- if (name == 'operatorName') {
|
|
|
- if (row) {
|
|
|
- this.hdForm.operatorId = row.id
|
|
|
- } else {
|
|
|
- this.hdForm.operatorId = null
|
|
|
+ this.data.splice(index, 1);
|
|
|
}
|
|
|
- }
|
|
|
- },
|
|
|
- rowEdit(row) {
|
|
|
|
|
|
+ });
|
|
|
},
|
|
|
getDetails(id) {
|
|
|
const loading = this.$loading({
|