|
@@ -11,7 +11,7 @@
|
|
|
@click="$refs.report.openDialog()">报表设计
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
|
|
|
- v-if="editButton" @click="inEdit">编 辑
|
|
|
+ v-if="editButton" :disabled="showLock" @click="inEdit">编 辑
|
|
|
</el-button>
|
|
|
<el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small"
|
|
|
:disabled="isSaveBtn || form.businessStatus != '录入'" @click="submit">保 存
|
|
@@ -37,6 +37,15 @@
|
|
|
<div style="margin-top: 50px">
|
|
|
<trade-card title="基础信息">
|
|
|
<avue-form :option="optionForm" v-model="form" ref="form">
|
|
|
+ <template slot="corpNameLabel">
|
|
|
+ <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">客户:</span>
|
|
|
+ </template>
|
|
|
+ <template slot="abroadConsignorCnameLabel">
|
|
|
+ <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国外发货人:</span>
|
|
|
+ </template>
|
|
|
+ <template slot="domesticConsigneeCnameLabel">
|
|
|
+ <span style="color: #1e9fff;cursor: pointer;" @click="inJump('客户')">国内收货人:</span>
|
|
|
+ </template>
|
|
|
<tempalte slot="corpName" slot-scope="{ row }">
|
|
|
<dic-select v-model="form.corpName" placeholder="客户" key="id" label="cnName" res="records"
|
|
|
url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
|
|
@@ -45,16 +54,17 @@
|
|
|
</tempalte>
|
|
|
<tempalte slot="contractNo" slot-scope="{ row }">
|
|
|
<el-input v-model="form.contractNo" placeholder="请输入 合同号"
|
|
|
- :disabled="editDisabled || form.agentItemsList.length"></el-input>
|
|
|
+ :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
|
|
|
</tempalte>
|
|
|
<tempalte slot="contractDate" slot-scope="{ row }">
|
|
|
<el-date-picker v-model="form.contractDate" type="date" placeholder="请选择 合同日期" format="yyyy-MM-dd"
|
|
|
- valueFormat="yyyy-MM-dd 00:00:00" :disabled="editDisabled || form.agentItemsList.length">
|
|
|
+ valueFormat="yyyy-MM-dd 00:00:00"
|
|
|
+ :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length">
|
|
|
</el-date-picker>
|
|
|
</tempalte>
|
|
|
<tempalte slot="prepaidAmount" slot-scope="{ row }">
|
|
|
<el-input v-model="form.prepaidAmount" placeholder="请输入 预付金额"
|
|
|
- :disabled="editDisabled || form.agentItemsList.length"></el-input>
|
|
|
+ :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"></el-input>
|
|
|
</tempalte>
|
|
|
<tempalte slot="countryOfOrigin" slot-scope="{ row }">
|
|
|
<dic-select v-model="form.countryOfOrigin" placeholder="原产地" key="id" label="cnName" res="records"
|
|
@@ -123,6 +133,17 @@
|
|
|
@selectChange="dicChange('affiliatedCompanyName', $event)"
|
|
|
:disabled="editDisabled"></dic-select>
|
|
|
</tempalte>
|
|
|
+ <tempalte slot="fundingParty" slot-scope="{ row }">
|
|
|
+ <dic-select v-model="form.fundingParty" placeholder="资金方" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/bcorps/listByType?corpTypeName=客户" :filterable="true" :remote="true"
|
|
|
+ dataName="cnName" @selectChange="dicChange('fundingParty', $event)"
|
|
|
+ :disabled="editDisabled"></dic-select>
|
|
|
+ </tempalte>
|
|
|
+ <tempalte slot="transactionMethod" slot-scope="{ row }">
|
|
|
+ <dic-select v-model="form.transactionMethod" placeholder="资金方" key="id" label="cnName" res="records"
|
|
|
+ url="/blade-los/btrademodes/list" :filterable="true" :remote="true" dataName="cnName"
|
|
|
+ @selectChange="dicChange('transactionMethod', $event)" :disabled="editDisabled"></dic-select>
|
|
|
+ </tempalte>
|
|
|
<tempalte slot="sourceType" slot-scope="{ row }">
|
|
|
<div style="display: flex;">
|
|
|
<dic-select style="margin-right: 4px;" v-model="form.sourceType" placeholder="客户来源"
|
|
@@ -216,6 +237,11 @@
|
|
|
dataName="cnName"></dic-select>
|
|
|
<span v-else>{{ row.boxType }}</span>
|
|
|
</template>
|
|
|
+ <template slot="boxNoForm" slot-scope="{ row }">
|
|
|
+ <el-input v-if="row.$cellEdit" v-model="row.boxNo" placeholder="请输入 箱号" size="small"
|
|
|
+ @change="boxChange(row)"></el-input>
|
|
|
+ <span v-else>{{ row.boxNo }}</span>
|
|
|
+ </template>
|
|
|
<tempalte slot="orderReleaseMethodForm" slot-scope="{ row }">
|
|
|
<dic-select v-if="row.$cellEdit" v-model="row.orderReleaseMethod" placeholder="放单方式" key="dictKey"
|
|
|
label="dictValue" url="/blade-system/dict-biz/dictionary?code=release_method"
|
|
@@ -253,7 +279,8 @@
|
|
|
<!-- <el-button size="small" :icon="row.$cellEdit ? 'el-icon-plus' : 'el-icon-edit'" type="text"
|
|
|
:disabled="editDisabled" @click="rowCell(row, index)">{{ row.$cellEdit ? '保 存' : '编 辑'
|
|
|
}}</el-button> -->
|
|
|
- <el-button size="small" icon="el-icon-delete" type="text" :disabled="editDisabled"
|
|
|
+ <el-button size="small" icon="el-icon-delete" type="text"
|
|
|
+ :disabled="editDisabled || form.feeCenterListD.length || form.feeCenterListC.length"
|
|
|
@click="rowDel(row, index)">删 除</el-button>
|
|
|
</template>
|
|
|
</avue-crud>
|
|
@@ -291,9 +318,9 @@
|
|
|
<avue-crud :data="form.recordInvoiceList" :option="option2"></avue-crud>
|
|
|
</el-tab-pane>
|
|
|
|
|
|
- <!-- <el-tab-pane label="通关记录" name="5">
|
|
|
- <avue-crud :data="form.recordClearanceList" :option="option4"></avue-crud>
|
|
|
- </el-tab-pane> -->
|
|
|
+ <el-tab-pane label="合同修改记录" name="5">
|
|
|
+ <avue-crud :data="form.recordList" :option="option4"></avue-crud>
|
|
|
+ </el-tab-pane>
|
|
|
</el-tabs>
|
|
|
</trade-card>
|
|
|
<containerTitle title="上传附件"></containerTitle>
|
|
@@ -419,7 +446,7 @@ export default {
|
|
|
feeCenterListC: [],
|
|
|
feeCenterListD: [],
|
|
|
filesCenterList: [],
|
|
|
- recordClearanceList: [],
|
|
|
+ recordList: [],
|
|
|
recordInvoiceList: [],
|
|
|
recordListC: [],
|
|
|
recordListD: [],
|
|
@@ -550,6 +577,11 @@ export default {
|
|
|
disabled: false,
|
|
|
},
|
|
|
{
|
|
|
+ label: '资金方',
|
|
|
+ prop: "fundingParty",
|
|
|
+ disabled: false,
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '货值',
|
|
|
prop: "goodsValue",
|
|
|
disabled: true,
|
|
@@ -602,6 +634,11 @@ export default {
|
|
|
}],
|
|
|
},
|
|
|
{
|
|
|
+ label: '成交方式',
|
|
|
+ prop: "transactionMethod",
|
|
|
+ disabled: false
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '所属公司',
|
|
|
prop: "affiliatedCompanyName",
|
|
|
disabled: false,
|
|
@@ -646,7 +683,7 @@ export default {
|
|
|
prop: "remarks",
|
|
|
type: 'textarea',
|
|
|
disabled: false,
|
|
|
- span: 18,
|
|
|
+ span: 12,
|
|
|
minRows: 2,
|
|
|
},
|
|
|
]
|
|
@@ -707,6 +744,7 @@ export default {
|
|
|
prop: "boxNo",
|
|
|
width: "140",
|
|
|
cell: true,
|
|
|
+ slot: true,
|
|
|
overHidden: true,
|
|
|
rules: [
|
|
|
{
|
|
@@ -840,8 +878,8 @@ export default {
|
|
|
]
|
|
|
},
|
|
|
{
|
|
|
- label: "金额",
|
|
|
- prop: "amount(USD)",
|
|
|
+ label: "金额(USD)",
|
|
|
+ prop: "amount",
|
|
|
width: "100",
|
|
|
cell: true,
|
|
|
slot: true,
|
|
@@ -1007,6 +1045,10 @@ export default {
|
|
|
align: 'center',
|
|
|
column: [
|
|
|
{
|
|
|
+ label: '结算单位',
|
|
|
+ prop: "corpName",
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '合同号',
|
|
|
prop: "contractNo",
|
|
|
},
|
|
@@ -1015,6 +1057,18 @@ export default {
|
|
|
prop: 'billNo'
|
|
|
},
|
|
|
{
|
|
|
+ label: '金额',
|
|
|
+ prop: 'amount'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '金额(USD)',
|
|
|
+ prop: 'amountUsd'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '汇率',
|
|
|
+ prop: 'exchangeRate'
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '报关单号',
|
|
|
prop: 'customsDeclarationNo'
|
|
|
},
|
|
@@ -1040,20 +1094,33 @@ export default {
|
|
|
align: 'center',
|
|
|
column: [
|
|
|
{
|
|
|
+ label: '提单号',
|
|
|
+ prop: 'billNo'
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '日期',
|
|
|
prop: 'date'
|
|
|
},
|
|
|
{
|
|
|
- label: '金额',
|
|
|
+ label: '操作人',
|
|
|
+ prop: 'createUserName'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: '原金额',
|
|
|
prop: 'amount'
|
|
|
},
|
|
|
{
|
|
|
+ label: '修改金额',
|
|
|
+ prop: 'amountUsd'
|
|
|
+ },
|
|
|
+ {
|
|
|
label: '备注',
|
|
|
prop: 'remarks'
|
|
|
}
|
|
|
]
|
|
|
},
|
|
|
- itemIds: null
|
|
|
+ itemIds: null,
|
|
|
+ showLock: false
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -1068,7 +1135,6 @@ export default {
|
|
|
},
|
|
|
async created() {
|
|
|
this.option = await this.getColumnData(this.getColumnName(376), this.optionBack);
|
|
|
- console.log(this.detailData.new)
|
|
|
if (this.detailData.new) {
|
|
|
getDicinit('get', '/blade-los/bports/list', { cnName: '青岛' }).then(res => {
|
|
|
res.data.data.records.forEach(e => {
|
|
@@ -1090,12 +1156,14 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (this.detailData.id) {
|
|
|
+ this.showLock = true;
|
|
|
this.editButton = true
|
|
|
this.editDisabled = true
|
|
|
this.optionForm.disabled = true
|
|
|
this.getDetails(this.detailData.id)
|
|
|
}
|
|
|
if (this.$route.query.params) {
|
|
|
+ this.showLock = true;
|
|
|
this.getDetails(this.$route.query.params)
|
|
|
}
|
|
|
if (this.detailData.copyId) {
|
|
@@ -1103,6 +1171,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ inLock() {
|
|
|
+ const data = {
|
|
|
+ moduleName: "MYDL",
|
|
|
+ tableName: "MYDL_Detail",
|
|
|
+ billId: this.form.id,
|
|
|
+ no: localStorage.getItem("browserID"),
|
|
|
+ billNo: this.form.contractNo
|
|
|
+ };
|
|
|
+ this.inDetailsKey(this.$route.name, {
|
|
|
+ moduleName: "MYDL",
|
|
|
+ tableName: "MYDL_Detail",
|
|
|
+ billId: this.form.id,
|
|
|
+ billNo: this.form.contractNo
|
|
|
+
|
|
|
+ });
|
|
|
+ this.checkLock(data).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.onLock(data).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ this.showLock = false
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ inJump(name){
|
|
|
+
|
|
|
+ },
|
|
|
dicChange(name, row) {
|
|
|
if (name == 'corpName') {
|
|
|
if (row) {
|
|
@@ -1222,6 +1318,20 @@ export default {
|
|
|
this.form.domesticCurrency = null
|
|
|
}
|
|
|
}
|
|
|
+ if (name == 'fundingParty') {
|
|
|
+ if (row) {
|
|
|
+ this.form.fundingPartyId = row.id
|
|
|
+ } else {
|
|
|
+ this.form.fundingPartyId = null
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (name == 'transactionMethod') {
|
|
|
+ if (row) {
|
|
|
+ this.form.transactionMethodId = row.id
|
|
|
+ } else {
|
|
|
+ this.form.transactionMethodId = null
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
rowDicChange(name, row, el) {
|
|
|
if (name == 'hsCode') {
|
|
@@ -1234,6 +1344,16 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ boxChange(row) {
|
|
|
+
|
|
|
+ getDicinit('get', '/blade-los/agentitems/selectBoxNo', { boxNo: row.boxNo }).then(res => {
|
|
|
+ if (res.data.data != 'true') {
|
|
|
+ this.$alert(res.data.data, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ });
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
countChange(row) {
|
|
|
row.amount = _.multiply(Number(row.netWeight ? row.netWeight : 0), Number(row.price ? row.price : 0))
|
|
|
},
|
|
@@ -1417,6 +1537,7 @@ export default {
|
|
|
});
|
|
|
getDetail({ id: id }).then(res => {
|
|
|
this.form = res.data.data
|
|
|
+ this.inLock()
|
|
|
if (res.data.data.abroadConsignorId) {
|
|
|
this.$refs.abankCode.IdGetDicData({ id: res.data.data.abroadConsignorId })
|
|
|
}
|
|
@@ -1491,7 +1612,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
if (name == '首款账单') {
|
|
|
- if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
+ // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
bcurrencyGetExrate({ date: this.form.contractDate, dc: 'D' }).then(res => {
|
|
|
res.data.data.forEach(e => {
|
|
|
if (this.form.currency == e.code) {
|
|
@@ -1517,7 +1638,7 @@ export default {
|
|
|
})
|
|
|
}
|
|
|
if (name == '尾款账单') {
|
|
|
- if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
+ // if (!this.form.domesticConsigneeCname) return this.$message.error("请选择国内收货人");
|
|
|
let obj = {}
|
|
|
obj = {
|
|
|
...this.form,
|
|
@@ -1543,7 +1664,7 @@ export default {
|
|
|
this.wkType = name
|
|
|
}
|
|
|
if (name == '生成首款应付') {
|
|
|
- if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
|
|
|
+ // if (this.form.applyForPayment == 1) return this.$message.error("请勿重复生成");
|
|
|
let obj = {}
|
|
|
obj = {
|
|
|
id: this.form.id,
|
|
@@ -1833,6 +1954,14 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
goBack(type) {
|
|
|
+ if (this.form.id) {
|
|
|
+ this.unLock({
|
|
|
+ moduleName: "MYDL",
|
|
|
+ tableName: "MYDL_Detail",
|
|
|
+ billId: this.form.id,
|
|
|
+ billNo: this.form.contractNo
|
|
|
+ });
|
|
|
+ }
|
|
|
this.$emit("goBack", type);
|
|
|
this.$emit('updateKey')
|
|
|
},
|